本文简述 OAT 接管组件遇到 metadb 命名问题,idc/region 不匹配问题,sys 密码不对等问题的解答。
适用版本
OAT V4.x 版本。
问题 1:Metadb 命名问题

解决方法:修改容器名对进程无影响。
docker rename META_OB_ZONE1 metadb
问题 2:Metadb root@sys 密码问题

OAT 获取密码方式
[root@ocp127 ~]# docker exec -it oat_4.0.0 bash
[root@ocp127 oat]# python3 manage.py shell <<< "from oat.models import Component; print(Component.objects.filter(type='metadb').first().config.get('sys_root_password'))"
[root@ocp127 oat]# python3 manage.py shell <<< "from oat.models import Product; print(Product.objects.filter(type='ocp').first().config.get('metadb_info')['meta_tenant']['password'])"
[root@ocp127 oat]# python3 manage.py shell <<< "from oat.models import Product; print(Product.objects.filter(type='ocp').first().config.get('metadb_info')['monitor_tenant']['password'])"
IDC/Region 不匹配问题

root@sys 登录 Metadb 这个的返回结果需要和 OAT 上的主机属性保持一致。
登录 OAT 元数据库,进到 oat 容器内。
python3 manage.py dbshell
# 确认
select * from oat_idc;