In order to make it configurable via env/settings,
use writebale tmp paths for ansible runner. This also aligns the
way we call it for other places.
Change-Id: I64999f19b4ce2083f05e09c40d6b89c8d8ba2cdd
Related-bug: #1868063
Signed-off-by: Bogdan Dobrelya <bdobreli@redhat.com>
This change will set the verbosity consistently whenever a playbook is
executed via the client.
All tests have been updated to ensure that the verbosity setting is always
defined when a playbook is executed.
Change-Id: I35b10d48344c8b7f71186bc529a300f75d7b8d63
Signed-off-by: Kevin Carter <kecarter@redhat.com>
This workflow is no longer required becuase it has been converted to an
ansible playbook.
Story: 2007212
Task: 39045
Depends-On: I3d1c736f6d1ee704ece0101134f95582a5d060eb
Change-Id: I829217c99456f8ac8f49542eb1842c451fe77ad1
Signed-off-by: Kevin Carter <kecarter@redhat.com>
This change is the first step to providing a path to remove the mistral
"derived_params" workflows. Deployers will now be able to execute playbooks
from within a given plan by passing in the `playbook_parameters` key which
contains a dictionary of playbook file paths, and all options applied to a
given playbook.
Story: 2007419
Task: 39118
Change-Id: I26ea1c01e17513d001e311d68fd239d3ba8c8a0d
Signed-off-by: Kevin Carter <kecarter@redhat.com>
This change removes all of mistral from the provide workflows
by calling the new provide playbook.
Story: 2007212
Task: 38443
Task: 38446
Depends-On: Ic1cf39a29826b3828967e23a056884d867431062
Change-Id: If0184d3db5e49f6c3d302674ce7587ba27050a91
Signed-off-by: Kevin Carter <kecarter@redhat.com>
This change removes all of mistral from the clean_nodes and clean_manageable_nodes
workflows by calling the new cleaning playbook.
Story: 2007212
Task: 38451
Task: 38452
Depends-On: I0e3f50ff2bdc16b6a148977b39a12023d5b30b3e
Change-Id: I0b1981a82b1ae5d2b52a74250b623218a0cb6c0d
Signed-off-by: Kevin Carter <kecarter@redhat.com>
This change removes all of mistral from the introspection workflows
by calling the new introspection playbook.
Story: 2007212
Task: 38444
Task: 38445
Depends-On: I7ba8a31b71ed5bc9bdd944769ea472b537c83a98
Change-Id: I48bedfe9a705f5ff8e0eed1f852b77938d53c763
Signed-off-by: Kevin Carter <kecarter@redhat.com>
This change removes all of mistral from the configure functions
by calling the required functions directly.
Story: 2007212
Task: 38447
Task: 38448
Change-Id: I65eac9f813330d066f8ca6cbaae6c972d43d0246
Signed-off-by: Kevin Carter <kecarter@redhat.com>
This change removes all of mistral from the register_or_update workflow
by calling the required functions directly.
Story: 2007212
Task: 38442
Closes-Bug: #1866637
Change-Id: Ie85adc64cd4fcec469d6979a424d8f01b00f34f2
Signed-off-by: Kevin Carter <kecarter@redhat.com>
This change removes all of mistral from the check_deprecated_parameters
function by calling the required functions directly.
Story: 2007212
Task: 38424
Change-Id: Ib76dac4e0d11c66fe90c30db19788af1cb4694f6
Signed-off-by: Kevin Carter <kecarter@redhat.com>
This change removes all of mistral from the generate_fencing_parameters function
by calling the required functions directly.
Story: 2007212
Task: 38425
Change-Id: Iadcfb34e296144d82fde1d32acfffa1e01c5c997
Signed-off-by: Kevin Carter <kecarter@redhat.com>
This change converts the support deployment and workflow process to use an ansible
playbook instead of a mistral workflow. The overcloud_support module has been
updated and moved to the V2 client and all tests in support of this new process
have been updated.
Story: 2007212
Task: 38431
Task: 38432
Depends-On: I606f1ee3bc323e5c83d09ca9bc8f7e4033e81e70
Change-Id: If47e1e64e251e72d5bc8d0eb253d931257fd2ca8
Signed-off-by: Kevin Carter <kecarter@redhat.com>
This change removes all of mistral from the create_container function
by calling the required functions directly.
Story: 2007212
Task: 38780
Change-Id: Icdcd4589f413fb510ee56d6a27c110e3cc065ddf
Signed-off-by: Kevin Carter <kecarter@redhat.com>
This change removes all of mistral from the config_download_deploy function
by calling the required functions directly.
- All of the inputs within this function have been cleaned up and documented.
- New log entires will be created when using this method giving the deployer
a better overall user experience.
- To ensure we're able to support the ability to reproduce commands, the ssh
args extravar has been moved to an environment variable.
- The methods get_config and get_key have been moved to the utils module.
This was done to help avoid circular imports.
Update methods have been changed to execute without running within a mistral
workflow. This was changed because there's no need to support the multiple
code paths anymore given config_download is now running directly.
Test classes have been updated to reduce duplication.
With the new streamlined execution process we should see improved deployment
times and better visability into the deployment process.
Task: 38422
Story: 2007212
Depends-On: I006291a2465aa4c950abce76f9e5f9459b76e330
Change-Id: Ide1a4503dd2bdd2d5e494cd1eac483b842a21acf
Co-authored-by: Luke Short <ekultails@gmail.com>
Co-authored-by: Dougal Matthews <dougal@dougalmatthews.com>
Signed-off-by: Kevin Carter <kecarter@redhat.com>
This workflow only uses one action, we can remove Mistral by calling it
directly.
Story: 2007212
Task: 38419
Change-Id: I33d5961518337a8d711e1de751cd4e1fc1a68f09
This change converts the deployment process to use the new enable ssh admin
playbook instead of the shell commands and a mistral workflow.
Tests have been updated to reflect the use of the new methods.
Story: 2007212
Task: 38427
Depends-On: https://review.opendev.org/#/c/706196/
Depends-On: I5ab7f4d9dc39a74714c9bcfa39fa50cc586e8e08
Change-Id: I5c744e116f00e81f92c014fc1f599ad3db11ada2
Signed-off-by: Kevin Carter <kecarter@redhat.com>
This change replaces all of the ansible shell commands with the
python library, ansible-runner. This library is supported by
upstream ansible, is approved by the openstack foundation, is
supported in global requirements, and provides a better, more
programatic interface into running ansible playbooks.
All tests that interacted with the old shell commands have been
updated to now test using the library.
Change-Id: I8db50da826e2fbc074f4e7986d6fd00f6d488648
Signed-off-by: Kevin Carter <kecarter@redhat.com>
This patch adds handling and checking of any instances of the workflow
tripleo.deployment.v1.config_download_deploy already in progress for the
current stack. It will prevent duplicate instances of the same workflow
being started and running at the same time.
It will allow for multiple instances of the workflow running at the same
time as long as they are for different stacks.
Change-Id: Ic8dbf28b5796ff998165b6b73b941f21c65f1dfa
Closes-Bug: #1852314
This patch removes the possibility to run the validations through the
CLI with Mistral. Ansible is now the only way to run the validations.
Change-Id: I8bd9f4c4512279a291963d0b6df62316e7410f2b
Signed-off-by: Gael Chamoulaud <gchamoul@redhat.com>
Until now, we were using Mistral to get all the validations available on
the Undercloud. This patch drops the Mistral support for the validations
listing through the CLI and will parse them directly on the filesystem
instead of parsing from the *tripleo-validations* Swift container.
This change makes the CLI faster:
- ~6s with Mistral
- ~1.3s w/o Mistral
Change-Id: I5730fb2e23775f1d666276b6b4d46bcb550fc928
Signed-off-by: Gael Chamoulaud <gchamoul@redhat.com>
Add test for the function check_deprecated_parameters in workflows
parameters file. Test the unused_params and invalid_role_specific_params
parts.
Change-Id: I052d9958f52479e196d5e5dd4531f3971d7c0eb8
Closes-Bug: #1838923
Depends-On: https://review.opendev.org/#/c/674570/
When doing a deployment or update, if the end-user uses CTRL+c
(SIGINT) to end it early, it will fail complaining that there is
no passwords key in the plan. We will now handle this and cleanup
the existing plan.
Change-Id: Ie7f1a4269936f98ad86db4993992e0b9a27edf73
Closes-Bug: #1819672
Resolves: rhbz#1753251
Signed-off-by: ekultails <ekultails@gmail.com>
An execution state can go from RUNNING to SUCCESS between fetching the
last message from the websocket and polling the execution state. This
means the SUCCESS payload is never returned and the overcloud
deployment fails at the end with no indication as to why.
This change turns the output of the execution into the last payload,
allowing the calling SUCCESS logic to run.
Change-Id: Ic22021ba9a2717de199629e361c656e2f562fb38
Closes-Bug: #1842987
ssh-keygen has private key which shouldn't be visible in output. This
patch change the behaviour to print only exit code on failure. Also this
patch closes file descriptor once key is read.
Change-Id: I5a286cca6e48b0abc9cec3f15b2648977ae838c2
Related-Bug: rhbz#1734356
Use logger module instead print when it's necessary like to display a
warning message. Fix also a pep8 error in the workflows base file.
Change-Id: Ie6f06361ed15bab4d24536a9da88e9c92097771e
Closes-Bug: #1713539
These resources were previously not properly closed when leading to
ResourceWarnings being printed to the end user.
Change-Id: I27e3f209f948b4c7c04e7994fc4dc7489f28f720
Related-Bug: #1837393
The default concurrency of 20 may be too high for small underclouds
(especially CI environments), so this change adds a --concurrency
argument so callers can control the maximum number of nodes
to introspect concurrently.
Depends-On: https://review.opendev.org/#/c/672389/
Change-Id: I9faee9ab133e34466a79aa1176a16106bda1f15d
Closes-Bug: #1836976
Open the content from the file in Swift as bytes and in read
mode, otherwise Python 3 fails to open it as it comes as a string by default.
Closes-Bug: #1819665
Change-Id: I0da24d3508174190b431b660e67365f242ef04d8
This submission add unit tests for both listing and running validations
from the CLI.
Change-Id: If728b7535e3aef9439e022ae28e70ccffb97e0dc
Implements: blueprint validation-framework
There may be resource mappings in user_environment.
Change-Id: Ia2299698dfb5d7afb374e9ac2d7908c7cc6bbc22
Closes-Bug: #1817539
Depends-On: https://review.openstack.org/639072
Serializing all the execution in a message can make the message too big.
This change was done in tripleo-common. this supports that change
This change still supports the old format and is backwards compatible.
Partial-Bug: #1812172
Change-Id: I40ee028366222f38f5ba1db58d171f98be75d009
The server blacklist also needs to be honored when getting the list
of hosts that we use to check for the ssh port being available, and
injecting the temporary ssh key.
Change-Id: I7ea9201f39af17bb43b7a1b8a9d8d1064e365c14
Closes-Bug: #1797572