The state information in the ceph-ansible fetch directory
is no longer necessary to replace a Ceph monitor as of
ceph-ansible 4.0.14-1. Stein, Train, Ussuri and newer
should be using this version of ceph-ansible or newer.
TripleO does not need to do extra work to maintain the
fetch directory.
This means that the plan_management workbook no longer
needs to create the SwiftFetchDirGetTempurl and the
SwiftFetchDirPutTempurl parameters. This patch removes
the create_ceph_ansible_fetch_directory_backup_plan
task which creates them. It also removes the workbook
rename_ceph_ansible_fetch_directory.
Both Icce658f803a608ee4b7df34b0b8297ecabcdb0ee and
Ifab82c9a5b0a206c14ae7976d2c1c7f0e9fa3d9d are effectively
reverted of their ceph aspects with this change, but this
change should not be backported to Rocky or older because
ceph-ansible 3 still needs the fetch directory.
Change-Id: I167449e4d7e38f0f5fd74251a3bd8f5b0b31451b
Related-Bug: #1863809
This will allow additional arguments to be passed directly
to the ansible-playbook command.
Change-Id: I0637f5c2b149017ae5630c3a93e46c45d7662786
Signed-off-by: Luke Short <ekultails@gmail.com>
This patch removes the checking for already running instances of the
tripleo.deployment.v1.config_download_deploy workflow from the workflow
itself as it's been moved to tripleoclient.
It is better handled in tripleoclient where the workflow inputs can be
checked to see if any of the other running workflows are also for the
current stack. That functionality would have required a custom action to
do in the workflow itself.
Change-Id: I6195068a42bfc2469a0b8b006e339e3ca5056dff
Partial-Bug: #1852314
Depends-On: Ic8dbf28b5796ff998165b6b73b941f21c65f1dfa
The lookup that converts a Nova server UUID into a node hostname from
Ironic doesn't work if the baremetal is managed in split-stack &
nova-less.
For the time being we address these 2 use cases, let's just skip Ansible
scale down tasks for these deployments.
A proper lookup will be provided in the future and backported down to
stable/train.
Change-Id: I90f7f5a8966a6942e5dcfeb753996df420665be7
Closes-Bug: #1858459
This will fail when there is no nova database configured, as for a
nova-less undercloud. This call to cell_v2_discover_hosts was added to
make sure any recent auto-discovered hosts are mapped to a cell, so I
think ignoring all errors is acceptable in this case.
Related-Bug: #1742179
Change-Id: I77727bbee996d123aea442a76810dcee8e957a8f
Blueprint: nova-less-deploy
This patches adds the possibility to deactivate in-flight validations by
skipping the "opendev-validation" ansible tag.
It does it in a generic way, meaning we might pass other tags to skip.
Change-Id: I6f3e4fb279146a0f292818929092d1aeb1d3fced
Inventory is generated as a part of config_download_deploy
workflow but 'deployment_options' input needed to set
'ansible_python_interpreter' input for 'ansible-generate-inventory'
action is missing as a input to the workflow.
This patch adds it.
Partial-Bug: #1838540
Change-Id: I86b914f8e20704da2d566d137718b4b7fb02ad95
It includes:
* mistral action for generating clouds.yaml once
overcloud deployment finishes.
* clouds_yaml.py library for generating clouds.yaml
* Moved global vars to tripleo-common constants.
https://review.opendev.org/#/c/664586/ adds the review in
python-tripleoclient to create the clouds.yaml for
overcloud by calling the above mistral actions.
Related-Bug: #1719369
Change-Id: Ie9004222ca5f77031795eaa4b4a757da8b409d05
Signed-off-by: Chandan Kumar (raukadah) <chkumar@redhat.com>
It can take longer than 1 hour for a temporary swift
URL which stores the backup of the fetch directory to
be created vs used. Increase the timeout from 1 hour
to 4 hours so that the URL does not expire before it
is used.
Change-Id: Ib989bd673c694a9dc5af2a4a63ed84888f102a50
Fixes-Bug: #1832509
Instead, honor the value of verbosity that was specified on the command
line. This will make the ansible tasks less verbose by default, so that
we don't have to add no_log everywhere which actually ends up hiding
useful output.
Change-Id: I0ef61bc49d31247a408e340d33a2ae239e1f11fe
Depends-On: Ib5060a3e9679b105c76c3c72011c23aee0093dc1
In run_ansible task, adding support to change the playbook name, with
the default set to deploy_steps_playbook.yaml for backward
compatibility.
It will allow the tasks to be re-used by another workflow, like scale.
Change-Id: I8adeffb03836de3f1ace7d4311dbff353c10ea14
In run_ansible task, adding support to filter nodes with limit_hosts
(--limit option in Ansible), so we can call the workbook with the desire
to run Ansible only on certain hosts (e.g. scale down).
Change-Id: I1aa086cc706110905b7a45a765d67d01ee90434e
This means the access workflow no longer needs to inject the public
key into the undercloud authorized_keys file, since there is already a
key configured and ready to use.
Change-Id: I4c6d0b87f4436713ba7080175308ed715907c111
Depends-On: https://review.openstack.org/#/c/649460/
Looks like mistral has issues using empty list [] comparation to check
if the list is empty or not, let's just use len.
This is needed since https://review.openstack.org/#/c/637507/ is not
merged.
Change-Id: Ifd04d741bd92b2ada5f181ed87ed5b07c0e01d48
Closes-Bug: #1816026
Before attempting to delete the stack, we check if it exists. And if it
doesn't, we skip straight to updating the environment.
Change-Id: I4124f73571cd794a457f52d4f76bfb75cf64e886
Add an initial task to the config_download_deploy workflow that queries
for existing executions of the same workflow on the same plan. If any
are found, that means that config-download is already running on the
existing plan, so we should fail the additional one that is trying to
start.
Change-Id: I967ae5528834382b6ef69cc4dac10c893c907fc8
In order to be able to specify the ansible python interpreter, we need
to be able to pass in some extra options into the deployment workflow.
This change adds support for ansible_python_interpreter to the inventory
code as well as exposing a deployment_options input to the deployment
workflow.
Change-Id: Ieed77f5fe886ef38f447bfa647c8e01009f93d89
Related-Blueprint: python3-support
Passing the execution_id to the tripleo.ansible-playbook action will
make it such that the execution_id is included in any messages sent on
the queue.
This is needed so that when tripleoclient filters by execution id to
discard messages that are not from workflows it did not start, won't be
shown.
The tripleoclient patch to filter on execution_id is
https://review.openstack.org/#/c/605520/, but first we must land this
patch so that execution_id is added an input to these actions.
Change-Id: Icbe80c338d69efc6ce8fceb0f73f833bec588536
Related-Bug: #1794277
Update the deployment status if needed when retrieving the status. We do
this since tripleoclient does not yet use a single API for overcloud
deployment. Since there is no long running process to make sure the
status is updated, we instead update the status if needed when we get it
with this action.
The logic to update the status is detailed in a comment in the code.
Also as part of this commit the status is kept as deploying in
deploy_play when not triggering config_download, since the client will
trigger config_download on it's own. It makes more sense to keep the
status as deploying in that scenario.
Change-Id: I6d329e974965edf28d6f5b12e6854319cfb683f4
Closes-Bug: #1798193
Relying on mistral task timeout to fail the ansible command is awkward,
because it doesn't kill the running command, and it doesn't give an easy
indication of the error without looking at the status info.
Instead, use the "timeout" command on the command line to invoke
ansible, and check the status code to find out if it reached it.
Change-Id: Iec15a06b85722ff6dc9209f0a5d4db333b71496f
Closes-Bug: #1801902
The workflows that manipulate the deployment status should set the
workflow status to SUCCESS regardless of how they set the status of the
deployment. Otherwise, the workflows themselves are seen as failed or
continually in progress by the caller.
Change-Id: I87b97bcab3e8cec6bdbb79c0acb95a375bb2d2fa
Partial-Bug: #1795640
Instead of failing the workflow when requesting the deployment status of
a non-existant plan, return a useful message instead.
Change-Id: Ic0333c0726b16d284a7cc54bc68e16ea1c9ebc4d
Partial-Bug: #1792637
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 config_download_deploy workflow now has a config_download_timeout input
that will honor a user requested timeout. Previously, no timeout was honored
even though the user could request one via tripleoclient.
Change-Id: I522b71f92149e0cee7842d1bcbf35d9e820454b8
Partial-Bug: #1783893
This change has been broken out from the previous one because
Ifb1f81d4f7db3efd2799beca8705957e29ba16bd had to be reverted due to a
dependency on needing a promoted container image which contains the
action python.
Change-Id: Ie1bd6448684d5885a58c0ba30800b22ec9c105fd
Blueprint: container-prepare-workflow
Use the stack output BlacklistedIpAddresses in the enable_ssh_admin
workflow so that the workflow does not use any of the servers in the
blacklist.
Change-Id: Ie5dbe86232c3b6a85665a9eec08ace8ba9415ea1
Depends-On: Ie96acf29a857e4801f5823f26a7de6bc989f39e2
Closes-Bug: #1785680
Add a new workflow input for config_download_deploy for
override_ansible_cfg which is a string of ansible config file contents.
The contents will override any configured ansible.cfg values set by the
action, allowing users to set any arbitrary ansible.cfg they want.
Change-Id: I0221311f3b17e9a60440681c42542c46af5e8903
Add a new workflow, config_download_export, to export the
config_download files by providing a swift tempurl of the generated
tarball.
The CLI will be migrated to using this workflow.
Partial-Bug: #1783646
Change-Id: Ic3d3667a7e2d0b445a4ace4d9aa8643062eb9cf3
This action runs in the deployment workflow just after validation. It
does the following:
- Fetches the plan, environment files and role data
- Builds a merged environment from the fetched plans
- If a ContainerImagePrepare parameter is defined, do a dry-run
prepare to determine the image parameters for when the actual prepare
is run during the deployment.
- Write the resulting image parameters to
environments/containers-default-parameters.yaml and insert that file
into the environments file list in the plan
If no ContainerImagePrepare parameter, this action has no effect, so
it can be inserted into the deployment workflow now without affecting
any existing image prepare.
This dry-run prepare is the same approach used for containerized
undercloud deployment. Doing a dry-run is fast compared to a full
deploy because there are no image transfers or build performed, only
inspect calls to image registries. The actual prepare will be done
during the deployment when change
I8b0c5e630e63ef6a2e6f70f1eb00fd02f4cfd1c0 lands.
Change-Id: Ifb1f81d4f7db3efd2799beca8705957e29ba16bd
Blueprint: container-prepare-workflow
Since the config-download files are stored per plan name, we don't need
to reach for deployment status object and execution any more.
This change also updates get_deployment_failures workflow to set status
FAILED when an error message is returned from the action.
Closes-Bug: 1779093
Change-Id: I49805f1e2ce845b1cebc04df813261cca12ec431
Use a consistent directory under /var/lib/mistral (which defaults to the
plan name) as the working and config-download directory in the
config_download_deploy workflow. Since the config-download directory
is now managed by git, we can re-use the same dir and preserve the
history.
Change-Id: Id639d0a99aa1103f6f9cc54de676ea8ba6111332
Closes-Bug: #1779093
Override the default git commit message so that it's clear that the
config-download commit was run from the Mistral action.
Also, first download the existing config container if one exists. Since
the config-download dir is now managed as a git repo, we want to
preserve the git history, so we need to first reuse the existing
contents of the config container.
Change-Id: I0246918d89dfb564e3d472d4b2f517b5beaf4372