- Removes unused mistral actions
- All mistral workbooks
- Custom filter for undercloud nova
- mistral entry points as we don't have mistral
Depends-On: https://review.opendev.org/c/openstack/python-tripleoclient/+/775749
Change-Id: I7f826da829bbc7d7a4fcde8afcea3f61742a316a
This change removes the use of a mistral workflow from our deployment process
which assertains the ansible deployment status. This is being removed because
deployments are not longer executed via mistral so any data provided by mistral
would be wrong.
This change also removes the mistral workflow reference in our documentation
strings so it does not confuse folks maintaining the code.
Story: 2007212
Task: 38962
Task: 38961
Change-Id: I94fed2dd4968879d0ac3ea775dd498de20b78130
Signed-off-by: Kevin Carter <kecarter@redhat.com>
This moves ListRolesAction functionality to utils and also
adds a flag to filter only valid roles.
Change-Id: I04a653c04459768d0af48687fc025e2f602fb0ba
Moves the logic from the custom action to utils. Once we have a
new tripleo-common release, we can get rid of the action by
calling the util method directly from python-tripleoclient.
Change-Id: Ib0b0a95dbad8a79e850ba079774491ab433bf674
Not used in python-tripleoclient, possibly was there for
tripleo-ui. It also removes the related tripleo.plan.update_networks
action plugin.
Task: 38596
Task: 38597
Change-Id: I98a0071e8b9abdd9ccd6205eb109204d293177c8
To properly handle the differences between python2/python3 we need to
ensure that when we interact with swift and are dealing with string data
that we handle the types correctly. This change adds a swift utils
helper to call to get the string data from an object out of swift. For
example our json and yaml files are all strings so if we try to use
something like json.dumps() from data we pull from swift, it errors
because we're given a bytes like object in python3.
Change-Id: I7996cc08cdd3bddf3f4ba0fb2e48f926f944c0dd
Related-Blueprint: python3-support
Retrieving the overcloud stack with its outputs is expensive for Heat,
let's skip it where we can.
Change-Id: Ifacdff939f7a8dedbcf2685595ebeb9340af092a
Deleting swift containers (plans) with large numbers of files can
take longer than we'd like.
This patch uses the SwiftService API which contains an implementation
of bulk delete used by the swift CLI which speeds up delete operations.
Change-Id: I8362a7986e2e4ff0aecaf867faf47c24b658d15b
Closes-bug: #1615825
The new config-download workflow creates a XXX-messages swift container
to persist the zaqar messages for the UI to consume. We should delete
the container when the plan is removed.
Implements: blueprint config-download-workflows
Change-Id: Iff21b810faafad2a0920bf1e7218c39270b7ab88
Currently it's only possible to merge which doesn't work well
for non dict keys, and probably isn't what we want when updating
e.g the list of environments from the CLI.
Co-Authored-By: Mike Fedosin <mfedosin@redhat.com>
Change-Id: I0f32ca1029430579312b9130eccebe2bf7d1db56
This patch enables the swift upload for big files (+5GB)
in TripleO.
Also, adds support to the undercloud backup CLI to upload
big backups to swift.
Change-Id: I80163c8df15377dd3b5a44b5439a23223d8cccee
Depends-On: Iff73833f1d470750862873f70a4a9aaba50bd164
Closes-Bug: 1761412
Currently this doesn't update anything, despite the name,
possibly something got lost in translation when we moved
the plan data to swift.
Change-Id: I7c43a67e6a7f8123e60f9ab6f333e1fc54f5ed64
Closes-Bug: #1754103
The tripleo.roles.list action is deprecated. Please use the
tripleo.plan_management.v1.list_roles workflow instead. Calling actions
directly is no longer supported.
This patch adds a deprecation notice to the action code, the file
where the action is registered and an associated release note.
Change-Id: I233be93b5a22008fbbfae8a49f24c3a79b9e2df2
Only removing them from plan-env could get the no-ops re-inserted by
accident from user-env on next plan update, if the next plan-update
action would be done with user-env persistence (any of update/upgrade
operations).
Change-Id: Ib9cfff3e38cb05ffe03b6ba06498d0655119b97d
Closes-Bug: #1761499
The noop deploystep is set during the prepare step for
upgrade. It put in the plan_env directly, so since we are
keeping the user-env / plan-env for upgrade the noop
steps are never removed.
This patch aim to trigger a mistral action to remove all
the OS::Heat::None for the deploystep/pre/post
Change-Id: If7eb342a84b530b07db513146e85916f2d5c1370
Currently exporting the plan for the overcloud gives us (note the
spurious 3600 argument there):
(undercloud) [stack@undercloud t]$ openstack overcloud plan export overcloud
Exporting plan overcloud...
Started Mistral Workflow tripleo.plan_management.v1.export_deployment_plan. Execution ID: 19da7423-ff44-4785-9f1f-237289b60dda
Error while creating a tarball: Unexpected error while running command.
Command: /usr/bin/tar -C /tmp/tmpiBEE9d 3600 /tmp/tmpOST_qM --exclude .git --exclude .tox --exclude *.pyc --exclude *.pyo .
Exit code: 2
Stdout: u''
Stderr: u"/usr/bin/tar: You must specify one of the `-Acdtrux' or `--test-label' options\nTry `/usr/bin/tar --help' or `/usr/bin/tar --usage' for more information.\n"
Exception exporting plan: Error while creating a tarball: Unexpected error while running command.
Command: /usr/bin/tar -C /tmp/tmpiBEE9d 3600 /tmp/tmpOST_qM --exclude .git --exclude .tox --exclude *.pyc --exclude *.pyo .
Exit code: 2
Stdout: u''
Stderr: u"/usr/bin/tar: You must specify one of the `-Acdtrux' or `--test-label' options\nTry `/usr/bin/tar --help' or `/usr/bin/tar --usage' for more information.\n"
The reason is that in tripleo_common/actions/plan.py we call the
following:
swiftutils.create_and_upload_tarball(
swift, tmp_dir, self.exports_container, tarball_name,
self.delete_after)
The reason is that in
tripleo_common/utils/swift.py:create_and_upload_tarball() we added
'tarball_options' as an option but we did not add it at the end and we
had a caller using a positional argument.
Let's make sure that 'delete_after' is passed as a named argument.
Co-Authored-By: Damien Ciabrini <dciabrin@redhat.com>
Change-Id: Idda2f6da3d84d1c448d941c962a07616863d61bf
Closes-Bug: #1749204
This patch adds a workflow that takes a list of role names as
input and populates roles_data.yaml in container in Swift with
respective roles from 'roles directory'.
Change-Id: I6c2a0d120d3e362df1ce1b701597d062783a48a4
Implements: blueprint tripleo-common-select-roles-workflow
This patch adds a workflow and associated actions to update
roles in a deployment plan.
Implements: blueprint update-roles-action
Change-Id: I42d66da37dcb07c1be112623d89769377bb23284
Previously the action would return a string representation of the
exception. It will be unlikely that this would contain enough
information, so it is useful to log the full exception traceback.
Change-Id: Ibb5438470f7c4843c59a03640909bb82623f4046
Trying to re-run `openstack overcloud deploy` now fails with
"A container with the name overcloud-swift-rings already exists."
It happens because Ьistral doesn't remove the container during the
deletion process.
This patch adds the removal of the container to the corresponding
action.
Change-Id: I3f62fc61758cb817c45df8e67ed3639934edd038
Closes-bug: #1738437
Add an exclude list of file which can possibly
contains user data.
When those files are modified by the user, we should
not erased those when we update the plan during the
upgrade
Change-Id: I4e53d8f95170c25b32a6d714a7620c2c9d2596f3
Closes-Bug: #1734108
We need to provide an option to let the user change the default
ansible playbook path for ceph-ansible update.
Closes-Bug: #1723428
Change-Id: I42f1583acfb10747d447372001b1a046d68d7577
In Pike, plans were migrated from using Mistral environments for
storing parameters values to using a plan-environment.yaml file stored
together with the plan in Swift. New plans created from THT have this
file included automatically from Pike, and the migration step is no
longer necessary starting in Queens.
Change-Id: I0eb46b78266352eb36ceb9fa9be46a91eaa4a6b8
This patch enhances the ListRolesAction by adding a detail argument
that toggles whether the names or all role data will be returned.
Change-Id: Ib1755bcf5c1361a3e5616014bf063f69e49687c6
Implements: blueprint tripleo-common-enhance-list-roles-action
This review implement the minor update workflow
which does:
- a noop heat stack deployment to set and refresh
the heat config output.
- download the heat config and put them in a ansible
playbooks
- run the playbooks with the mistral action
It adds actions for the config download and update
deployment
Adds the config download as a library for being call
either, by the client or mistral
Closes-Bug: #1715557
Change-Id: I199b35f865c0e68d28c5ddd82e5b8fe61abb5f33
The workflow works like this:
1. Drain the tripleo Zaqar queue
2. Format the messages as a log string
3. Publish the string to a swift object
If the swift object exceeds 10MB, we rotate it.
This patch also includes a workflow to download the latest log via a temporary
url. The download log action shares a lot of code with the plan export action,
so the common bits were extracted.
Implements: spec gui-logging
Implements: blueprint websocket-logging
Change-Id: I2affd39e85ccfdbaa18590de182104715cfbbed4
This is part of the ongoing change to remove the mistral
dependency from tripleo-common and use mistral_lib instead
In order to do that we are using the Result class from mistral_lib
Change-Id: I59ce8c6d68de9e9719d84cbaa82462fbd8d647e2
Depends-on: Icc0036bae3c969112f2f67c4a8264bae18f3cc73
Plan export is currently failing due to the `get_object_client()`
method being called without the mandatory `context` argument.
This change also fixes another instance of the missing `context` argument
to the `get_object_client()` method in the SwiftInformationAction action.
Change-Id: I70f522f85dbbbabb5d50d202001017ab0473385a
Closes-bug: #1698811
Start using the plan environment file in Swift for plan environment
storage instead of Mistral.
Add util functions to get/update environment data.
Remove CreatePlanAction and UpdatePlanAction as all they did was
sync between Mistral and Swift environments. Amend the corresponding
workflows to account for removal of these actions.
Implements: blueprint stop-using-mistral-env
Co-Authored-By: Julie Pichon <jpichon@redhat.com>
Depends-On: I3bcef27413e685c498165b43a8b59c8c9cc5cf5e
Change-Id: Ieedecf92113142e43925131dcbccc4c0cd5b1a18
roles_data.yaml is the source of truth for the roles available in a
deployment.
Change-Id: I599bf5675caa4650a8eb647e8c50e0fc64fdc923
Implements blueprint: get-roles-action
mistral_lib base TripleoAction has a context in the run method
signature. These changes remove the mistral.context and make use
of the one provide by the default executor
Change-Id: Ib1a5aa8d5735b05f5308dc943ac088b5eeeec253
This caching in swift changes the time for the GetParametersAction from
15s to 3s
Added tests for plan.UpdatePlanAction as there were none there.
Change-Id: I0b543e082a3b02a35e3e979339698ae237b32ce4
Closes-Bug: #1647301
This change enhances the plan creation and update workflows to consume
the plan environment file and import its contents into the Mistral
environment. It also removes importing the root template and root
environment from the capabilities map file, as these fields will
now be imported from the plan environment file.
Implements: blueprint enhance-plan-creation-with-plan-environment
Depends-On: I95e3e3a25104623d6fcf38e99403cebbd591b92d
Change-Id: I961624723d127aebbaacd0c2b481211d83dde3f6
Some constructor methods were missing the super call to the parent
class. This change adds the missing calls.
Some constructor methods only had the super calls to the parent class,
which makes them redundant. This change removes those methods.
Change-Id: I3bdda1a1f1bcfa19d166b994d3d3ae2218b95c43
When a plan was deleted, no feedback to the user was provided in
the cases where a container does not exist or exists but does not
contain metadata identifying it as a deployment plan container.
This patch adds feedback to the user in the above cases by adding
error text that will be returned in the resulting action failure.
Change-Id: I47267d283c35ef517b4ff2530fd662f81ed0dc88
By default the plan name is used on the creation of the node name
in the form of plan_name + role + index
Forcing the plan name to be only letters and numbers removes the
possibility of a failed deploy due to an invalid node name
I've included a pattern validator to verify that those names are valid
and a constant for node and plan name validation
Change-Id: I111d0ba43d810657aa0b76b6ea4afd5175be1d30
Closes-Bug: #1644587
The underscore typically designates these methods as private, but
they are intended to be used by any/all of the subclasses. This
change clarifies the API.
Change-Id: I4dc95a0e1f84570b184f8b75f51a2c1456909fb9