CI script raise a KeyError exception after add one cloud

Bug #1487659 reported by luqitao
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Hybrid Cloud
New
Undecided
Unassigned

Bug Description

804BE800-9491-11E2-8567-000000821800:/home/fsp/cherry_for_111T_v0.1/patches_tool # python config.py prepare
Start to config cascading....
Traceback (most recent call last):
  File "config.py", line 604, in <module>
    dispatch_patch_tool = DispatchPatchTool(proxy_match_region=CONF.DEFAULT.proxy_match_region)
  File "/home/fsp/cherry_for_111T_v0.1/patches_tool/dispatch.py", line 23, in __init__
    self.proxy_hosts = self.cps_service_business.get_all_proxy_nodes(self.proxy_match_region)
  File "/home/fsp/cherry_for_111T_v0.1/patches_tool/services.py", line 584, in get_all_proxy_nodes
    region = self._get_region_by_roles_list(roles_list, proxy_match_region)
  File "/home/fsp/cherry_for_111T_v0.1/patches_tool/services.py", line 619, in _get_region_by_roles_list
    return proxy_match_region[proxy_number]
KeyError: u'proxy005'

above error caused by follow error configuration, our script should support it, if there is no config to proxy005, it can work properly.

804BE800-9491-11E2-8567-000000821800:/home/fsp/cherry_for_111T_v0.1/patches_tool # cat patches_tool_config.ini
[DEFAULT]
# <PROXY_NUMBER>:<HOST_NAME>
# PROXY_NUMBER is the number of proxy, HOST_NAME is the host in which you want to deploy porxy in.
# By using commands "cps host-list", it will show all host, and you can select one host of compute to match proxy number.
proxy_match_host=proxy001:804BE800-9491-11E2-8567-000000821800,proxy002:420888F6-B670-554B-48F9-53F9622B30DD,proxy003:4208FC10-02BB-DFC6-0485-0B67CB072FD5

# <PROXY_NUMBER>:<REGION>
# PROXY_NUMBER is the number of proxy
# REGION is the region which the proxy will connect with
proxy_match_region=proxy001:az01.shenzhen--fusionsphere.huawei.com, proxy002:az11.shenzhen--vcloud.huawei.com,proxy003:az31.singapore--aws.huawei.com

# cascaded_add_route is use to define route table in cascaded node.
......

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.