问题现象

    安装 OceanBase 集群 INSTALL 任务中 at_get_server 子任务失败,且报错信息如下所示。

    1. 2018-02-09 11:58:25 - info - 22475 - ob_ocp_api:53 - body read:{"Code":400,"Message":"net.sf.json.JSONException: JSONObject[\"idc_name\"] not found.","Success":false,"Data":""}
    2. 2018-02-09 11:58:25 - error - 22475 - ob_atom_task_base:153 - Traceback (most recent call last):
    3. File "/root/obztools/task/ob_atom_task_base.py", line 149, in execute
    4. handler()
    5. File "/root/obztools/task/obauto_plus/ob_install_plus.py", line 74, in at_get_server
    6. ctx_obj.get_server()
    7. File "/root/obztools/task/obauto_plus/ob_ctx_install_plus.py", line 26, in get_server
    8. self.command['obzone_list'] = self.ocp_api.get_cluster_resource(self.command['user_id'], self.command['uid'], self.command['obregion'], self.command['obzone_info'])
    9. File "/root/obztools/common/ob_ocp_api.py", line 109, in get_cluster_resource
    10. content = self.__access_api(params)
    11. File "/root/obztools/common/ob_ocp_api.py", line 57, in __access_api
    12. raise ob_exception.Error("access ocp api failed, content:{0}".format(content))
    13. Error: access ocp api failed, content:{u'Message': u'net.sf.json.JSONException: JSONObject["idc_name"] not found.', u'Code': 400, u'Data': u'', u'Success': False}

    解决方法

    该错误信息表示机器尚未添加成功即开始创建集群,请先放弃任务,检查添加机器任务已经执行成功后,再次重新创建集群。