【 使用环境 】测试环境
【 OB or 其他组件 】ocp
【 使用版本 】ocp-3.3.0-ce-bp1-aarch64
【问题描述】使用ocp_installer.sh部署ocp失败
【复现路径】
【问题现象及影响】
执行安装命令:
[root@localhost ocp-3.3.0-ce-bp1-aarch64]# ./ocp_installer.sh install -c config.yaml -i ./ocp-installer.tar.gz -o ./ocp.tar.gz
报错如下
install start
check docker on host
load installer docker image
Loaded image: reg.docker.alibaba-inc.com/ocp2/ocp-installer:3.3.0-aarch64
make log dir
make obd dir
2022-08-29 17:17:20 - INFO - 1 - [ob_precheck.py:28] - ob precheck using command: sudo /tmp/precheck-907fd56b-3058-4ffa-8bb2-756011a7e190.sh -m ob
2022-08-29 17:17:20 - INFO - 1 - [ob_precheck.py:34] - precheck for ocp on host 192.168.20.160 success
2022-08-29 17:17:20 - INFO - 1 - [ob_precheck.py:35] - ob precheck result: Machine Role: ob
Peer IP List:
Machine Type: PHY
Inspect Mode: FALSE
check CPU count: 24 > 8 ... PASS
check total MEM: 64 GB > 64 GB ... PASS
check SELinux status: Disabled ... PASS
check account [admin] and home dir, exist ... PASS
check service [firewalld]: inactive ... PASS
check service [firewalld]: disabled ... PASS
,
2022-08-29 17:17:20 - INFO - 1 - [ob_install.py:82] - clean obd dir
2022-08-29 17:17:20 - INFO - 1 - [ob_install.py:91] - install ob using obd
2022-08-29 17:17:20 - INFO - 1 - [ob_install.py:95] - deploy task with config:obproxy-ce:
depends:
- oceanbase-ce
global:
home_path: /home/admin/obproxy
listen_port: 2883
servers:
- 192.168.20.160
oceanbase-ce:
global:
appname: obcluster
data_dir: /data/1
devname: enp3s16
home_path: /home/admin/oceanbase
mysql_port: 2881
redo_dir: /data/log1
root_password: DXnb2022
rpc_port: 2882
server1:
zone: zone1
servers:
- ip: 192.168.20.160
name: server1
user:
key_file: ''
password: DXnb2022
port: 22
timeout: 10
username: root
2022-08-29 17:17:20 - INFO - 1 - [ob_install.py:100] - deploy obcluster command: obd cluster autodeploy obcluster -c /tmp/ocp_cluster.yaml
2022-08-29 17:18:11 - INFO - 1 - [ob_install.py:71] - create meta tenant with command obd cluster tenant create obcluster -n meta_tenant --max-cpu 2 --min-cpu 2 --max-memory 4294967296 --min-memory 4294967296
2022-08-29 17:18:16 - INFO - 1 - [ob_install.py:76] - create monitor tenant with command obd cluster tenant create obcluster -n monitor_tenant --max-cpu 4 --min-cpu 4 --max-memory 8589934592 --min-memory 8589934592
2022-08-29 17:18:19 - ERROR - 1 - [ob_install.py:79] - create monitor tenant got result ret_code: 1, stdout: Get local repositories and plugins ok
Open ssh connection ok
Connect to observer ok
Create tenant monitor_tenant x
[ERROR] resource not enough: memory (Avail: 1.6G, Need: 8.0G)
See https://open.oceanbase.com/docs/obd-cn/V1.4.0/10000000000436999 .
, stderr:
Traceback (most recent call last):
File "install_ocp.py", line 43, in <module>
run(context)
File "install_ocp.py", line 33, in run
install_ocp_pipeline.run()
File "/root/installer/pipeline.py", line 10, in run
task.run()
File "/root/installer/task/ob_install.py", line 147, in run
self.create_tenant()
File "/root/installer/task/ob_install.py", line 80, in create_tenant
raise Exception("create monitor tenant failed")
Exception: create monitor tenant failed
config.yaml如下
# # precheck 会对部署主机的资源和环境进行检查判断,来查看宿主机是否满足一般情况下的部署需求,一般不建议忽略 precheck。如果受限于机器资源,或者仅作为测试使用,可以选择忽略
precheck_ignore: false
# METADB 集群相关配置
# 当 create_metadb_cluster 设置为 true 时,会单独创建一个 OB 集群作为 OCP 的 metadb
create_metadb_cluster: true
# 当卸载 OCP 时是否删除 meta obcluster,当这个配置项没有配置的时候,会根据 create_metadb_cluster 来判断
clean_metadb_cluster: true
# metadb ob 集群的配置
ob_cluster:
name: obcluster
home_path: /home/admin/oceanbase
root_password: 'DXnb2022'
# 数据存放目录,建议单独设置
data_path: /data/1
# clog, ilog 和 slog 的目录,建议单独设置
redo_path: /data/log1
sql_port: 2881
rpc_port: 2882
# ob 集群的所有zone
zones:
# zone 名字
- name: zone1
# zone 下的所有 server
servers:
- 192.168.20.160
custom_config:
- key: devname
value: enp3s16
# meta 用户相关配置
meta:
# 租户名
tenant: meta_tenant
# 用户名
user: meta_user
# 用户密码
password: DXnb2022
# meta database 名
database: meta_database
# 租户的 CPU
cpu: 2
# 租户的内存,单位是 GB
memory: 4
# monitor 用户相关配置
monitor:
# 租户名
tenant: monitor_tenant
# 用户名
user: monitor_user
# 用户密码
password: DXnb2022
# monitor database 名
database: monitor_database
# 租户的 CPU
cpu: 4
# 租户的内存,单位是 GB
memory: 8
# metadb obproxy 的配置
obproxy:
# obproxy 的安装路径
home_path: /home/admin/obproxy
# obproxy 的监听端口
port: 2883
# obproxy 部署的 server
servers:
- 192.168.20.160
# VIP 地址,如果有多个obproxy,一般需要一个vip来做负载均衡,如果不配置,会选择一个obproxy的地址
# vip:
# address: 192.168.0.1
# port: 2883
## SSH 认证相关配置
ssh:
port: 22
user: root
# 认证方式,支持 password 或者 pubkey
auth_method: password
timeout: 10
password: DXnb2022
# OCP 相关配置
ocp:
# OCP 容器的名字
name: 'ocp'
# OCP 进程相关配置,包括端口号和日志路径
process:
# OCP 进程监听端口
port: 8080
# OCP 日志文件在宿主机上的路径
log_dir: /tmp/ocp/log
# OCP 部署的主机
servers:
- 192.168.20.160
# OCP 容器的资源限制
resource:
cpu: 4
# 内存资源限制,单位是 GB
memory: 8
# OCP VIP 配置,如果不配置,会选择一个 OCP 主机的地址
# vip:
# address: 192.168.0.1
# port: 8080
# OCP 认证配置,在升级场景下会使用
auth:
user: admin
password: DXnb2022
# OCP metadb 的配置信息,如果在上面配置了创建一个单独的 metadb 集群,会使用创建的集群的信息
metadb:
host: 192.168.20.160
port: 2883
meta_user: meta_user@meta_tenant#obcluster
meta_password: DXnb2022
meta_database: meta_database
monitor_user: monitor_user@monitor_tenant#obcluster
monitor_password: DXnb2022
monitor_database: monitor_database
服务器配置24c64g