Skip to content
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

Multipass should have a restart command next to start and stop #217

Closed
morphis opened this issue Apr 20, 2018 · 11 comments · Fixed by #463
Closed

Multipass should have a restart command next to start and stop #217

morphis opened this issue Apr 20, 2018 · 11 comments · Fixed by #463

Comments

@morphis
Copy link

morphis commented Apr 20, 2018

At times you really just want to restart a machine multipass manages. At the moment you have to do a multipass stop my-machine && multipass start my-machine. Having a short version of this as multipass restart my-machine would be pretty handy.

@Saviq
Copy link
Collaborator

Saviq commented Apr 20, 2018

Sounds fine, yeah.

In its absence you can always do:

multipass exec my-machine sudo reboot - I know it's a mouthful, but works ;)

@morphis
Copy link
Author

morphis commented Apr 20, 2018 via email

@pekof
Copy link
Contributor

pekof commented Oct 24, 2018

I could do this

@Saviq
Copy link
Collaborator

Saviq commented Oct 24, 2018

@pekof great, looking forward to your PR!

@ricab ricab mentioned this issue Oct 25, 2018
@ricab
Copy link
Contributor

ricab commented Oct 25, 2018

Hi, I actually started working on this a couple of days ago. @pekof only now did I notice you had proposed doing the same thing, sorry about that.

@ricab
Copy link
Contributor

ricab commented Oct 25, 2018

@pekof again, I'm sorry about this, I did not announce I was working on the issue because I wanted to be sure I reached a solution prior to that. The issue was dormant for so long, I did not expect someone else to want to do the same, but I suppose it is a natural starter's choice.

Anyway, I wanted to assure you I did not see your comment here and apologize for any inconvenience.

@pekof
Copy link
Contributor

pekof commented Oct 26, 2018

@ricab that was my first idea was to issue stop and start from client.
But that's not good solution because if client dies before issuing start command machine would be stopped.
restart needs to be supported by server.

@ricab
Copy link
Contributor

ricab commented Oct 26, 2018

Hi @pekof, I see your point, but limiting changes to the client minimizes complexity by maximizing code reuse. By approaching restart as a pure combination of existing server functionality we can keep the server interface "as simple as possible, but no simpler".

True, a client-contained restart lacks the transactional character, but that did not seem like a requirement for this issue. I am not sure how important it would be. But there is a benefit in having one command less to support in the server from now on.

@ricab
Copy link
Contributor

ricab commented Oct 27, 2018

Hi @pekof, are you still working toward a server-side solution? If so, I will leave it to you. Otherwise, please let me know.

@pekof
Copy link
Contributor

pekof commented Oct 29, 2018

@ricab I'm getting familiar with daemon side.
I can do that on another issue if you want to solve this one.

@ricab
Copy link
Contributor

ricab commented Oct 29, 2018

Alright, sounds good. I'll have a look into this later on.

bors bot added a commit that referenced this issue Nov 9, 2018
463: Restart cmd r=townsend2010 a=ricab

This fixes #217. It implements a restart command by delegating on the existing stop and start commands. 

Co-authored-by: Ricardo Abreu <ricab@ricabhome.org>
bors bot added a commit that referenced this issue Nov 9, 2018
463: Restart cmd r=townsend2010 a=ricab

This fixes #217. It implements a restart command by delegating on the existing stop and start commands. 

Co-authored-by: Ricardo Abreu <ricab@ricabhome.org>
@bors bors bot closed this as completed in #463 Nov 9, 2018
@Saviq Saviq added this to the 2018.12.1 milestone Dec 14, 2018
bors bot added a commit that referenced this issue Dec 20, 2018
551: Release 2018.12.1 r=townsend2010 a=Saviq

### Highlights

- On Linux, suspending/resuming the instance to/from disk is now supported. (#374)
- Better handling of delayed shutdown including posting `wall` messages to logged in users and allowing log ins to the instance unless 1 minute or less remains until shutdown. (#461, #50) 
- On Linux, all CPU flags should be passed into the running instance on newly created instances. (#516)
- Fixed some races around mount handling. (#514, #520)

### Bugs fixed:

- make the recover command idempotent (#528)
- explicitly stop mounts when deleting an instance to avoid a race (#520)
- be smarter about what group owns the multipass socket (#513, #523) 
- pass through all CPU flags when launching QEMU or libvirt instances (#516)
- use `info` log level for metrics issues (#515)
- fix potential race when starting a mount (#514)
- use `wall` shutdown messages for users logged into VM when delayed shutdown is initiated (#501)
- fix crash if exception during daemon start up (#487)
- refactor CLI code (#468)
- add default uid/gid mapping (#331)
- fix file metadata passthrough
- display uid/gid maps in info command (#439)
- add support for the suspend command (#374)
- shell to machine in delayed stop state (#461)
- improve uid/gid validation (#479)
- avoid leaking the libvirt bridge (#327, #413)
- add a restart command (#217)
- upgrade 3rd-party versions (#471)

Co-authored-by: bors[bot] <bors[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants