Make sure tripleo-admin is created in an update scenario

For some reasons, in this environment with edge sites, the
authorized_keys changed and tripleo-admin no longer worked and
the "upgrade prepare" or "deploy" cannot be ran at this point
in time of the update.   This patches makes sure tripleo-admin
is always properly configured.

Change-Id: I53894579a4eeedbea5aa861b677def9de601bfbb
This commit is contained in:
David Hill 2023-10-16 15:06:15 -04:00
parent f3599d0663
commit 5b8021e80b
1 changed files with 13 additions and 0 deletions

View File

@ -26,6 +26,7 @@ from tripleoclient import command
from tripleoclient import constants
from tripleoclient import utils as oooutils
from tripleoclient.v1.overcloud_deploy import DeployOvercloud
from tripleoclient.workflows import deployment
CONF = cfg.CONF
@ -76,6 +77,18 @@ class UpdatePrepare(DeployOvercloud):
parsed_args.environment_files)
super(UpdatePrepare, self).take_action(parsed_args)
deployment.get_hosts_and_enable_ssh_admin(
parsed_args.stack,
parsed_args.overcloud_ssh_network,
parsed_args.overcloud_ssh_user,
self.get_key_pair(parsed_args),
parsed_args.overcloud_ssh_port_timeout,
working_dir=self.working_dir,
verbosity=oooutils.playbook_verbosity(self=self),
heat_type=parsed_args.heat_type
)
self.log.info("Update init on stack {0} complete.".format(
parsed_args.stack))