Remove parameter for ceph-ansible playbook from update/upgrade prepare
The parameter was necessary before we inherited the update/upgrade prepare commands from the deploy command. Nowadays this is not necessary and can be achieved by 2 different means: either via the *-prepare.yaml files setting CephAnsiblePlaybook parameter, or via external_update_tasks and external_upgrade_tasks. Partial-Bug: #1783949 Change-Id: If54e12dbac1a982e89d29b96d86f9f5299e3d810 Depends-On: If80f9cc2f4cb32610dc5eb87159872e28363a21a
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
---
|
||||
upgrade:
|
||||
- |
|
||||
The `--ceph-ansible-playbook` parameter has been removed from all
|
||||
update- and upgrade-related commands. The parameter is not
|
||||
necessary anymore, as the right playbook should be selected
|
||||
automatically (but for cases when control is needed, overriding
|
||||
CephAnsiblePlaybook parameter via environment file will still take
|
||||
priority). Furthermore, the `--ceph-ansible-playbook` CLI
|
||||
parameter was attempting to override the detection logic which
|
||||
selects desired ceph-ansible playbook.
|
||||
@@ -88,8 +88,6 @@ class TestFFWDUpgradePrepare(fakes.TestFFWDUpgradePrepare):
|
||||
self.app.client_manager,
|
||||
container='mystack',
|
||||
container_registry={'fake_container': 'fake_value'},
|
||||
ceph_ansible_playbook='/usr/share/ceph-ansible'
|
||||
'/site-docker.yml.sample',
|
||||
)
|
||||
|
||||
mock_overcloudrc.assert_called_once_with(mock.ANY,
|
||||
|
||||
@@ -75,8 +75,6 @@ class TestOvercloudUpdatePrepare(fakes.TestOvercloudUpdatePrepare):
|
||||
self.app.client_manager,
|
||||
container='overcloud',
|
||||
container_registry={'fake_container': 'fake_value'},
|
||||
ceph_ansible_playbook='/usr/share/ceph-ansible'
|
||||
'/site-docker.yml.sample'
|
||||
)
|
||||
|
||||
@mock.patch('tripleoclient.workflows.package_update.update',
|
||||
|
||||
@@ -78,8 +78,6 @@ class TestOvercloudUpgradePrepare(fakes.TestOvercloudUpgradePrepare):
|
||||
('stack', 'overcloud'),
|
||||
('templates', constants.TRIPLEO_HEAT_TEMPLATES),
|
||||
('container_registry_file', 'my-fake-registry.yaml'),
|
||||
('ceph_ansible_playbook', '/usr/share/ceph-ansible'
|
||||
'/site-docker.yml.sample')
|
||||
]
|
||||
|
||||
parsed_args = self.check_parser(self.cmd, argslist, verifylist)
|
||||
@@ -88,8 +86,6 @@ class TestOvercloudUpgradePrepare(fakes.TestOvercloudUpgradePrepare):
|
||||
self.app.client_manager,
|
||||
container='overcloud',
|
||||
container_registry={'fake_container': 'fake_value'},
|
||||
ceph_ansible_playbook='/usr/share/ceph-ansible'
|
||||
'/site-docker.yml.sample'
|
||||
)
|
||||
|
||||
mock_overcloudrc.assert_called_once_with(mock.ANY,
|
||||
@@ -119,8 +115,6 @@ class TestOvercloudUpgradePrepare(fakes.TestOvercloudUpgradePrepare):
|
||||
('stack', 'overcloud'),
|
||||
('templates', constants.TRIPLEO_HEAT_TEMPLATES),
|
||||
('container_registry_file', 'my-fake-registry.yaml'),
|
||||
('ceph_ansible_playbook', '/usr/share/ceph-ansible'
|
||||
'/site-docker.yml.sample')
|
||||
]
|
||||
parsed_args = self.check_parser(self.cmd, argslist, verifylist)
|
||||
|
||||
|
||||
@@ -54,13 +54,6 @@ class FFWDUpgradePrepare(DeployOvercloud):
|
||||
help=_("File which contains the container "
|
||||
"registry data for the upgrade"),
|
||||
)
|
||||
parser.add_argument('--ceph-ansible-playbook',
|
||||
action="store",
|
||||
default="/usr/share/ceph-ansible"
|
||||
"/site-docker.yml.sample",
|
||||
help=_('Path to switch the ceph-ansible playbook '
|
||||
'used for upgrade. '),
|
||||
)
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
@@ -83,7 +76,6 @@ class FFWDUpgradePrepare(DeployOvercloud):
|
||||
|
||||
registry = oooutils.load_container_registry(
|
||||
self.log, parsed_args.container_registry_file)
|
||||
ceph_ansible_playbook = parsed_args.ceph_ansible_playbook
|
||||
# In case of update and upgrade we need to force the
|
||||
# update_plan_only. The heat stack update is done by the
|
||||
# packag_update mistral action
|
||||
@@ -100,8 +92,7 @@ class FFWDUpgradePrepare(DeployOvercloud):
|
||||
|
||||
super(FFWDUpgradePrepare, self).take_action(parsed_args)
|
||||
package_update.update(clients, container=stack_name,
|
||||
container_registry=registry,
|
||||
ceph_ansible_playbook=ceph_ansible_playbook)
|
||||
container_registry=registry)
|
||||
package_update.get_config(clients, container=stack_name)
|
||||
|
||||
overcloudrcs = deployment.create_overcloudrc(
|
||||
|
||||
@@ -47,13 +47,6 @@ class UpdatePrepare(DeployOvercloud):
|
||||
help=_("File which contains the container "
|
||||
"registry data for the update"),
|
||||
)
|
||||
parser.add_argument('--ceph-ansible-playbook',
|
||||
action="store",
|
||||
default="/usr/share/ceph-ansible"
|
||||
"/site-docker.yml.sample",
|
||||
help=_('Path to switch the ceph-ansible playbook '
|
||||
'used for update. '),
|
||||
)
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
@@ -67,9 +60,6 @@ class UpdatePrepare(DeployOvercloud):
|
||||
registry = oooutils.load_container_registry(
|
||||
self.log, parsed_args.container_registry_file)
|
||||
|
||||
# Run update
|
||||
ceph_ansible_playbook = parsed_args.ceph_ansible_playbook
|
||||
# Run Overcloud deploy (stack update)
|
||||
# In case of update and upgrade we need to force the
|
||||
# update_plan_only. The heat stack update is done by the
|
||||
# packag_update mistral action
|
||||
@@ -84,8 +74,7 @@ class UpdatePrepare(DeployOvercloud):
|
||||
|
||||
super(UpdatePrepare, self).take_action(parsed_args)
|
||||
package_update.update(clients, container=stack_name,
|
||||
container_registry=registry,
|
||||
ceph_ansible_playbook=ceph_ansible_playbook)
|
||||
container_registry=registry)
|
||||
package_update.get_config(clients, container=stack_name)
|
||||
self.log.info("Update init on stack {0} complete.".format(
|
||||
parsed_args.stack))
|
||||
|
||||
@@ -49,13 +49,6 @@ class UpgradePrepare(DeployOvercloud):
|
||||
help=_("File which contains the container "
|
||||
"registry data for the upgrade"),
|
||||
)
|
||||
parser.add_argument('--ceph-ansible-playbook',
|
||||
action="store",
|
||||
default="/usr/share/ceph-ansible"
|
||||
"/site-docker.yml.sample",
|
||||
help=_('Path to switch the ceph-ansible playbook '
|
||||
'used for upgrade. '),
|
||||
)
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
@@ -69,8 +62,6 @@ class UpgradePrepare(DeployOvercloud):
|
||||
registry = oooutils.load_container_registry(
|
||||
self.log, parsed_args.container_registry_file)
|
||||
|
||||
# Run update
|
||||
ceph_ansible_playbook = parsed_args.ceph_ansible_playbook
|
||||
# In case of update and upgrade we need to force the
|
||||
# update_plan_only. The heat stack update is done by the
|
||||
# packag_update mistral action
|
||||
@@ -83,8 +74,7 @@ class UpgradePrepare(DeployOvercloud):
|
||||
constants.UPGRADE_PREPARE_ENV)
|
||||
super(UpgradePrepare, self).take_action(parsed_args)
|
||||
package_update.update(clients, container=stack_name,
|
||||
container_registry=registry,
|
||||
ceph_ansible_playbook=ceph_ansible_playbook)
|
||||
container_registry=registry)
|
||||
package_update.get_config(clients, container=stack_name)
|
||||
|
||||
overcloudrcs = deployment.create_overcloudrc(
|
||||
|
||||
Reference in New Issue
Block a user