Juju-reboot hook tool works on ubuntu but not on centos

I have created a simple test charm, using ubuntu focal and the lxd provider, and can verify that juju-reboot works as expected in that configuration.

Moving over to a MAAS cloud, and using centos7 as the os/series, juju-reboot seems to shut down the unit-agents, but doesn’t reboot the node.

juju-reboot and juju-reboot --now yield the same result, with the node never rebooting.

Any ideas on what is going on here, or how I might go about introspecting this further?

EDIT:

I ran another test, deploying my reboot test charm on a centos7 and on ubuntu focal using MAAS, and found that the focal node reboots as expected and the centos7 node (as expected) does not reboot.

1 Like

juju-reboot ends up calling at -f reboot.sh now, with reboot.sh being

#!/bin/bash
sleep 15
shutdown -r now

I don’t have CentOS but I imagine this is rather Debian-specific. Maybe it needs updating to call systemctl if systemd is pid 1.

@chipaca thanks for the response. bug filed here

thank you

shutdown is a pretty old command. I just spun up a CentOS machine and ran “shutdown -r now” on it, and all was well.

Something else must be breaking w/ juju reboot. :-/

Thanks. I verified this command works on centos7/8 boxes also.