-
Notifications
You must be signed in to change notification settings - Fork 41
Open
Description
Hello,
Attempting to reset an AX root server does not work:
$ hetznerctl rescue -a $SSH_FINGERPRINT $IP
Server #1234567: Trying to reboot using the 'soft' method.
hetzner.RobotError: 400 - invalid input, fields: type (400)
According to the Robot documentation, the sw reboot method (used by soft) is no longer available:
"type":[
"power",
"power_long",
"hw",
"man"
]
Attempts to call the reset API with the sw reset method (used by soft which is the default) fail with the above 400 error. Changing the default reset method to hw (hard) resolves the issue:
diff --git a/hetzner/reset.py b/hetzner/reset.py
index 4afc310..873ad9f 100644
--- a/hetzner/reset.py
+++ b/hetzner/reset.py
@@ -77,7 +77,7 @@ class Reset(object):
is_down = False
if tries is None:
- tries = ['soft', 'hard']
+ tries = ['hard']
for mode in tries:
self.server.logger.info("Trying to reboot using the %r method.",
@@ -110,7 +110,7 @@ class Reset(object):
else:
raise ConnectError("Server keeps playing dead after reboot :-(")
- def reboot(self, mode='soft'):
+ def reboot(self, mode='hard'):
"""
Reboot the server, modes are "soft" for reboot by triggering Ctrl-Alt-
Del, "hard" for triggering a hardware reset and "manual" for requesting
@@ -124,6 +124,6 @@ class Reset(object):
'power': 'power',
}
- modekey = modes.get(mode, modes['soft'])
+ modekey = modes.get(mode, modes['hard'])
return self.conn.post('/reset/{0}'.format(self.server.number),
{'type': modekey})
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels