Merge "Fix overcloud node delete after an upgrade"
This commit is contained in:
commit
1550e16d6e
@ -83,6 +83,11 @@ class ScaleDownAction(templates.ProcessTemplatesAction):
|
||||
fields = processed_data.copy()
|
||||
fields['timeout_mins'] = timeout_mins
|
||||
fields['existing'] = True
|
||||
# As we do a PATCH update when deleting nodes, parameters set for a
|
||||
# stack before upgrade to newton (ex. ComputeRemovalPolicies),
|
||||
# would still take precedence over the ones set in parameter_defaults
|
||||
# after upgrade. Clear these parameters for backward compatibility.
|
||||
fields['clear_parameters'] = list(parameters.keys())
|
||||
|
||||
LOG.debug('stack update params: %s', fields)
|
||||
self.get_orchestration_client(context).stacks.update(self.container,
|
||||
|
@ -139,14 +139,12 @@ class ScaleDownActionTest(base.TestCase):
|
||||
template={'heat_template_version': '2016-04-30'}
|
||||
)
|
||||
|
||||
heatclient.stacks.update.assert_called_once_with(
|
||||
'stack',
|
||||
stack_name='stack',
|
||||
template={'heat_template_version': '2016-04-30'},
|
||||
environment=env,
|
||||
existing=True,
|
||||
files={},
|
||||
timeout_mins=240)
|
||||
clear_list = list(['ComputeCount', 'ComputeRemovalPolicies'])
|
||||
_, kwargs = heatclient.stacks.update.call_args
|
||||
self.assertEqual(set(kwargs['clear_parameters']), set(clear_list))
|
||||
self.assertEqual(kwargs['environment'], env)
|
||||
self.assertEqual(kwargs['existing'], True)
|
||||
self.assertEqual(kwargs['files'], {})
|
||||
|
||||
mock_cache.assert_called_with(
|
||||
mock_ctx,
|
||||
|
Loading…
Reference in New Issue
Block a user