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

Support REST API for OSv Reboot #51

Open
tzach opened this issue May 4, 2014 · 2 comments
Open

Support REST API for OSv Reboot #51

tzach opened this issue May 4, 2014 · 2 comments

Comments

@tzach
Copy link
Member

tzach commented May 4, 2014

In some cases, user would like to restart OSv instance and start fresh, including running a init sequence and reading cloud-init.
Once done, instance will have zero info of its past life.

This can also be done using the HV but this method have disadvantages on the cloud:

  • in public cloud this may cost a new instance
  • take more time
  • may not close all resource gracefully
@nyh
Copy link
Contributor

nyh commented May 4, 2014

I take it from your description that you want this reboot() feature to do a clean shutdown first.
We need to think how the HTTP server can cause a running application to cleanly shutdown (perhaps a UNIX signal?).
Note that the existing osv::reboot() doesn't cleanly shut down anything - it doesn't even flush the disk. This is also the topic of this issue: cloudius-systems/osv#180

Finally, note that osv::reboot() still involves the hypervisor. If we want the hypervisor not to know about the reboot (to make it faster and cheaper (?)) we can try to replace it with some sort of in-place re-initalization of OSv, which rezeros the BSS and reloads the .data and jumps again to the starting point of OSv. Would be a fun exercise, but not an easy one.

@tzach
Copy link
Member Author

tzach commented May 5, 2014

I take it from your description that you want this reboot() feature to do a clean shutdown first.

Well, as clean as possible
Can do better than the HV?

We need to think how the HTTP server can cause a running application to cleanly shutdown (perhaps a UNIX signal?).

Note that the existing osv::reboot() doesn't cleanly shut down anything - it doesn't even flush the disk. This is also the topic of this issue: cloudius-systems/osv#180

Finally, note that osv::reboot() still involves the hypervisor. If we want the hypervisor not to know >about the reboot (to make it faster and cheaper (?)) we can try to replace it with some sort of in->place re-initalization of OSv, which rezeros the BSS and reloads the .data and jumps again to the starting point of OSv. Would be a func exercise, but not an easy one.

EC2 actually support reboot[1], so the price motivation does not holds.
If OSv can get the restart signal from HV and gracefully close resources, the first motivation does not holds either. If this is the case, supporting the cloud provider/HV reboot API is good enough.
Is it the case?

[1] http://docs.aws.amazon.com/AWSEC2/latest/CommandLineReference/ApiReference-cmd-RebootInstances.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants