Improvement of Processing Logic for Healing

The following patch will fix the issue wherein if VM name
and AutoScalingGroup name are the same name, unhealthy is
set for both and both are target for healing.

The fix will be in Instantiation part since the root cause
of the issue is that Nova::Server is not included as resource
in vnfcResourceInfo.

Closes-Bug: #1924214
Change-Id: I06849ebb068253e4691b5cfd03caac80bdc16cae
This commit is contained in:
Aldinson Esto 2021-04-28 17:19:09 +09:00 committed by Renu
parent 915afe3d37
commit 36e666cb92
2 changed files with 7 additions and 4 deletions

View File

@ -404,7 +404,7 @@ class VnfLcmWithUserDataTest(vnflcm_base.BaseVnfLcmTest):
'instantiatedVnfInfo', {}).get(
'vnfcResourceInfo', [])]
request_body = fake_vnflcm.VnfInstances.make_heal_request_body(
vnfc_instance_id_list)
[vnfc_instance_id_list[1]])
resp, _ = self._heal_vnf_instance(vnf_instance_id, request_body)
self._wait_lcm_done('COMPLETED', vnf_instance_id=vnf_instance_id)
self.assert_heal_vnf(resp, vnf_instance_id, vnf_package_id)

View File

@ -99,8 +99,6 @@ OUTPUT_PREFIX = 'mgmt_ip-'
ALARMING_POLICY = 'tosca.policies.tacker.Alarming'
SCALING_POLICY = 'tosca.policies.tacker.Scaling'
NOVA_SERVER_RESOURCE = "OS::Nova::Server"
def get_scaling_policy_name(action, policy_name):
return '%s_scale_%s' % (policy_name, action)
@ -1079,7 +1077,12 @@ class OpenStack(abstract_driver.VnfAbstractDriver,
def _pop_stack_resources(resource_name):
for stack_id, resources in stack_resources.items():
if resource_name in resources.keys():
return stack_id, resources
res_details = resources.get(resource_name)
# TODO(Renu) : Need to add unit or Function test case
# for the coverage of resource type of VNFC resource
if (res_details.get('resource_type') ==
NOVA_SERVER_RESOURCE):
return stack_id, resources
return None, {}
def _populate_virtual_link_resource_info(vnf_virtual_link_desc_id,