【DWS跨region集群级容灾】创建容灾任务界面备集群信息不显示
1、问题现象
【现象1】在创建容灾任务界面,已经选择跨region容灾、备集群区域,但没有显示备集群项目ID和集群名称。
【现象2】备集群项目ID可以正常显示,选择其中一个ID,集群名称仍没有显示。
2、解决方案
【现象1】定位步骤及解决方案
步骤1 在管控面创建容灾任务无法显示备集群信息界面按F12。
步骤2 点击项目ID下拉框,获取返回接口及返回状态。
步骤3 在header中获取对应的tranceid。
步骤4 进入dwscontroller容器,cd log/ 查看ossres-dws.log中带有tranceid的报错信息。
步骤5 根据报错信息分析。
报错原因:主集群数据库rds_intance表中记录备集群信息与实际的备集群信息不一致,导致无法获取到备集群信息。
步骤6 查看原刷新数据库rds_intance表的sql,发现是有备集群信息收集的不对。重新收集正确的备集群信息。
步骤7 更新sql语句重新执行,刷新到rds_intance表中。
主region数据库插入:
insert into region_information (id, region_id, geo_category, display_name, endpoint, enabled, namespace, available_region)
values(uuid(), '主regionid', 'xx主region', 'xx中心主Region', '主endpoint',1, 'dws', '{"snapshot":[],"disaster_recovery":["备regionid"]}');
insert into region_information (id, region_id, geo_category, display_name, endpoint, enabled, namespace, available_region)
values(uuid(), '备regionid', 'xx备region', 'xx中心备Region', '备endpoint',1, 'dws', '{"snapshot":[],"disaster_recovery":["主regionid"]}');
备region数据库插入:
insert into region_information (id, region_id, geo_category, display_name, endpoint, enabled, namespace, available_region)
values(uuid(), '备regionid', 'xx备region', 'xx中心备Region', '备endpoint',1, 'dws', '{"snapshot":[],"disaster_recovery":["主regionid"]}');
insert into region_information (id, region_id, geo_category, display_name, endpoint, enabled, namespace, available_region)
values(uuid(), '主regionid', 'xx主region', 'xx中心主Region', '主endpoint',1, 'dws', '{"snapshot":[],"disaster_recovery":["备regionid"]}');
步骤8 查看管控面上容灾信息,项目ID及备集群信息是否正常显示。
【现象2】定位步骤及解决方案
步骤1 打开F12。主region页面查询,触发接口,选择项目ID
观察接口返回
看接口:xxx//disaster-recovery-clusters?primaryClusterId=xxx&standbyAZCode=&standbyRegion=shpj-sc-01&drType=region&standbyProjectId=80e43c0c01ae4df4827c8246e792963e1&isFineGrainedDr=0
在header中获取对应的tranceid。
步骤2 主region管控面pod容器内,根据traceId找对应的pod容器,进入logs目录
grep "xxx" ossres-dws.log
关键日志:注意时间点
Enter query standby clusters by primary cluster id:
Enter get cluster cross region dr service
get disaster cluster from other region url is:
get cluster from other region response is
步骤3 备region管控面pod容器内,由于没有traceId,只能两个pod都去查找日志
grep "disaster-recovery-clusters" ossres-dws.log
关键日志:注意时间点匹配
Enter query standby clusters by primary cluster id:
Start to filter the region standby cluster
sql is {}, projectId is {}, dataType is {}, dataVersion is {}, vpcId is {}
dnNum of primary is:
dnNumTotal of primary is:
dnNumOfStandby of standby is:
步骤4 分析日志信息后发现是主集群没有在备集群中获取到规格信息。无法匹配。去查看rds_resspecattr中是否存在主集群规格信息。
SELECT * FROM `rds_resspecattr` WHERE `specId` IN (SELECT `instance_spec_id` FROM `rds_cluster_instance_resspec` WHERE `cluster_spec_id` IN (SELECT `id` FROM `rds_cluster_spec` WHERE `code` in ('dwsk.xlarg')));
步骤5 查询信息显示备集群中没有记录主集群相关规格信息。备集群rds_resspecattr中插入一条主集群规格信息。
步骤6 查看管控面上备集群信息是否显示正常。
- 点赞
- 收藏
- 关注作者
评论(0)