Commit Graph

2821 Commits (51b0cc4c13f9960e087b34e9cd15fe09ecebc722)
 

Author SHA1 Message Date
Steve Baker 51b0cc4c13 New command "overcloud node extract provisioned"
As a first step to upgrade to a nova-less undercloud, the baremetal
deployment yaml which represents the current overcloud needs to be
built.

This command builds the yaml for an existing overcloud using the
heat stack output AnsibleHostVarsMap and a list of all baremetal
nodes. When the generated yaml is used to run "openstack overcloud
node provision" no changes will be made to any nodes.

Blueprint: nova-less-deploy
Change-Id: I47c885697bf36b999fd0ad9bd99a23990440ed62
3 years ago
Zuul 5951a20650 Merge "Fix stack create verbosity" 3 years ago
Zuul 90ef9f277b Merge "Add call to cleanup_ipa.yml playbook when doing a stack delete" 3 years ago
Alex Schultz fa3df6a00c Fix stack create verbosity
This change reverts the change to verbose_level because it enables
ansible verbosity by default. Additionally this change hard codes true
for the wait_for_stack_ready function call so we always get the heat
stack creation output.

Revert "Don't override default verbose_level"

This reverts commit c8cd714588.

Change-Id: Idcc00fa04d4a356efb9e0bc30bc24e0121f31961
3 years ago
Zuul eadf2b82d9 Merge "Don't override default verbose_level" 3 years ago
Ade Lee 244f14c03c Add call to cleanup_ipa.yml playbook when doing a stack delete
When doing a stack delete, we need to make sure that any IPA entries are
cleaned up. We have added a call to the cli-cleanup-ipa.yml playbook
to ensure that this is done.

This commit also introduces a new option called ``--skip-ipa-cleanup``
so that callers can bypass this playbook. The default is False, meaning
the intended behavior is to cleanup FreeIPA by default during overcloud
delete operations.

Change-Id: I131ff1977005d0f90afa567e5c4e2e9c3b5d3af2
3 years ago
Kevin Carter 329cad5794
Add stack_name support to ANSIBLE_INVENTORY
This change updates the ANSIBLE_INVENTORY constant to support stacks with different
names.

Change-Id: I601ff211d53a29dbda195cb2df8708e57efbcb94
Signed-off-by: Kevin Carter <kecarter@redhat.com>
3 years ago
Rabi Mishra c8cd714588 Don't override default verbose_level
In I35b10d48344c8b7f71186bc529a300f75d7b8d63, we changed to
use verbose_level for playbook verbosity and as result forced
the default client verbosity to 0 and we don't see stack
events like before. This resets it back to 1.

Change-Id: Ibcd15e78aa52cbbc29e7213c04ae63594e2bcc35
3 years ago
Zuul c28e805b63 Merge "Remove workflow_engine from client setup" 3 years ago
Zuul fd64df6294 Merge "Raise a new ValueError with the contents of the JSON is parsing fails" 3 years ago
Zuul 0b803fb2d2 Merge "Add login flag to container image prepare defaults" 3 years ago
Zuul a8d2ba9fbe Merge "Cleanup py27 support" 3 years ago
Kevin Carter 41d88961e0
Remove workflow_engine from client setup
This change removes the workflow engine object from the overcloud deployment
client setup method. This is done to ensure we're not importing and accessing
client objects that are no longer relevant.

Change-Id: Ib7a686732839596ae9b079f8c6e24794ec5d34d7
Signed-off-by: Kevin Carter <kecarter@redhat.com>
3 years ago
Zuul 81a4336908 Merge "Don't use mistral directory as WORK_DIR for config-download" 3 years ago
Rabi Mishra 191438f743 Don't use mistral directory as WORK_DIR for config-download
As part of mistral removal all config-downloaded playbooks
are run from tripleoclient. This changes the download location
to $HOME/config-download.

Documentation for default location will be changed along with
all doc changes for mistral removal.

Closes-Bug: #1874432
Depends-On: https://review.opendev.org/721568/
Change-Id: Ib4c9c47baabd64f008c4f61e4fa8c37a311350a3
3 years ago
Kevin Carter 93952566d6
Add release note for undercloud.conf parsing
This change adds a release note to cover the strict parsing of the `undercloud.conf`.

