From: Pedro Escaleira Date: Sat, 23 Jul 2022 22:16:06 +0000 (+0100) Subject: Bug 2124 fixed: timeout defined when calling the N2VC scale method X-Git-Tag: release-v13.0-start~7 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=3b610a4929de2a926df0596e9d5df848fe7cd416;p=osm%2FLCM.git Bug 2124 fixed: timeout defined when calling the N2VC scale method Change-Id: I45b55c0a402b29bf3bc5d09a80eb4e5da850480c Signed-off-by: Pedro Escaleira --- diff --git a/osm_lcm/ns.py b/osm_lcm/ns.py index 6a764f0..6306687 100644 --- a/osm_lcm/ns.py +++ b/osm_lcm/ns.py @@ -121,14 +121,16 @@ __author__ = "Alfonso Tierno " class NsLcm(LcmBase): - timeout_vca_on_error = ( + timeout_scale_on_error = ( 5 * 60 ) # Time for charm from first time at blocked,error status to mark as failed + timeout_scale_on_error_outer_factor = 1.05 # Factor in relation to timeout_scale_on_error related to the timeout to be applied within the asyncio.wait_for coroutine timeout_ns_deploy = 2 * 3600 # default global timeout for deployment a ns timeout_ns_terminate = 1800 # default global timeout for un deployment a ns timeout_ns_heal = 1800 # default global timeout for un deployment a ns timeout_charm_delete = 10 * 60 - timeout_primitive = 30 * 60 # timeout for primitive execution + timeout_primitive = 30 * 60 # Timeout for primitive execution + timeout_primitive_outer_factor = 1.05 # Factor in relation to timeout_primitive related to the timeout to be applied within the asyncio.wait_for coroutine timeout_ns_update = 30 * 60 # timeout for ns update timeout_progress_primitive = ( 10 * 60 @@ -7193,23 +7195,27 @@ class NsLcm(LcmBase): primitive_name=terminate_config_primitive["name"], params=primitive_params_, db_dict=db_dict, + total_timeout=self.timeout_primitive, vca_id=vca_id, ), - timeout=600, + timeout=self.timeout_primitive + * self.timeout_primitive_outer_factor, ) await asyncio.wait_for( self.k8scluster_map[k8s_cluster_type].scale( - kdu_instance, - scale, - kdu_scaling_info["resource-name"], + kdu_instance=kdu_instance, + scale=scale, + resource_name=kdu_scaling_info["resource-name"], + total_timeout=self.timeout_scale_on_error, vca_id=vca_id, cluster_uuid=cluster_uuid, kdu_model=kdu_model, atomic=True, db_dict=db_dict, ), - timeout=self.timeout_vca_on_error, + timeout=self.timeout_scale_on_error + * self.timeout_scale_on_error_outer_factor, ) if kdu_scaling_info["type"] == "create":