Adding PowerOff option to allow graceful shutdown.#340
Adding PowerOff option to allow graceful shutdown.#340arg5739 wants to merge 3 commits intomicrosoft:masterfrom
Conversation
|
@arg5739 please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
Contributor License AgreementContribution License AgreementThis Contribution License Agreement (“Agreement”) is agreed to by the party signing below (“You”),
|
| Hydrate(context.Context, string, string, *compute.VirtualMachine) (*compute.VirtualMachine, error) | ||
| Start(context.Context, string, string) error | ||
| Stop(context.Context, string, string) error | ||
| Poweroff(context.Context, string, string, bool) error |
There was a problem hiding this comment.
We should align the naming. If we are going to call it Stop_Graceful in the protobuf, we should call it StopGraceful in the interface.
I realize this is inconsistent with the naming in the upstream arm api but we can do something like
PowerOff arm api -> StopGraceful MOC api
PowerOff SkipShutdown arm api -> Stop MOC api
but naming should be consistent in the moc bubble.
There was a problem hiding this comment.
I actually don't even think we need to expand the interface, just add a flag to Stop to indicate for skipshutdown.
we are doing a bit of a slow rollout api replacement in the arm api where poweroff will replace stop but it is not necessary in the MOC api's where we can just outright modify the behavior of the stop api because we control the call pattern.
i.e. all arm STOP calls STOP with skip shutdown to true.
all arm poweroff calls STOP and can toggle skipshutdown based on their paramaterization.
Currently VM just stops instead graceful shutdown.
in this PR we are trying to add flag that allow customer to choose if they want graceful shutdown or not.