Commit Graph

8 Commits

Author SHA1 Message Date
John Fulton bdde61dec0 Update swift_rings_backup workflow to also backup ceph fetch dir
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
2018-09-07 11:15:10 +00:00
Dougal Matthews b5d5cbab32 Verify the Swift container exists with a small utility workflow
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
2018-06-28 12:33:59 +01:00
Dougal Matthews 1adc25c9b2 Use the standard messaging in the swift_rings_backup workbook
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
2018-06-05 12:11:11 +01:00
Jiri Tomasek e718c04bdd Use swift.put_container action to create Swift rings backup
Closes-Bug: 1745373
Change-Id: Ibc1a70758830373ea653db0077c78ffaa8c1dd57
2018-01-25 13:54:41 +00:00
Dougal Matthews 4ad2410d68 Correct the container name confusion in the swift rings workflow
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
2017-12-11 10:28:14 +00:00
Dougal Matthews 693257c0ac Correct a task name in create_swift_rings_backup_container_plan
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
2017-12-07 16:48:36 +00:00
Dougal Matthews e0434359dd Add "tripleo-common-managed" to all workflows in tripleo_common
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
2017-09-06 17:17:17 +01:00
Lukas Bezdicka bfabb3f575 Ensure Swift Rings backup container and URLs
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
2017-06-05 13:14:35 +00:00