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
hetzner: do not reboot instance after partitioning failed #433
Conversation
There may be errors during partitioning phase (incorrect configuration, problems with devices, etc), but they are rarely critical to reboot rescue shell. With this change time to redeploy after error is reduced by 1 minute.
@aszlig Do you have any opinions on this? |
@@ -591,7 +597,11 @@ def create(self, defn, check, allow_reboot, allow_recreate): | |||
|
|||
if not self.vm_id: | |||
self.log("installing machine...") | |||
self.reboot_rescue(install=True, partitions=defn.partitions) |
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.
The same can be achieved by just checking for the RESCUE
state here.
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.
I was too cautious here =)
I originally did this because sometimes when |
@aszlig Thanks for review! 1 > blivet has failed it could end up in an unrecoverable state 2 > or even just emit a warning telling the user what to do if the he/she wants to throw away the current state
3 This isn't related to my changes, but there is an easy way to brick Nixops rescue mode. Just press Ctrl-C during rescue reboot
Now NixOps cannot reboot instance (wrong password). I think this is because of lines https://github.com/danbst/nixops/blob/7c60f056f2438c58796c9dc5dd4bc1030bfddcdf/nixops/backends/hetzner.py#L357-L358
I can fill issue for this if reboot on bootstrap problems will be left. |
Maybe it just could be a flag to enable this? |
@domenkozar unfortunately, I have no free Hetzner machines to further maintain this PR. |
There may be errors during partitioning phase (incorrect configuration, problems with devices, etc), but they are rarely critical to reboot rescue shell.
With this change time to redeploy after partition error is reduced by 1 minute.
I still do bootstrapping phase, because nixpart version could be changed
Also I'd like to ask nixops devs:
part of #429