Cannot wait more than 10 minutes during VNF create

A time out occurs ten minutes after starting VNF create.
If the creation is not complete within ten minutes, it always
fails.

To prevent this, the timeout mins value of Heat Stack create is
changed from "10" to "(retry times) * (wait time)" defined in
Tacker's CONF.

Change-Id: I3b46fff45290904abbdc5e1c356e0215b653b9f5
Closes-Bug: #1885080
This commit is contained in:
Koichi Edagawa 2020-06-25 17:24:46 +09:00
parent 4237fe5204
commit 994f3f36bc
3 changed files with 10 additions and 4 deletions

View File

@ -292,7 +292,8 @@ class TestOpenStack(base.TestCase):
def _get_expected_fields_tosca(self, template):
return {'stack_name':
'test_openwrt_eb84260e-5ff7-4332-b032-50a14d6c1123',
'template': _get_template(template)}
'template': _get_template(template),
'timeout_mins': 10}
def _get_expected_tosca_vnf(self,
tosca_tpl_name,

View File

@ -41,12 +41,12 @@ class HeatClient(object):
def create(self, fields):
fields = fields.copy()
fields.update({
'timeout_mins': 10,
'disable_rollback': True})
fields['disable_rollback'] = True
if 'password' in fields.get('template', {}):
fields['password'] = fields['template']['password']
fields.setdefault('timeout_mins')
try:
return self.stacks.create(**fields)
except heatException.HTTPException:

View File

@ -233,6 +233,8 @@ class OpenStack(abstract_driver.VnfAbstractDriver,
fields['stack_name'] = ("vnflcm_" + vnf["id"])
fields['template'] = self._format_base_hot(base_hot_dict)
fields['parameters'] = hot_param_dict
fields['timeout_mins'] = (
self.STACK_RETRIES * self.STACK_RETRY_WAIT // 60)
LOG.debug('fields: %s', fields)
LOG.debug('template: %s', fields['template'])
@ -257,6 +259,9 @@ class OpenStack(abstract_driver.VnfAbstractDriver,
'failure_count'])
fields['stack_name'] = name
fields['timeout_mins'] = (
self.STACK_RETRIES * self.STACK_RETRY_WAIT // 60)
# service context is ignored
LOG.debug('service_context: %s', vnf.get('service_context', []))
LOG.debug('fields: %s', fields)