ocp-all-in-one-4.2.1安装预检查卡住

【 使用环境 】生产环境
【 OB or 其他组件 】ocp
【 使用版本 】ocp-all-in-one-4.2.1-20231208144448.el7.aarch64.tar.gz
【问题描述】按照手册在物理机上安装OCP,目录均按照要求创建,admin用户检查已有sudo权限。在预检查处6/33卡住,web页面无报错。后台报错日志如下:

2024-02-26 11:30:50,488 INFO dispatch (request_response_log.py:40) [b2912370261143b987a961975486122b] app receive request, method: GET, url: http://172.21.21.18:8680/api/v1/ocp/deployments/1/precheck/1?id=1&task_id=1, query_params: id=1&task_id=1, body: , from: 172.21.22.94:61653
2024-02-26 11:30:50,489 INFO get_precheck_result (ocp_handler.py:494) [b2912370261143b987a961975486122b] get ocp precheck result
2024-02-26 11:30:50,489 INFO get_precheck_result (ocp_handler.py:528) [b2912370261143b987a961975486122b] namespace_union: {<_deploy.ServerConfig object at 0xffff80e938b0>: {'port': <_errno.CheckStatus object at 0xffff7e30c820>, 'mem': <_errno.CheckStatus object at 0xffff7e30c700>, 'disk': <_errno.CheckStatus object at 0xffff7e30c610>, 'ulimit': <_errno.CheckStatus object at 0xffff7e30ca60>, 'aio': <_errno.CheckStatus object at 0xffff7e30c400>, 'net': <_errno.CheckStatus object at 0xffff7e30c2e0>, 'ntp': <_errno.CheckStatus object at 0xffff7e30c7c0>, 'ocp meta db': <_errno.CheckStatus object at 0xffff7e30c220>, 'vm.max_map_count': <_errno.CheckStatus object at 0xffff7e30cc70>, 'vm.min_free_kbytes': <_errno.CheckStatus object at 0xffff7e30cdf0>, 'vm.overcommit_memory': <_errno.CheckStatus object at 0xffff7e30c310>, 'fs.file-max': <_errno.CheckStatus object at 0xffff7e30c8e0>, 'dir': <_errno.CheckStatus object at 0xffff7e30caf0>, 'param': <_errno.CheckStatus object at 0xffff7ceb5070>, 'ssh': <_errno.CheckStatus object at 0xffff7ffdcaf0>}}
2024-02-26 11:30:50,490 INFO parse_precheck_result (ocp_handler.py:553) [b2912370261143b987a961975486122b] precheck result current: oceanbase-ce:port
2024-02-26 11:30:50,490 INFO parse_precheck_result (ocp_handler.py:553) [b2912370261143b987a961975486122b] precheck result current: oceanbase-ce:mem
2024-02-26 11:30:50,490 INFO parse_precheck_result (ocp_handler.py:553) [b2912370261143b987a961975486122b] precheck result current: oceanbase-ce:disk
2024-02-26 11:30:50,490 INFO parse_precheck_result (ocp_handler.py:553) [b2912370261143b987a961975486122b] precheck result current: oceanbase-ce:ulimit
2024-02-26 11:30:50,490 INFO parse_precheck_result (ocp_handler.py:553) [b2912370261143b987a961975486122b] precheck result current: oceanbase-ce:aio
2024-02-26 11:30:50,490 INFO parse_precheck_result (ocp_handler.py:553) [b2912370261143b987a961975486122b] precheck result current: oceanbase-ce:net
2024-02-26 11:30:50,491 INFO parse_precheck_result (ocp_handler.py:553) [b2912370261143b987a961975486122b] precheck result current: oceanbase-ce:ntp
2024-02-26 11:30:50,491 INFO parse_precheck_result (ocp_handler.py:553) [b2912370261143b987a961975486122b] precheck result current: oceanbase-ce:ocp meta db
2024-02-26 11:30:50,491 INFO parse_precheck_result (ocp_handler.py:553) [b2912370261143b987a961975486122b] precheck result current: oceanbase-ce:vm.max_map_count
2024-02-26 11:30:50,491 INFO parse_precheck_result (ocp_handler.py:553) [b2912370261143b987a961975486122b] precheck result current: oceanbase-ce:vm.min_free_kbytes
2024-02-26 11:30:50,491 INFO parse_precheck_result (ocp_handler.py:553) [b2912370261143b987a961975486122b] precheck result current: oceanbase-ce:vm.overcommit_memory
2024-02-26 11:30:50,491 INFO parse_precheck_result (ocp_handler.py:553) [b2912370261143b987a961975486122b] precheck result current: oceanbase-ce:fs.file-max
2024-02-26 11:30:50,492 INFO parse_precheck_result (ocp_handler.py:553) [b2912370261143b987a961975486122b] precheck result current: oceanbase-ce:dir
2024-02-26 11:30:50,492 INFO parse_precheck_result (ocp_handler.py:553) [b2912370261143b987a961975486122b] precheck result current: oceanbase-ce:param
2024-02-26 11:30:50,492 INFO parse_precheck_result (ocp_handler.py:553) [b2912370261143b987a961975486122b] precheck result current: oceanbase-ce:ssh
2024-02-26 11:30:50,492 INFO get_precheck_result (ocp_handler.py:528) [b2912370261143b987a961975486122b] namespace_union: {<_deploy.ServerConfig object at 0xffff80e938b0>: {'port': <_errno.CheckStatus object at 0xffff7e30c790>, 'dir': <_errno.CheckStatus object at 0xffff7e30c940>, 'param': <_errno.CheckStatus object at 0xffff7fce17f0>, 'ssh': <_errno.CheckStatus object at 0xffff7ffdcaf0>}}
2024-02-26 11:30:50,492 INFO parse_precheck_result (ocp_handler.py:553) [b2912370261143b987a961975486122b] precheck result current: obproxy-ce:port
2024-02-26 11:30:50,492 INFO parse_precheck_result (ocp_handler.py:553) [b2912370261143b987a961975486122b] precheck result current: obproxy-ce:dir
2024-02-26 11:30:50,493 INFO parse_precheck_result (ocp_handler.py:553) [b2912370261143b987a961975486122b] precheck result current: obproxy-ce:param
2024-02-26 11:30:50,493 INFO parse_precheck_result (ocp_handler.py:553) [b2912370261143b987a961975486122b] precheck result current: obproxy-ce:ssh
2024-02-26 11:30:50,493 INFO get_precheck_result (ocp_handler.py:528) [b2912370261143b987a961975486122b] namespace_union: {<_deploy.ServerConfig object at 0xffff80e938b0>: {'metadb connect': <_errno.CheckStatus object at 0xffff7cdc4c10>, 'port': <_errno.CheckStatus object at 0xffff7cdc4c70>, 'java': <_errno.CheckStatus object at 0xffff7cdc4cd0>, 'disk': <_errno.CheckStatus object at 0xffff7cdc4eb0>, 'mem': <_errno.CheckStatus object at 0xffff7cdc4ee0>, 'oceanbase version': <_errno.CheckStatus object at 0xffff7cdc4f40>, 'time check': <_errno.CheckStatus object at 0xffff7cdc4fa0>, 'launch user': <_errno.CheckStatus object at 0xffff7cdc4a60>, 'sudo nopasswd': <_errno.CheckStatus object at 0xffff80e93cd0>, 'tenant': <_errno.CheckStatus object at 0xffff80e93d30>, 'clockdiff': <_errno.CheckStatus object at 0xffff80e933d0>, 'dir': <_errno.CheckStatus object at 0xffff80e93bb0>, 'param': <_errno.CheckStatus object at 0xffff7fce1310>, 'ssh': <_errno.CheckStatus object at 0xffff7ffdcaf0>}}
2024-02-26 11:30:50,493 INFO parse_precheck_result (ocp_handler.py:553) [b2912370261143b987a961975486122b] precheck result current: ocp-server-ce:metadb connect
2024-02-26 11:30:50,493 INFO parse_precheck_result (ocp_handler.py:553) [b2912370261143b987a961975486122b] precheck result current: ocp-server-ce:port
2024-02-26 11:30:50,493 INFO parse_precheck_result (ocp_handler.py:553) [b2912370261143b987a961975486122b] precheck result current: ocp-server-ce:java
2024-02-26 11:30:50,494 INFO parse_precheck_result (ocp_handler.py:553) [b2912370261143b987a961975486122b] precheck result current: ocp-server-ce:disk
2024-02-26 11:30:50,494 INFO parse_precheck_result (ocp_handler.py:553) [b2912370261143b987a961975486122b] precheck result current: ocp-server-ce:mem
2024-02-26 11:30:50,494 INFO parse_precheck_result (ocp_handler.py:553) [b2912370261143b987a961975486122b] precheck result current: ocp-server-ce:oceanbase version
2024-02-26 11:30:50,494 INFO parse_precheck_result (ocp_handler.py:553) [b2912370261143b987a961975486122b] precheck result current: ocp-server-ce:time check
2024-02-26 11:30:50,494 INFO parse_precheck_result (ocp_handler.py:553) [b2912370261143b987a961975486122b] precheck result current: ocp-server-ce:launch user
2024-02-26 11:30:50,494 INFO parse_precheck_result (ocp_handler.py:553) [b2912370261143b987a961975486122b] precheck result current: ocp-server-ce:sudo nopasswd
2024-02-26 11:30:50,495 INFO parse_precheck_result (ocp_handler.py:553) [b2912370261143b987a961975486122b] precheck result current: ocp-server-ce:tenant
2024-02-26 11:30:50,495 INFO parse_precheck_result (ocp_handler.py:553) [b2912370261143b987a961975486122b] precheck result current: ocp-server-ce:clockdiff
2024-02-26 11:30:50,495 INFO parse_precheck_result (ocp_handler.py:553) [b2912370261143b987a961975486122b] precheck result current: ocp-server-ce:dir
2024-02-26 11:30:50,495 INFO parse_precheck_result (ocp_handler.py:553) [b2912370261143b987a961975486122b] precheck result current: ocp-server-ce:param
2024-02-26 11:30:50,495 INFO parse_precheck_result (ocp_handler.py:553) [b2912370261143b987a961975486122b] precheck result current: ocp-server-ce:ssh
2024-02-26 11:30:50,504 INFO dispatch (request_response_log.py:43) [b2912370261143b987a961975486122b] app send response, code: 200