Closes-Bug: #1874410
Change-Id: Ic3aa73b28f46694a5ce43f8435a64e195df1328f
Signed-off-by: Kevin Carter <kecarter@redhat.com>
3 years ago
Zuul e0750c44a7 Merge "Expose --limit, --skip-tags, and --tags on the CLI." 3 years ago
Zuul 222976efe1 Merge "Use undercloud upgrade to update all required pkgs" 3 years ago
Alex Schultz 7d1b738910 Use undercloud upgrade to update all required pkgs
Rather than require the end user to manually update packages prior to
kicking off the undercloud process we can do it ourselves by
implementing a flag to skip the update and invoking the upgrade after
the packages have been updated.

Change-Id: Idda6387922adeb182afd11cb0d692d1fcceff9a8
Related-Bug: #1869776
3 years ago
Luke Short 67c49244be Expose --limit, --skip-tags, and --tags on the CLI.
This change will provide the operator the ability to better control
a given deployment or operational task while leveraging the
tripleoclient.

A utility has been added to sanitize user input. This will ensure
the parsed string is in valid ansible limit format.

Change-Id: I190f6efe8d728f124c18ce80be715ae7c5c0da01
Depends-On: I0056fdbe3d9807e6baf4a1645a632ab9eb1b2668
Signed-off-by: Luke Short <ekultails@gmail.com>
Co-Authored-By: Kevin Carter <kecarter@redhat.com>
3 years ago
Zuul 5419a8db5f Merge "Remove openstack overcloud failures command" 3 years ago
Rabi Mishra 7cef22cc68 Remove openstack overcloud failures command
This was added to fetch the ansible errors via mistral api. We had
long removed the json_error.py callback plugin that used to write
ansible-errors.json, when moving ansible code to tripleo-ansible
repo and the command is useless now. Also, users won't need it as
they can get the errors from ansible.log.

Change-Id: Iceb4c282f3ae9fcb2c3836263ba66f5792e42334
3 years ago
Zuul 18f20b7537 Merge "Move ansible hosts file as a constant" 3 years ago
Alex Schultz c08c5c2b92 Add login flag to container image prepare defaults
If a registry requires authentication and --local-push-destination is
not used, a user may need to enable the login functionality. This change
adds a --enable-registry-login flag to `openstack container image
prepare default` that can be used to ensure the
ContainerImageRegistryLogin flag is defined as true.  Previously this
would have needed to be added in elsewhere.

Change-Id: I809023604fe119ba162638d921ffec56d4eb72f2
3 years ago
Zuul 2b6fc058f7 Merge "Simplify setting deployment status" 3 years ago
Zuul 47f570045a Merge "Set correct deployment_status in deployment stages" 3 years ago
Rabi Mishra d85997c2fc Remove redundant loading of file to read extra_vars
No need to read the file as ansible-runner natively supports[1] it.

[1] https://github.com/ansible/ansible-runner/blob/1.4.2/ansible_runner/runner_config.py#L400

Change-Id: Ieb75232b59e76b4e14cff3dfbd7eaa13422fdfaf
3 years ago
Rabi Mishra 025b88aa38 Simplify setting deployment status
We don't use mistral anymore to set the deployment status.
This simplifies setting of the deployment status and also
removes the usage of DeploymentStatusAction.

Change-Id: I5454510dc3aae681d5b37570a15cf0d0c8a3a114
3 years ago
Rabi Mishra 9a6b7fa663 Set correct deployment_status in deployment stages
We need to set the deployment status before stack deployment
and for playbook failure after the stack deployment.

Change-Id: Ic353b6552d28d66bcc53a7a4df318e60de5bd320
3 years ago
Kevin Carter a947b57094
Add the ability to load vars from files
This change will provide the ability to load extra vars from files, instead
of having to pass options through the CLI parser. By loading vars from file
we can ensure options are made more safe and better handled, especially in
cases when a given option may be massive, as is the case with
`parameter_defaults`.

> A new argument has been added to the ansible playbook runner which will
  allow us to pass options into the method that will be stored in an
  extravars file, which is then dynamically loaded by ansible-runner.
  Information on extravars files can be seen here: [0].
> A test has been added to exercise the new extravars file capability.

[0]: https://ansible-runner.readthedocs.io/en/latest/intro.html#env-extravars

