woluty
#1
【 使用环境 】 测试环境
【 OB or 其他组件 】 社区版OCP
【 使用版本 】 4.0.0
【问题描述】安装部署社区版OCP,在OCP安装交互界面中,输入相关参数执行task任务后,提示docker命令失败。具体提示如下:
2023-02-22 11:30:22 - INFO - 14 - [ocp_precheck.py:29] - precheck for ocp on host 100.98.1.123 failed
2023-02-22 11:30:22 - INFO - 14 - [ocp_precheck.py:32] - ocp precheck result: e[32mMachine Role: ocp e[0m
e[32mPeer IP List: e[0m
e[32mMachine Type: PHY e[0m
e[32mInspect Mode: FALSE e[0m
check CPU count: 8 > 8 …e[32m PASS e[0m
check total MEM: 31 GB < 32 GB … EXPECT >= 32 GB …e[31m FAIL e[0m
e[33mTIPS: replace another machine with more MEMe[0m
check linux version: CentOS Linux release 7.8.2003 (Core) …e[32m PASS e[0m
check SELinux status: Disabled …e[32m PASS e[0m
check account [admin] and home dir, exist …e[32m PASS e[0m
check service [firewalld]: inactive …e[32m PASS e[0m
check service [firewalld]: disabled …e[32m PASS e[0m
check docker version: , NOT found … EXPECT docker …e[31m FAIL e[0m
e[33mTIPS: install docker service, version >= 1.12.6e[0m
SUMMARY OF ISSUES IN PRE-CHECK
check total MEM: 31 GB < 32 GB … EXPECT >= 32 GB …e[31m FAIL e[0m
e[33mTIPS: replace another machine with more MEMe[0m
check docker version: , NOT found … EXPECT docker …e[31m FAIL e[0m
e[33mTIPS: install docker service, version >= 1.12.6e[0m
, /tmp/precheck-47e5ecaa-405b-4fb1-964c-8b301ce07c9f.sh: line 1114: docker: command not found
2023-02-22 11:30:23 - INFO - 14 - [image_load.py:21] - check image got result: 1 sudo: docker: command not found
2023-02-22 11:31:50 - INFO - 14 - [image_load.py:31] - load image got result: 1 sudo: docker: command not found
2023-02-22 11:31:50 - ERROR - 14 - [image_load.py:33] - load docker image reg.docker.alibaba-inc.com/oceanbase/ocp-all-in-one:4.0.0-ce-bp1-20230119103000 from file /tmp/ocp-73af9224-1249-43c9-89d2-430d66c2fb93.tar.gz failed, got exception sudo: docker: command not found
目标主机100.98.1.123 为centos 7.8 ,已经安装docker,docker版本为
[root@cris_100 tmp]# docker version
Client:
Version: 20.10.9
将docker配置为普通用户admin可执行,仍然提示失败。
请大神们帮忙分析看看
秃蛙
#4
执行以下语句看下
(1)which docker
(2)docker --version
(3)systemctl status docker
或者指向下环境变量看看/etc/profile
woluty
#5
感谢支持!
具体信息如下:
[root@cris_100 ~]# grep docker /etc/profile
export PATH=/opt/docker-20.10.9/:$JAVA_HOME/bin:$PATH
[root@cris_100 ~]# which docker
/opt/docker-20.10.9/docker
[root@cris_100 ~]# docker --version
Docker version 20.10.9, build c2ea9bc
[root@cris_100 ~]# docker info
Client:
Context: default
Debug Mode: false
Server:
Containers: 0
Running: 0
Paused: 0
Stopped: 0
Images: 0
Server Version: 20.10.9
Storage Driver: overlay2
Backing Filesystem: xfs
Supports d_type: true
Native Overlay Diff: true
userxattr: false
Logging Driver: json-file
Cgroup Driver: cgroupfs
Cgroup Version: 1
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
Swarm: inactive
Runtimes: runc io.containerd.runc.v2 io.containerd.runtime.v1.linux
Default Runtime: runc
Init Binary: docker-init
containerd version: 5b46e404f6b9f661a205e28d59c982d3634148f8
runc version: v1.0.2-0-g52b36a2d
init version: de40ad0
Security Options:
seccomp
Profile: default
Kernel Version: 3.10.0-1127.19.1.el7.x86_64
Operating System: CentOS Linux 7 (Core)
OSType: linux
Architecture: x86_64
CPUs: 8
Total Memory: 31.42GiB
Name: cris_100.98.1.123
ID: 4C4V:RZJM:JT4A:QHK2:IFZS:KSES:2WEI:DOPG:7NFL:MKFR:L2IV:TM6T
Docker Root Dir: /var/lib/docker
Debug Mode: false
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
Product License: Community Engine
[root@cris_100 ~]#
秃蛙
#6
看下这个环境变量
env|grep PATH
或建个软连接
docker命令软连接到/usr/bin/docker
1 个赞
woluty
#7
感谢支持!
目前通过软链接配置后,已经可以正常加载ocp镜像了,通过ocp的启动程序,可以看到ocp启动进程重新定义了一个PATH环境变量。
bash -c export PATH=/sbin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:$PATH; sudo docker run --rm --net=host --workdir=/home/admin/ocp-init/src/ocp-init --entrypoint=python -e PYTHONUNBUFFERED=1 -e TABLEGROUP_NAME=meta_database reg.docker.alibaba-inc.com/oceanbase/ocp-all-in-one:4.0.0-ce-bp1-20230119103000 …
秃蛙
#8
好的,docker应该不是直接yum安装的吧,后续有问题可以再反馈。
woluty
#9
是的,docker 不是通过yum 或者rpm包安装的,通过binary的方式直接下载到指定目录,通过/etc/profile配置了环境变量的。
另外再请教下:我通过图形界面部署OCP的,密码都是正常输入,但是登录OCP平台的用户一直报错。请问ocp登录用户有默认密码的吗?还是说与部署的时候输入的密码一致的呢?
woluty
#10
系统默认密码是:admin/system 用户的默认密码调整为了 aaAA11__ 这个吗?