Skip ssh admin workflow with --config-download-only

The enable ssh admin workflow steps can be skipped when running with
--config-download-only. This saves time and eliminates repetition when
trying to only run the config download pieces.

In the scenario where the enable ssh admin workflow needs to be rerun,
the "openstack overcloud admin" command can be used.

Change-Id: I49b6eda6b87a3c306ab560ee5e447abe57ed79fc
This commit is contained in:
James Slagle 2019-05-30 08:01:30 -04:00
parent 91f6210810
commit d5126542cb
3 changed files with 13 additions and 7 deletions

View File

@ -0,0 +1,6 @@
---
other:
- When running with --config-download-only, the enable ssh admin will now be
skipped. Skipping the ssh admin workflow saves time when trying to do the
config download workflow only. If the ssh admin workflow needs to be rerun,
the "openstack overcloud admin" command can be used.

View File

@ -1538,7 +1538,7 @@ class TestDeployOvercloud(fakes.TestDeployOvercloud):
self.cmd.take_action(parsed_args)
self.assertFalse(mock_deploy_tmpdir.called)
self.assertTrue(fixture.mock_get_hosts_and_enable_ssh_admin.called)
self.assertFalse(fixture.mock_get_hosts_and_enable_ssh_admin.called)
self.assertTrue(fixture.mock_config_download.called)
self.assertTrue(fixture.mock_set_deployment_status.called)
self.assertEqual(
@ -1578,7 +1578,6 @@ class TestDeployOvercloud(fakes.TestDeployOvercloud):
self.cmd.take_action,
parsed_args)
self.assertFalse(mock_deploy_tmpdir.called)
self.assertTrue(fixture.mock_get_hosts_and_enable_ssh_admin.called)
self.assertTrue(fixture.mock_config_download.called)
self.assertTrue(fixture.mock_set_deployment_status.called)
self.assertEqual(

View File

@ -949,11 +949,12 @@ class DeployOvercloud(command.Command):
plan=stack.stack_name)
try:
deployment.get_hosts_and_enable_ssh_admin(
self.log, self.clients, stack,
parsed_args.overcloud_ssh_network,
parsed_args.overcloud_ssh_user,
parsed_args.overcloud_ssh_key)
if not parsed_args.config_download_only:
deployment.get_hosts_and_enable_ssh_admin(
self.log, self.clients, stack,
parsed_args.overcloud_ssh_network,
parsed_args.overcloud_ssh_user,
parsed_args.overcloud_ssh_key)
if parsed_args.config_download_timeout:
timeout = parsed_args.config_download_timeout * 60