Closes-Bug: #1871338
Change-Id: I9675e587abf3f07e91319a40620a8f4c67fbf97b
Signed-off-by: Kevin Carter <kecarter@redhat.com>
3 years ago
Zuul a54ea2d01a Merge "Fix ResourceWarning: unclosed file" 3 years ago
Rabi Mishra 3ac5df3f0b Add releasenote for removal of overcloud remote execute command
Missed in https://review.opendev.org/716851

Change-Id: I583adc66b45a759a75ed97e55064401af6fe9702
3 years ago
Alex Schultz 561bf0db29 Fix ResourceWarning: unclosed file
Fixing resource warnings as raised in
https://review.opendev.org/#/c/713807/

Change-Id: I2d7735751e504a10dbcf73a2fea832deeca664f0
3 years ago
Zuul 60ea5a3a4b Merge "Update necessary packages before undercloud upgarde." 3 years ago
Zuul 0248af68c4 Merge "Fix misused deployment vs connection timeouts" 3 years ago
Zuul 838b37216d Merge "Invoke ansible from writeable workdirs" 3 years ago
Bogdan Dobrelya 9c602da452 Fix misused deployment vs connection timeouts
Fix misused ansible connection timeout and deployment timeout passed in
config download and ansible runner utility.

Allow ansible runner utility to be given a job_timeout as well.

Also fix the misuse of timeout parameters in related worklows. Add
--overcloud-ssh-port-timeout and use it to configure ansible connection
timeout for the DeleteNode interace of the involved
workflows. Then use the timeout parameter as real timeout instead of
mistakingly passing it as a connection timeout.

Add new unit test for ansible timeout in config_download. Add missing
coverage for the existing timeout-related params in other unit tests.

Closes-Bug: #1868063
Co-authored-by: Kevin Carter <kevin@cloudnull.com>
Change-Id: I2a4d151bcb83074af5bcf7d1b8c68d81d3c0400d
Signed-off-by: Bogdan Dobrelya <bdobreli@redhat.com>
3 years ago
Zuul dd71c6949f Merge "Ensure the undercloud output dir constant is consistent" 3 years ago
Sofer Athlan-Guyot 0227a54473 Update necessary packages before undercloud upgarde.
This used to be a manual step in the tripleo process. You still have
to update python-tripleoclient and tripleo-common manually.  But:

 - "openstack-tripleo-heat-templates"
 - "openstack-tripleo-validations"
 - "tripleo-ansible"

can all be installed from this process as we spawn another new process
"openstack tripleo upgrade".  Thus all those packages will be
available for it.

Note that tripleo-common should still be installed before running that
command as some of its code is used by tripleoclient.

Eventually adding version dependencies from python-tripleoclient to those
other packages (or from tht which would stay a manual step) looks
challenging as it would be hard to track which version work with which
version.

Change-Id: Ic258f314074007e7e5fd16d87448ffb7a3447fc3
Closes-Bug: #1869776
3 years ago
Bogdan Dobrelya d9174e83fd Invoke ansible from writeable workdirs
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>
3 years ago
Andreas Jaeger 655e0178a1 Cleanup py27 support
Make a few cleanups:
- Remove python 2.7 stanza from setup.py
- Add requires on python >= 3.6 to setup.cfg so that pypi and pip
  know about the requirement
- Remove obsolete sections from setup.cfg:
  * Wheel is not needed for python 3 only repo
  * Some other sections are obsolete
- Update classifiers
- Update requirements, no need for python_version anymore

Change-Id: I45b5b8582b67b39823a6e21221c491842b390b96
3 years ago
Kevin Carter 624a61f206 Update verbosity so it is consistently set
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>
3 years ago
Zuul c7ff66854a Merge "Remove update parameters workflows" 3 years ago
Zuul 62a71bf14d Merge "Remove mistral from the plan_undeploy workflows" 3 years ago
Zuul e89836d2d6 Merge "Set scp_if_ssh to True in ansible client configuration" 3 years ago
Zuul f88603ed1a Merge "Remove overcloud remote execute command" 3 years ago
Zuul 4d58c9cff8 Merge "clean up tripleoclient zuul layout, remove centos-7" 3 years ago
Zuul a071071f05 Merge "Improve container_images_file comments" 3 years ago
Zuul dae2309236 Merge "Bump python-openstackclient" 3 years ago
Zuul 0eaf44d198 Merge "Remove OrchestrationDeployAction call in ffwd upgrade prepare" 3 years ago