image

image

【复现路径】
【附件及日志】

另外,按照文档使用容器部署 OCP改用容器手动部署,

# start ocp container
docker run -d --name ocp-421 \
--network host \ 
--cpu-period 100000 --cpu-quota ${OCP_CPU_COUNT}00000 --memory=${OCP_MEMORY_GB}G \
 -e OCP_METADB_HOST="${OCP_METADB_HOST}" \
 -e OCP_METADB_PORT="${OCP_METADB_PORT}" \
 -e OCP_METADB_DBNAME="${OCP_METADB_DBNAME}" \
 -e OCP_METADB_USER="${OCP_METADB_USER}" \
 -e OCP_METADB_PASSWORD="${OCP_METADB_PASSWORD}" \
 -e OCP_MONITORDB_DBNAME="${OCP_MONITORDB_DBNAME}" \
 -e OCP_MONITORDB_USER="${OCP_MONITORDB_USER}" \
 -e OCP_MONITORDB_PASSWORD="${OCP_MONITORDB_PASSWORD}" \
 -e OCP_INITIAL_ADMIN_PASSWORD="${OCP_INITIAL_ADMIN_PASSWORD}" \
 -e OCP_CONFIG_PROPERTIES="${OCP_CONFIG_PROPERTIES}" \
oceanbase/ocp-ce:4.2.1

