Remove ceph-specific logic from update/upgrade prepare workflow

The logic 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: Ifdf5f1175849f79b98c76b4bcdef2a70f8f1fedb
Depends-On: If54e12dbac1a982e89d29b96d86f9f5299e3d810
This commit is contained in:
Jiri Stransky 2018-07-24 15:25:15 +02:00
parent fb1a97cf66
commit 9175cd26b6
3 changed files with 2 additions and 20 deletions

View File

@ -28,12 +28,11 @@ LOG = logging.getLogger(__name__)
class UpdateStackAction(templates.ProcessTemplatesAction):
def __init__(self, timeout, container_registry, ceph_ansible_playbook,
def __init__(self, timeout, container_registry,
container=constants.DEFAULT_CONTAINER_NAME):
super(UpdateStackAction, self).__init__(container)
self.timeout_mins = timeout
self.container_registry = container_registry
self.ceph_ansible_playbook = ceph_ansible_playbook
def run(self, context):
# get the stack. Error if doesn't exist
@ -80,9 +79,6 @@ class UpdateStackAction(templates.ProcessTemplatesAction):
parameters = {}
if self.container_registry is not None:
parameters.update(self.container_registry['parameter_defaults'])
if self.ceph_ansible_playbook:
parameters.update({'CephAnsiblePlaybook': '%s' %
self.ceph_ansible_playbook})
plan_utils.update_in_env(swift, env, 'parameter_defaults', parameters)
# process all plan files and create or update a stack

View File

@ -108,8 +108,7 @@ class UpdateStackActionTest(base.TestCase):
mock_object_client.return_value = mock_swift
action = package_update.UpdateStackAction(self.timeout, fake_registry,
container=self.container,
ceph_ansible_playbook=None)
container=self.container)
action.run(mock_ctx)
mock_updateinenv.assert_called_once_with(
mock_swift, env, 'parameter_defaults',

View File

@ -12,7 +12,6 @@ workflows:
input:
- container
- container_registry
- ceph_ansible_playbook: '/usr/share/ceph-ansible/site-docker.yml.sample'
- timeout: 240
- queue_name: tripleo
- skip_deploy_identifier: False
@ -28,21 +27,9 @@ workflows:
timeout: <% $.timeout %>
container: <% $.container %>
container_registry: <% $.container_registry %>
ceph_ansible_playbook: <% $.ceph_ansible_playbook %>
on-success: clean_plan
on-error: set_update_failed
clean_plan:
action: tripleo.plan.update_plan_environment
input:
container: <% $.container %>
parameter: CephAnsiblePlaybook
env_key: parameter_defaults
delete: true
on-success: send_message
on-error: set_update_failed
set_update_failed:
on-success: send_message
publish: