Commit Graph

2833 Commits (701c146bd748bcf9c0228cea593539a3521661ca)

Author SHA1 Message Date
Rabi Mishra 701c146bd7 Remove unused write_overcloudrc() function
Change-Id: Ifb3df132802dc1380e9949528416ecfed882cd06
2020-05-13 13:19:14 +05:30
Zuul 9c5a51861c Merge "Fix upgrade prompt" 2020-05-13 07:26:02 +00:00
Zuul 8145eb382a Merge "Only show sudo hints when relevant" 2020-05-13 00:59:10 +00:00
Zuul a3270036bf Merge "Use ansible playbook for creating overcloudrc" 2020-05-12 22:21:10 +00:00
Zuul 178a48e793 Merge "Inspector set baremetal port physical_network" 2020-05-12 19:32:15 +00:00
Alex Schultz c0b0a5aa67 Fix upgrade prompt
We need to prompt the user if we should upgrade earlier in the code so
we can handle additional things like package upgrades in the undercloud
upgrade after the prompt. This change pulls the confirmation logic out
of tripleo_deploy and reuses the prompt_user_for_confirmation code in
the tripleo upgrade and undercloud upgrade actions.

Change-Id: I8dbcae39e6f6d966c1337bad5fb5ba673f7be874
Closes-Bug: #1877825
2020-05-11 10:07:51 -06:00
Zuul 5a8255b44c Merge "New command "overcloud node extract provisioned"" 2020-05-07 19:29:53 +00:00
Zuul 265a39f6fb Merge "trivial: add spaces after punctuation in config help text" 2020-05-07 02:03:42 +00:00
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

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
2020-05-06 20:29:30 +00:00
Rabi Mishra 6268bdea73 Use ansible playbook for creating overcloudrc
This uses the new playbook to create the rc files.

Change-Id: I6fe6d2f7f2c41214e501daf4fc16673f1ab47472
2020-05-05 17:18:16 +05:30
Zuul 5951a20650 Merge "Fix stack create verbosity" 2020-05-04 03:56:57 +00:00
Zuul 90ef9f277b Merge "Add call to cleanup_ipa.yml playbook when doing a stack delete" 2020-05-02 20:12:27 +00:00
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
2020-05-01 08:38:02 -06:00
Zuul eadf2b82d9 Merge "Don't override default verbose_level" 2020-05-01 00:23:28 +00:00
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
2020-04-30 14:33:53 +00:00
Kevin Carter 329cad5794
Add stack_name support to ANSIBLE_INVENTORY
This change updates the ANSIBLE_INVENTORY constant to support stacks with different

Change-Id: I601ff211d53a29dbda195cb2df8708e57efbcb94
Signed-off-by: Kevin Carter <>
2020-04-29 17:29:33 -05:00
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
2020-04-29 11:40:51 +05:30
Zuul c28e805b63 Merge "Remove workflow_engine from client setup" 2020-04-29 02:47:54 +00:00
Zuul fd64df6294 Merge "Raise a new ValueError with the contents of the JSON is parsing fails" 2020-04-28 22:55:47 +00:00
Zuul 0b803fb2d2 Merge "Add login flag to container image prepare defaults" 2020-04-28 22:55:46 +00:00
Zuul a8d2ba9fbe Merge "Cleanup py27 support" 2020-04-28 18:49:01 +00:00
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 <>
2020-04-28 09:47:13 -05:00
Zuul 81a4336908 Merge "Don't use mistral directory as WORK_DIR for config-download" 2020-04-27 15:03:17 +00:00
Harald Jensås 9cd91775f2 Inspector set baremetal port physical_network
When deploying routed networks the physical_network
attribute of ironic ports must be set, this has been
a manual task.

With this change we add configuration for the
physnet_cidr_map processing hook in ironic inspector
so that the physical_network field of ironic ports
is set automatically when introspecting nodes.

Closes-Bug: #1870529
Change-Id: I7f31b9f0143507ec3c9c26efd086f0bd95ef2ce7
2020-04-24 17:52:29 +00:00
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
Change-Id: Ib4c9c47baabd64f008c4f61e4fa8c37a311350a3
2020-04-24 12:26:41 +05:30
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 <>
2020-04-23 09:51:02 -05:00
Zuul e0750c44a7 Merge "Expose --limit, --skip-tags, and --tags on the CLI." 2020-04-23 14:35:41 +00:00
Zuul 222976efe1 Merge "Use undercloud upgrade to update all required pkgs" 2020-04-22 17:55:07 +00:00
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
2020-04-21 07:30:28 -06:00
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

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 <>
Co-Authored-By: Kevin Carter <>
2020-04-20 14:45:58 -04:00
Zuul 5419a8db5f Merge "Remove openstack overcloud failures command" 2020-04-20 17:22:26 +00:00
Rabi Mishra 7cef22cc68 Remove openstack overcloud failures command
This was added to fetch the ansible errors via mistral api. We had
long removed the 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
2020-04-16 11:41:57 +05:30
Zuul 18f20b7537 Merge "Move ansible hosts file as a constant" 2020-04-16 00:58:09 +00:00
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
2020-04-15 16:00:59 -06:00
Zuul 2b6fc058f7 Merge "Simplify setting deployment status" 2020-04-14 08:54:40 +00:00
Zuul 47f570045a Merge "Set correct deployment_status in deployment stages" 2020-04-14 08:39:48 +00:00
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.


Change-Id: Ieb75232b59e76b4e14cff3dfbd7eaa13422fdfaf
2020-04-13 09:22:33 +05:30
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
2020-04-13 08:33:06 +05:30
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
2020-04-13 08:32:22 +05:30
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

> 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.


Closes-Bug: #1871338
Change-Id: I9675e587abf3f07e91319a40620a8f4c67fbf97b
Signed-off-by: Kevin Carter <>
2020-04-09 12:35:51 -05:00
Zuul a54ea2d01a Merge "Fix ResourceWarning: unclosed file" 2020-04-09 15:11:44 +00:00
Rabi Mishra 3ac5df3f0b Add releasenote for removal of overcloud remote execute command
Missed in

Change-Id: I583adc66b45a759a75ed97e55064401af6fe9702
2020-04-08 10:37:01 +05:30
Alex Schultz 561bf0db29 Fix ResourceWarning: unclosed file
Fixing resource warnings as raised in

Change-Id: I2d7735751e504a10dbcf73a2fea832deeca664f0
2020-04-07 14:19:41 -06:00
Zuul 60ea5a3a4b Merge "Update necessary packages before undercloud upgarde." 2020-04-07 19:03:48 +00:00
Zuul 0248af68c4 Merge "Fix misused deployment vs connection timeouts" 2020-04-07 17:32:19 +00:00
Zuul 838b37216d Merge "Invoke ansible from writeable workdirs" 2020-04-07 09:39:58 +00:00
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 <>
Change-Id: I2a4d151bcb83074af5bcf7d1b8c68d81d3c0400d
Signed-off-by: Bogdan Dobrelya <>
2020-04-07 09:12:37 +02:00
Zuul dd71c6949f Merge "Ensure the undercloud output dir constant is consistent" 2020-04-07 03:34:18 +00:00
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

Change-Id: Ic258f314074007e7e5fd16d87448ffb7a3447fc3
Closes-Bug: #1869776
2020-04-06 17:55:22 +02:00
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 <>
2020-04-06 09:38:03 +02:00