启动步骤是如何实现未load相关镜像就能够执行docker run 命令的?

obd日志麻烦提示下呢。

[2024-02-26 11:17:14.222] [d52f364c-d454-11ee-bc31-c05064761063] [DEBUG] md5: 080bd5dac6f6253fd2682331be3f1353856fd240
[2024-02-26 11:17:14.223] [d52f364c-d454-11ee-bc31-c05064761063] [ERROR] oceanbase-ce-py_script_generate_config-4.2.1.0 RuntimeError: 'ClusterConfig' object has no attribute 'get_deploy_added_components'
[2024-02-26 11:17:14.223] [d52f364c-d454-11ee-bc31-c05064761063] [ERROR] Traceback (most recent call last):
[2024-02-26 11:17:14.224] [d52f364c-d454-11ee-bc31-c05064761063] [ERROR]   File "service/handler/ocp_handler.py", line 418, in _precheck
[2024-02-26 11:17:14.224] [d52f364c-d454-11ee-bc31-c05064761063] [ERROR]   File "service/handler/ocp_handler.py", line 474, in _do_precheck
[2024-02-26 11:17:14.224] [d52f364c-d454-11ee-bc31-c05064761063] [ERROR]   File "core.py", line 184, in call_plugin
[2024-02-26 11:17:14.224] [d52f364c-d454-11ee-bc31-c05064761063] [ERROR]   File "_plugin.py", line 324, in __call__
[2024-02-26 11:17:14.224] [d52f364c-d454-11ee-bc31-c05064761063] [ERROR]   File "_plugin.py", line 286, in _new_func
[2024-02-26 11:17:14.224] [d52f364c-d454-11ee-bc31-c05064761063] [ERROR]   File "/root/.obd/plugins/oceanbase-ce/4.2.1.0/generate_config.py", line 99, in generate_config
[2024-02-26 11:17:14.224] [d52f364c-d454-11ee-bc31-c05064761063] [ERROR]     generate_random_password(cluster_config)
[2024-02-26 11:17:14.224] [d52f364c-d454-11ee-bc31-c05064761063] [ERROR]   File "/root/.obd/plugins/oceanbase-ce/4.2.1.0/generate_config.py", line 576, in generate_random_password
[2024-02-26 11:17:14.224] [d52f364c-d454-11ee-bc31-c05064761063] [ERROR]     add_components = cluster_config.get_deploy_added_components()
[2024-02-26 11:17:14.224] [d52f364c-d454-11ee-bc31-c05064761063] [ERROR] AttributeError: 'ClusterConfig' object has no attribute 'get_deploy_added_components'
[2024-02-26 11:17:14.224] [d52f364c-d454-11ee-bc31-c05064761063] [ERROR]
[2024-02-26 11:30:51.709] [d52f364c-d454-11ee-bc31-c05064761063] [INFO] stop OBD WEB
[2024-02-26 11:30:51.709] [d52f364c-d454-11ee-bc31-c05064761063] [INFO] Trace ID: d52f364c-d454-11ee-bc31-c05064761063
[2024-02-26 11:30:51.709] [d52f364c-d454-11ee-bc31-c05064761063] [INFO] If you want to view detailed obd logs, please run: obd display-trace d52f364c-d454-11ee-bc31-c05064761063
[2024-02-26 11:30:51.710] [d52f364c-d454-11ee-bc31-c05064761063] [DEBUG] - unlock /root/.obd/lock/global
[2024-02-26 11:30:51.710] [d52f364c-d454-11ee-bc31-c05064761063] [DEBUG] - unlock /root/.obd/lock/mirror_and_repo
[2024-02-26 11:30:51.710] [d52f364c-d454-11ee-bc31-c05064761063] [DEBUG] - unlock /root/.obd/lock/deploy_ocp_db
[2024-02-26 11:30:51.710] [d52f364c-d454-11ee-bc31-c05064761063] [DEBUG] - unlock /root/.obd/lock/deploy_ocp_metadb
[2024-02-26 11:30:51.710] [d52f364c-d454-11ee-bc31-c05064761063] [DEBUG] - unlock /root/.obd/lock/deploy_35a1022eff4d482c877ffe13285b39b2

看起来像是执行generate_random_password,生成集群配置的随机密码的时候失败了

从obd报错的日志分析,应该是obd版本不匹配,麻烦提供一下obd版本,命令:obd --version。同时用obd update更新到最新版本再试试

[root@phy-248-9 log]# obd --version
OceanBase Deploy: 2.4.1
REVISION: 955d1eab27a5bd304669b6280c88dc4102c07bb4
BUILD_BRANCH: HEAD
BUILD_TIME: Dec 13 2023 11:34:27OURCE
Copyright (C) 2021 OceanBase
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

这个是all-in-one里面自带的obd,不应该会存在和这个安装包内不兼容的情况吧??

但日志中报错的是obd2.6.0的改动,还记得做了哪些操作吗

可能之前在这台机器装过4.2.0的OCP,我换个新环境再试试。谢谢豆子老师

可以试下obd update 升级obd版本呢。
支持在线和离线升级两种 使用 OBD 在线/离线升级 OceanBase 集群