Skip to content
This repository has been archived by the owner on Oct 11, 2023. It is now read-only.

Shutdown -r now halted VM #2074

Closed
rgruyters opened this issue Sep 5, 2017 · 5 comments · Fixed by #2138
Closed

Shutdown -r now halted VM #2074

rgruyters opened this issue Sep 5, 2017 · 5 comments · Fixed by #2138

Comments

@rgruyters
Copy link

RancherOS Version: (ros os version)
version 1.1.0

Where are you running RancherOS? (docker-machine, AWS, GCE, baremetal, etc.)
ESX 5.5 (vSphere)

When you do a sudo shutdown -r now it halts the VM rather than a reboot.

@SvenDowideit
Copy link
Contributor

the shutdown command is a really incomplete thing - I think it just ignores the -r

@gizmotronic
Copy link
Contributor

I can confirm the same problem. As a workaround, sudo reboot works fine.

@vancluever
Copy link
Contributor

Looking into this as part of #2121. Args are being ignored for sure, but it's specifically when the shutdown container is launched. Right now runDocker is not deriving its command arguments correctly, I have a fix which I will put in my PR as well.

You can see the specfiic power command go from LINUX_REBOOT_CMD_RESTART to LINUX_REBOOT_CMD_POWER_OFF in the extra log bits I put in below.

[            ] shutdown:info: power command is 0x1234567
[            ] shutdown:info: Setting /sbin/shutdown timeout to 60 (rancher.shutdown_timeout set to 60)
..�:[            ] shutdown:info: power command is 0x4321fedc
�b[            ] shutdown:info: Setting shutdown timeout to 60 (rancher.shutdown_timeout set to 60)
.�;[            ] shutdown:info: Stopping /ntp : 9a7ee89680bc
.�@.[            ] shutdown:info: Stopping /network : eb8309c55d8b
.�=.[            ] shutdown:info: Stopping /udev : e9d9d424e2c8
.�>.[            ] shutdown:info: Stopping /acpid : c70b4b5abbea
�>[            ] shutdown:info: Stopping /syslog : 0aa45d076f63
.�?.[            ] shutdown:info: Stopping /docker : b41522ed9f36
..........�M..........[            ] shutdown:info: Stopping /system-cron : 378f9eb375de
.[   59.991950] reboot: Power down

@janeczku
Copy link
Contributor

janeczku commented Jan 19, 2018

Reproduced on v1.1.3 (VMware ESXi guest):
sudo shutdown -r now has inconsistent behaviour and results in machine powered off state instead of reboot 2 out of 5 times).
@niusmallnan

@kingsd041
Copy link
Contributor

Tested with Rancheros v1.2.0-rc2.
Now we can restart rancheros using shutdown -r now.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants