rancher / os

Tiny Linux distro that runs the entire OS as Docker containers
https://rancher.com/docs/os/v1.x/en/
Apache License 2.0
6.45k stars 657 forks source link

ROS 1.0.4 shutdown doesn't give useful error on wrong argument order #2050

Open clemenko opened 7 years ago

clemenko commented 7 years ago

RancherOS Version: (ros os version) [root@rancher ~]# ros os list rancher/os:v1.0.4 local latest running

Where are you running RancherOS? (docker-machine, AWS, GCE, baremetal, etc.) vmware fusion on High Sierra Beta 5.

[root@rancher ~]# uname -a
Linux rancher 4.9.40-rancher #1 SMP Fri Jul 28 04:17:20 UTC 2017 x86_64 GNU/Linux
[root@rancher ~]# docker -v
Docker version 17.06.0-ce, build 02c1d87
[root@rancher ~]# id             
uid=0(root) gid=0(root) groups=0(root),10(wheel)
[root@rancher ~]# shutdown now -h
> ERRO[0000] EOF                                          
[root@rancher ~]# date
Wed Aug 16 15:22:48 UTC 2017
clemenko commented 7 years ago

halt works.

SvenDowideit commented 7 years ago

@clemenko it looks like the arg parsing and error output isn't good.

however - the command needs to be the other way around :/

sudo shutdown -h now

sven@y260:~$ machine ssh sven2050
[rancher@sven2050 ~]$ shutdown --help
Incorrect Usage.

NAME:
   shutdown - shutdown RancherOS
built: '2017-08-08T00:05:15Z'

USAGE:
   shutdown [global options] [arguments...]

VERSION:
   v1.0.4

AUTHOR(S):
   Rancher Labs, Inc. 

GLOBAL OPTIONS:
   -r value, -R value  reboot after shutdown
   -h value            halt the system
   --version, -v       print the version

[rancher@sven2050 ~]$ shutdown -h now
FATA[0000] shutdown: Need to be root                    
[rancher@sven2050 ~]$ sudo shutdown -h now
t> time="2017-08-17T16:47:49Z" level=info msg="Setting shutdown timeout to 60 (rancher.shutdown_timeout set to 60)" 
P> time="2017-08-17T16:47:49Z" level=info msg="Stopping /docker : f7bcf762d3bb" 
X...........> time="2017-08-17T16:47:50Z" level=info msg="Stopping /ntp : 186e8a30d8d3" 
R.> time="2017-08-17T16:47:50Z" level=info msg="Stopping /network : c0f4219fa466" 
O.> time="2017-08-17T16:47:50Z" level=info msg="Stopping /udev : b68d9637d5ae" 
O> time="2017-08-17T16:47:50Z" level=info msg="Stopping /acpid : e8152fecb4f3" 
Q.> time="2017-08-17T16:47:50Z" level=info msg="Stopping /syslog : 634c4a80d7af" 
\.> time="2017-08-17T16:47:50Z" level=info msg="Console Stopping [/console] : 6ea4855239a9" 
Connection to 54.183.140.70 closed by remote host.
exit status 255
clemenko commented 7 years ago

Confirmed that shutdown -h now works.