-
Notifications
You must be signed in to change notification settings - Fork 662
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
shell to machine in delayed-shutdown state #465
shell to machine in delayed-shutdown state #465
Conversation
Codecov Report
@@ Coverage Diff @@
## master #465 +/- ##
==========================================
- Coverage 66.65% 66.64% -0.02%
==========================================
Files 141 141
Lines 5413 5414 +1
==========================================
Hits 3608 3608
- Misses 1805 1806 +1
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @pekof, thanks for this! Allowing shelling in is one thing, but we also need to cancel the shutdown timer, otherwise the machine will go down from under the user's feet.
@Saviq if you think that's necessary I will do it. My only issue is what's use case for delayed stop if shell or exec would cancel it. |
@pekof, thanks for the contribution too! The original reason we recommended cancelling the delayed shutdown was a case were snapcraft would do a build in a Multipass instance and then when it's done, it puts the instance in a delayed shutdown. At this point, a user shell's/exec's into the instance and does stuff and then all of a sudden, the instance is shutdown from underneath them. However, after thinking about it, a user poking around a snapcraft instance is probably not the best thing to do and if they do, they are on their own. snapcraft is the true consumer of that instance and not the user. So my recommendation is that the consumer of the instance should be the one to issue a |
@Saviq and @townsend2010 if I add commit that cancels delayed shutdown and you decide that that behavior is not desired you can still merge prior commit? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After chatting a bit I think we'll try and replicate the shutdown
behaviour using wall
to warn logged in users and preventing new shell
s and exec
s within a minute from shutdown or so.
We'll do this in a separate PR though.
bors r+
465: shell to machine in delayed-shutdown state r=Saviq a=pekof Fix bug #461 ssh_info returns connection data if machine is still running Co-authored-by: pekof <[email protected]>
Hmm, let's try this again... |
465: shell to machine in delayed-shutdown state r=saviq a=pekof Fix bug #461 ssh_info returns connection data if machine is still running Co-authored-by: pekof <[email protected]>
Build failed |
Fix bug #461
ssh_info returns connection data if machine is still running