rancheros离线环境切换docker版本

在离线环境(RancherOS-v1.2.0)按照官网RancherOS文档操作切换docker版本报错,报错信息如下: [docker@rancher2-host01 ~]$ sudo ros engine list ERRO[0001] Failed to load https://raw.githubusercontent.com/rancher/os-services/v1.2.0/index.yml: Get https://raw.githubusercontent.com/rancher/os-services/v1.2.0/index.yml: read tcp 10.20.0.102:54214->151.101.0.133:443: read: connection reset by peer  看情况是要Get外网的index.yml文件,由于无法连接外网导致的问题。
已邀请:

niusmallnan

赞同来自: weiweinews

RancherOS里面的engine和service的定义在  os-services
不同的版本对应不同的分支,我们这里直接使用了github的CDN来提供文件访问服务。
你可以clone对应的分支,把内容放到你们内部的web服务上。
 
然后在RancherOS中重新指定os-services的地址,
修改这个地址可以直接修改RancherOS中/usr/share/ros/os-config中的repositories.core.url
RancherOS重启之后,docker-server无法正常启动,查看版本信息如下:
[docker@rancher2-host01 ~]$ docker version
Client:
 Version:      1.12.6
 API version:  1.24
 Go version:   go1.6.4
 Git commit:   78d1802
 Built:        Wed Jan 11 00:23:16 2017
 OS/Arch:      linux/amd64
Cannot connect to the Docker daemon. Is the docker daemon running on this host?
/var/log/system-docker.log有如下报错信息,但是/usr/lib/os-release这个文件是存在的,这是一个软链接文件,直接链接到/usr/share/ros/os-release文件
time="2018-04-11T07:20:57.140566220Z" level=warning msg="Could not get operating system name: Error opening /usr/lib/os-release: open /usr/lib/os-release: no such file or directory" 
/var/log/docker.log有如下报错信息[docker@rancher2-host01 log]$ cat docker.log |grep level=err  
time="2018-04-11T04:33:20.326930474Z" level=error msg="devmapper: Udev sync is not supported. This will lead to data loss and unexpected behavior. Install a dynamic binary to use devicemapper or select a different storage driver. For more information, see https://docs.docker.com/engine/reference/commandline/daemon/#daemon-storage-driver-option" 

要回复问题请先登录注册