Rename swift_rings_backup to swift_backup because we might wish
to use swift on the undercloud to backup more than just the
overcloud swift rings. For example the same workflow is useful
for backing up the ceph-ansible fetch directory in the undercloud
swift.
Update deployment and plan management workflows to also create
or update the ceph-ansible fetch directory swift container.
Change-Id: Icce658f803a608ee4b7df34b0b8297ecabcdb0ee
Related-Bug: #1769769
The previous method of `swift.head_container` worked well, but it caused
Mistral to log the exception raised by swiftclient. This then left a red
flag in the logs that confused users debugging.
This new method checks for the container by listing all the containers
in the account and checking for the name. We only consider containers
that start with the full name we are looking for - Swift doesn't have an
exact match, only a prefix filter.
The workflow then can be used to create the container, capturing the
logic that was duplicated in each individual workflow.
Closes-Bug: #1730712
Depends-On: I41649d15c57e16bffcf7870a52bc01177aae7cc8
Change-Id: I4a6b5b9b31a4f76840a6c6070a1d733ceade5c64
Update the swift_rings_backup workbook to use the standard message sending
workflow. This workflow reduces the boilerplate that is copied between
workflows by defining the message structure, providing the retry logic
and ensuring the task on a "FAILED" message.
The workflow also offers optional persistence in Swift. If the plan name
is given to the workflow it will store the messages in a Swift container
named <plan_name>-messages.
Change-Id: Iad199545d0093ccdedf082a945345ad4863ed4d0
Related-Bug: #1757372
The create_swift_rings_backup_container_plan workflow switches between
using the overcloud swift container and the overcloud-swift-rings
container (if given the input "overcloud"). This patch determines the
container name in one place and updates all uses.
While refactoring it also removes the duplication of the
swift-rings.tar.gz file name.
Closes-Bug: #1736998
Change-Id: I5f988b003ed9600a530868dedc911a4f1333e730
When the `create_container` task fails it calls
`set_create_container_failed` to handle the error. However, the YAQL
expression in that task refers to `set_create_container`, it should be
looking for the result of the failing action `create_container`.
Closes-Bug: 1736993
Change-Id: I7a47e295d13ed1a8a82c9270c0ccbc29f82a3743
At the moment instack-undercloud deletes all workflows with "tripleo" in
the name. This has caused an issue when workflows come from other
locations but shouldn't be deleted.
Adding the tag allows instack-undercloud to delete only workflows with
this tag. It shouldn't delete or touch workflows outside of the
tripleo-common package.
Parital-Bug: #1715389
Change-Id: Ieeb51f8e705b8988fb4d0f5d17d7fce6b5b04f36
Swift Rings backup container and URLs for it are created only
during deploy but there is possibility of minor update or
change of deployment when they should be created. Adding them
in plan_management update_deployment_plan fixes these cases.
Closes-Bug: #1695778
Resolves: rhbz#1455616
Change-Id: Ifcedd54da5c74f12c863b8ec63679360673dd8f6