-
Notifications
You must be signed in to change notification settings - Fork 36
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
Handle DELL servers that don't have reboot option #11
Comments
This is also related to #6, in the sense that it should at least not error out when trying to activate the rescue system when it's not available. In the long term it would be good to be able to reset even those servers as well, so it would be great if you could do an implementation of that. I unfortunately don't have one of those servers, so I can't test it. |
Running into the same error when trying to reboot a new AX51-NVMe server into the rescue system. I am able to reboot the server using a hard reset from the robot interface. $ hetznerctl list
<MACHINE_IP> (id: <MACHINE_ID>, model: AX51-NVMe, name: sanctum)
$ hetznerctl rescue <MACHINE_IP> --debug
Robot of #<USERNAME>: Sending GET request to Robot at /server/<MACHINE_IP> with data None.
Robot of #<USERNAME>: Got response from Robot with status 200 and data {'server': {'server_ip': '<MACHINE_IP>', 'server_number': <MACHINE_ID>, 'server_name': 'sanctum', 'product': 'AX51-NVMe', 'dc': 'FSN1-DC16', 'traffic': 'unlimited', 'status': 'ready', 'cancelled': False, 'paid_until': '2021-05-20', 'ip': ['<MACHINE_IP>'], 'subnet': [{'ip': '2a01:4f8:252:641::', 'mask': '64'}], 'reset': True, 'rescue': True, 'vnc': True, 'windows': False, 'plesk': False, 'cpanel': False, 'wol': True, 'hot_swap': False, 'linked_storagebox': None}}.
Robot of #<USERNAME>: Sending GET request to Robot at /boot/<MACHINE_IP>/rescue with data None.
Robot of #<USERNAME>: Got response from Robot with status 200 and data {'rescue': {'server_ip': '<MACHINE_IP>', 'server_number': <MACHINE_ID>, 'os': 'linux', 'arch': 64, 'active': True, 'password': 'uRYKN3rQ2uy8je', 'authorized_key': [], 'host_key': [], 'boot_time': None}}.
Server #<MACHINE_ID>: Tring to reboot using the 'soft' method.
Robot of #<USERNAME>: Sending POST request to Robot at /reset/<MACHINE_IP> with data 'type=sw'.
Robot of #<USERNAME>: Got response from Robot with status 400 and data {'error': {'status': 400, 'code': 'INVALID_INPUT', 'message': 'invalid input', 'missing': None, 'invalid': ['type']}}.
Traceback (most recent call last):
File "/nix/store/qfclbwcv47ywcqcmkjg3fnnfp4d7davx-python3.8-hetzner-0.8.3/bin/.hetznerctl-wrapped", line 415, in <module>
main()
File "/nix/store/qfclbwcv47ywcqcmkjg3fnnfp4d7davx-python3.8-hetzner-0.8.3/bin/.hetznerctl-wrapped", line 411, in main
subcommand.execute(robot, parser, args)
File "/nix/store/qfclbwcv47ywcqcmkjg3fnnfp4d7davx-python3.8-hetzner-0.8.3/bin/.hetznerctl-wrapped", line 106, in execute
server.rescue.shell(**kwargs)
File "/nix/store/qfclbwcv47ywcqcmkjg3fnnfp4d7davx-python3.8-hetzner-0.8.3/lib/python3.8/site-packages/hetzner/server.py", line 137, in shell
self.observed_activate(*args, **kwargs)
File "/nix/store/qfclbwcv47ywcqcmkjg3fnnfp4d7davx-python3.8-hetzner-0.8.3/lib/python3.8/site-packages/hetzner/server.py", line 115, in observed_activate
self.server.observed_reboot(*args, **kwargs)
File "/nix/store/qfclbwcv47ywcqcmkjg3fnnfp4d7davx-python3.8-hetzner-0.8.3/lib/python3.8/site-packages/hetzner/server.py", line 453, in observed_reboot
return self.reset.observed_reboot(*args, **kwargs)
File "/nix/store/qfclbwcv47ywcqcmkjg3fnnfp4d7davx-python3.8-hetzner-0.8.3/lib/python3.8/site-packages/hetzner/reset.py", line 53, in observed_reboot
self.reboot(mode)
File "/nix/store/qfclbwcv47ywcqcmkjg3fnnfp4d7davx-python3.8-hetzner-0.8.3/lib/python3.8/site-packages/hetzner/reset.py", line 109, in reboot
return self.conn.post('/reset/{0}'.format(self.server.ip),
File "/nix/store/qfclbwcv47ywcqcmkjg3fnnfp4d7davx-python3.8-hetzner-0.8.3/lib/python3.8/site-packages/hetzner/robot.py", line 371, in post
return self.request('POST', path, data)
File "/nix/store/qfclbwcv47ywcqcmkjg3fnnfp4d7davx-python3.8-hetzner-0.8.3/lib/python3.8/site-packages/hetzner/robot.py", line 365, in request
raise RobotError(err, response.status)
hetzner.RobotError: 400 - invalid input, fields: type (400) |
Hi!
We're using now new DELL servers and got some problems with the library.
One of the problems is the encoding, I see @dangra commited a pull request, and I commited another.
The other is that DELL servers don't have a reboot command available cause they have a second interface with its own IP, where the user can reboot the server, even cool boots.
When we try to enable rescue mode, it fails with the error:
on line 500:
The rescue mode is enabled, but we never get the password unless we do a 'info'.
I'm now testing some code to allow a reboot via ssh when DELL server is detected, but maybe the best is just to inform the user to reboot the server manually. What do you think?
I can provide my code as a pull request and then you decide what to do.
Regards,
Luar
The text was updated successfully, but these errors were encountered: