1
0
mirror of https://github.com/rancher/os.git synced 2025-08-02 07:24:28 +00:00
os/cmd/control
Wang Long 6617eab12f print proper tips when running ros or system-docker without using sudo
`ros` and `system-docker` command requires user to be the root user,
when we running them without using sudo, it will print the follow:

[rancher@rancher ~]$ ros os list
ERRO[0000] Failed to read /var/lib/rancher/conf/cloud-config.d: open
/var/lib/rancher/conf/cloud-config.d: permission denied
ERRO[0000] Error reading config files                    err=open
/var/lib/rancher/conf/cloud-config.yml: permission denied
files=[/var/lib/rancher/conf/cloud-config.yml]
ERRO[0000] Failed [1/4] 25%
ERRO[0000] Failed to load config
......
......
FATA[0000] open /var/lib/rancher/conf/cloud-config.yml: permission
denied

and

[rancher@rancher ~]$ system-docker restart docker
Failed to kill container(docker): Cannot connect to the Docker daemon.
Is the docker daemon running on this host?

this patch make the tips more clear and simple.

Signed-off-by: Wang Long <long.wanglong@huawei.com>
2016-03-16 17:50:54 +08:00
..
cli.go print proper tips when running ros or system-docker without using sudo 2016-03-16 17:50:54 +08:00
config_test.go generate os-config.yml 2016-02-26 17:46:55 -08:00
config.go generate os-config.yml 2016-02-26 17:46:55 -08:00
dev.go Fix ros dev panic 2016-02-04 09:25:36 -07:00
env.go Replace rancherio with rancher 2015-10-12 19:50:57 +08:00
install.go Replace rancherio with rancher 2015-10-12 19:50:57 +08:00
os.go Kexec upgrade 2016-02-27 15:30:53 -08:00
selinux.go Rename SELinux tools image 2016-02-23 08:59:58 -08:00
service.go Replace rancherio with rancher 2015-10-12 19:50:57 +08:00
tlsconf.go Default dirs for TLS cert generation 2015-12-11 13:41:19 +05:00