-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request: Kill the app if no CF tunnel is present #38
Comments
I wonder whether we could push this as an app with 0 instances, and run it in a task to get around CF restarting it repeatedly... I don't know whether you can ssh into a task. |
I don't believe one can:
The only way I can see tasks being useful here is to embed the user's oauth-token in a task, and make it responsible for bringing up the conduit app and tearing it down afterwards, and then self-terminating. All doable, but a non-trivial re-work of how the system works at present. |
I tried to do that (ssh into a task) but you cannot do it. The documentation actually says you cannot ssh into a task container. https://docs.cloudfoundry.org/devguide/using-tasks.html
That is why my hacky solution. :) |
Would be great to find a solution. Just saying.
|
In some circumstances the
conduit
proxy app might remain running forever.For instance, if the
cf conduit
fails, or if the cf token expires or the user targets a different API endpoint or org or space.If the application is running forever, it might happen that the user is billied for ever.
Proposed solution
One solution can run some kind of watchdog command in the app, that would fail if no SSH tunnel is created or if it stops. For example, dropping a
safe-terminate.sh
then,
cf conduit
would push the static app as follows:The app would wait for a SSH to be present in 1 minute, and then wait until it is gone. Then it will terminate after 10 seconds. In normal operation, the flow would be as usual, the application would be deleted once conduit finished.
If instead the
cf conduit
fails to delete the app, the SSH tunnel would eventually die. The script would detect that and terminate. CF would restart the application several times, but the script would fail after one minute because no SSH connection is done.The text was updated successfully, but these errors were encountered: