Remove update converge

Update converge is largely unnecessary now with
ephemeral Heat. There is no Heat stack to update,
so we are doing nothing more than executing a
standard deployment using Ansible. Removing
the requirement for update converge will simplify
the process and improve user experience by reducing
the time it takes to perform minor updates.

Depends-On: https://review.opendev.org/c/openstack/tripleo-upgrade/+/810134
Change-Id: I750a733b722353d1ea0c6f904bafc769d7ddb9ff
changes/32/810132/6
Brendan Shephard 1 year ago
parent d21d177320
commit 19672ed3fa

@ -82,7 +82,6 @@ openstack.tripleoclient.v2 =
overcloud_support_report_collect = tripleoclient.v2.overcloud_support:ReportExecute
overcloud_update_prepare= tripleoclient.v1.overcloud_update:UpdatePrepare
overcloud_update_run = tripleoclient.v1.overcloud_update:UpdateRun
overcloud_update_converge= tripleoclient.v1.overcloud_update:UpdateConverge
overcloud_upgrade_prepare = tripleoclient.v1.overcloud_upgrade:UpgradePrepare
overcloud_upgrade_run = tripleoclient.v1.overcloud_upgrade:UpgradeRun
overcloud_upgrade_converge = tripleoclient.v1.overcloud_upgrade:UpgradeConverge

@ -136,60 +136,3 @@ class TestOvercloudUpdateRun(fakes.TestOvercloudUpdateRun):
]
self.assertRaises(ParserException, lambda: self.check_parser(
self.cmd, argslist, verifylist))
class TestOvercloudUpdateConverge(fakes.TestOvercloudUpdateConverge):
def setUp(self):
super(TestOvercloudUpdateConverge, self).setUp()
# Get the command object to test
app_args = mock.Mock()
app_args.verbose_level = 1
self.cmd = overcloud_update.UpdateConverge(self.app, app_args)
@mock.patch('tripleoclient.utils.get_key')
@mock.patch('tripleoclient.utils.get_default_working_dir')
@mock.patch('tripleoclient.utils.ensure_run_as_normal_user')
@mock.patch('tripleoclient.utils.prompt_user_for_confirmation',
return_value=True)
@mock.patch(
'tripleoclient.utils.run_ansible_playbook')
def test_update_converge(self, deploy_action, mock_confirm,
mock_usercheck, mock_dir, mock_key):
argslist = ['--stack', 'cloud']
verifylist = [
('stack', 'cloud')
]
mock_dir.return_value = "/home/stack/overcloud-deploy"
ansible_dir = "{}/config-download/cloud".format(
mock_dir.return_value
)
inventory = "{}/tripleo-ansible-inventory.yaml".format(
ansible_dir
)
ansible_cfg = "{}/ansible.cfg".format(
ansible_dir
)
mock_key.return_value = '/home/stack/.ssh/id_rsa_tripleo'
parsed_args = self.check_parser(self.cmd, argslist, verifylist)
with mock.patch('os.path.exists') as mock_exists, \
mock.patch('os.path.isfile') as mock_isfile:
mock_exists.return_value = True
mock_isfile.return_value = True
self.cmd.take_action(parsed_args)
mock_usercheck.assert_called_once()
deploy_action.assert_called_once_with(
playbook='deploy_steps_playbook.yaml',
inventory=inventory,
workdir=ansible_dir,
playbook_dir=ansible_dir,
ansible_cfg=ansible_cfg,
ssh_user='tripleo-admin',
reproduce_command=True,
forks=parsed_args.ansible_forks,
extra_env_variables={
"ANSIBLE_BECOME": True,
"ANSIBLE_PRIVATE_KEY_FILE":
"/home/stack/.ssh/id_rsa_tripleo"
}
)

@ -212,55 +212,3 @@ class UpdateRun(command.Command):
}
)
self.log.info("Completed Minor Update Run.")
class UpdateConverge(DeployOvercloud):
"""Converge the update on Overcloud nodes.
This restores the plan and stack so that normal deployment
workflow is back in place.
"""
log = logging.getLogger(__name__ + ".UpdateConverge")
def get_parser(self, prog_name):
parser = super(UpdateConverge, self).get_parser(prog_name)
return parser
def take_action(self, parsed_args):
logging.register_options(CONF)
logging.setup(CONF, '')
self.log.debug("take_action(%s)" % parsed_args)
oooutils.ensure_run_as_normal_user()
if (not parsed_args.yes
and not oooutils.prompt_user_for_confirmation(
constants.UPDATE_PROMPT, self.log)):
raise OvercloudUpdateNotConfirmed(constants.UPDATE_NO)
ansible_dir = os.path.join(oooutils.get_default_working_dir(
parsed_args.stack
),
'config-download',
parsed_args.stack)
inventory = os.path.join(ansible_dir,
'tripleo-ansible-inventory.yaml')
ansible_cfg = os.path.join(ansible_dir, 'ansible.cfg')
key_file = oooutils.get_key(parsed_args.stack)
oooutils.run_ansible_playbook(
playbook='deploy_steps_playbook.yaml',
inventory=inventory,
workdir=ansible_dir,
playbook_dir=ansible_dir,
ansible_cfg=ansible_cfg,
ssh_user='tripleo-admin',
reproduce_command=True,
forks=parsed_args.ansible_forks,
extra_env_variables={
"ANSIBLE_BECOME": True,
"ANSIBLE_PRIVATE_KEY_FILE": key_file
}
)
self.log.info("Completed Minor Update Converge.")

Loading…
Cancel
Save