Commit Graph

31 Commits (2f9215b2535a976e1d1568650aa78be3fe8b5606)

Author SHA1 Message Date
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
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 <>
2020-04-04 03:46:36 +00:00
Rabi Mishra 197f5cf9cb Remove CreateContinerAction usage
This replaces the CreateContinerAction calls with tripleo-common
api call.

Change-Id: I58ad4b4b00b0889a16b2a211d8dbbd1a967f88ae
2020-03-25 10:54:43 +05:30
Rabi Mishra 4a55e5b9c2 Use ansible playbooks for plan creation/update
This removes mistral usage from plan create and
update cli commands by calling the new playbooks.

Change-Id: Icdc6c22a4e9fde316ef1700a4ee484a06c9dfd7d
2020-03-22 08:51:11 +05:30
Zuul d6e526a9de Merge "Don't use the delete_deployment_plan workflow, call the action directly" 2020-02-26 08:18:21 +00:00
Kevin Carter aefda7f205 Remove mistral from the create_container deploy workflow
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 <>
2020-02-18 00:36:08 +00:00
Dougal Matthews 5bcf139b30 Don't use the delete_deployment_plan workflow, call the action directly
This workflow only uses one action, we can remove Mistral by calling it

Story: 2007212
Task: 38419
Change-Id: I33d5961518337a8d711e1de751cd4e1fc1a68f09
2020-02-14 13:42:57 +00:00
ekultails 72850060e0 Handle a deployment that was manually cancelled.
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 <>
2019-10-08 17:41:07 +00:00
Emilien Macchi 3982259973 Make _upload_file to work with Python 3
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
2019-03-12 10:43:58 -04:00
Zuul 385a797ccb Merge "Don't validate stack when creating/updating plan" 2019-03-05 02:25:06 +00:00
Rabi Mishra eae703d52d Don't validate stack when creating/updating plan
There may be resource mappings in user_environment.

Change-Id: Ia2299698dfb5d7afb374e9ac2d7908c7cc6bbc22
Closes-Bug: #1817539
2019-02-25 17:57:39 +05:30
apetrich cad7916ce8 Remove execution from workflow message send
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
2019-01-21 09:26:04 +01:00
James Slagle 339c1f334c Filter messages not from waiting execution
The convention is to use the same queue name ("tripleo") for all
workflows. This can lead to messages showing from other tripleoclient
triggered workflows showing up during message polling if multiple
workflows are running at the same time.

This patch adds a check that will filter out any messages that do not
belong to the execution that is being waited on by comparing the
execution id with the root_execution_id returned in the execution

Depends-On: Icbe80c338d69efc6ce8fceb0f73f833bec588536
Change-Id: Ie6473d6a1044cdf76552d62645b4d63da2df9398
Related-Bug: #1794277
2018-09-28 09:00:37 -04:00
Bogdan Dobrelya 8f1caf7abf Align roles file to become a normalized path
Extend the tripleo client Command class to fetch heat roles data
from a role file. That new class method is shared by many derived
classes afterwards and used for containers images preparations,
containerized overcloud, undercloud and standalone deployments.

Apply normalization to the roles_file in plan management and
preflight checks as well.

Change-Id: I7b35e117b9d12f1e5a51e2ee0465244692d33e33
Signed-off-by: Bogdan Dobrelya <>
2018-07-26 12:06:20 +03:00
Zuul a5a56b8a9c Merge "Changes Delete Plan to Call Workflow" 2018-04-03 18:30:36 +00:00
Jiri Stransky f55ad2c80c Persist user-files/* for 'overcloud update' command
Reuse the generic file persistence logic to persist also any files
under "user-files/" path in the plan. These are files that can be
potentially referenced from other files in the
plan (e.g. user-environment.yaml) and if they aren't persisted, the
plan could get into inconsistent state (broken references).

Change-Id: I54d10b11e024a481a9ff905a7cce79cb7f562ea0
Closes-Bug: #1749700
2018-02-21 11:22:55 +01:00
Jiri Stransky 8e715b9dea Preserve roles_data and network_data
This will make sure that we keep existing roles_data and network_data
during a plan update, unless the user has passed in new files on the
command line.

Partial-Bug: #1749700
Change-Id: Ic059f50f0b2a3a2b20011851cb0b1576192c0d00
2018-02-21 11:22:55 +01:00
Jiri Stransky d1db364fec Use the generic preservation method for plan-environment.yaml
This reuses the previously introduced generic file preservation method
in a deployment plan to keep plan-environment.yaml too.

We can also get rid of the separate password keeping, as they are part
of the plan-environment.yaml.

Partial-Bug: #1749700
Change-Id: Ib64296daaa81ff4fb19f1c199ecd6507ab2fb71c
2018-02-21 11:22:51 +01:00
Ryan Brady af19f35b00 Changes Delete Plan to Call Workflow
This patch updates the code and associated tests to change the
from directly calling the tripleo.plan.delete action to calling
the tripleo.plan_management.v1.delete_deployment_plan workflow.

Change-Id: I6d41f74f9271c17bcae67eb3c09460051f55667f
Depends-On: Ibaf3ee800de56309e014be53e698affc358c9f5a
Partial-Bug: 1640436
2018-02-20 14:18:18 +00:00
Toure Dunnon 1bd1620ead Tripleoclient unified queue name.
This will allow the cli and tripleo UI to share a common queue,
which will help with scripting the frontend behaviour or track
the progress of the cli from the frontend.

Related-Bug: #1603345

Change-Id: I5849983eee82b5a56cae1bf38a3c2694b6b291db
2017-11-06 13:46:14 -05:00
Jose Luis Franco Arza 48ece990e4 Add tests for networks-data option
Change-Id: Ib6b0777aa69046fc52bf99b407a282352704941b
Partially-Implements: blueprint composable-networks
2017-09-14 17:18:57 +02:00
Jaganathan Palanisamy b0de593246 Optional override of the plan environment file
This change is to add optional override of the
plan-environment.yaml file with custom plan environment
Implements: blueprint tripleo-derive-parameters

Change-Id: I45e8103826fdee76a8ec40aebd95cb5551cc5fed
2017-06-23 05:56:55 -04:00
Ana Krivokapic 961eca1397 Use Swift to store Plan environment
Start using the plan environment file in Swift for plan environment
storage instead of Mistral. Take care of migrating plan environment
data from Mistral to Swift when necessary.

Partially implements: blueprint stop-using-mistral-env
Co-Authored-By: Julie Pichon <>
Change-Id: I3bcef27413e685c498165b43a8b59c8c9cc5cf5e
2017-05-26 16:45:06 +01:00
Dougal Matthews ad0aae9cff Support multiple messages from create/update_deployment_plan
This updates the workflow wrapper to use the multiple message interface.

Change-Id: I972a4f5baebf4e719243b7519eb3189cd2036dde
Partial-Bug: #1646887
2017-03-28 16:16:50 +00:00
Saravanan KR 26b3ac7af1 Provide an option to disable password generation on deployment
Operators may choose to use the passwords provided by them and
does not intend to generate during the deployment. Provided an
option to disable password generation if requested by user explicity.
It will be helpful to identify if there are any new passwords added
which has to be added during the deployment update by the operator.
By default, the password generation will be enabled.

Partial-Bug: #1611704
Depends-On: I141a0727db9f19f80712e2c40069622ecc22d969
Change-Id: Iedfd7fd1456ed61cb9208532d15bdb63fbc01de9
2017-01-23 16:45:19 +05:30
Alex Schultz 1082fdb518 Fix plan delete
As part of the overcloud delete implementation, we refactored the plan
delete to be a shared function. Unforunately the wrong inputs were being
passed to the workflow so it would return an Invalid input error. This
change fixes the input so that the container is properly passed to the
workflow as an input.

Change-Id: I33032c9e6f4a8cf002e65ebab60752c44fb5fdb2
Closes-Bug: #1647747
2016-12-13 16:24:08 +00:00
Alex Schultz 7dd16b1da2 Implement overcloud delete command
This change adds an overcloud delete that will delete the stack and
issue a plan delete for the overcloud in a single command.

Change-Id: I97a2b5606f47deb929972c06c869cd1eda0dc9a6
Closes-Bug: #1632271
2016-11-28 13:26:11 -07:00
Dougal Matthews bb72623e8c Save the result of direct action calls in Mistral
Mistral now allows us to run actions synchronously and have the result
be saved. This is useful for audit purposes as direct action calls will
now show up in `mistal action-execution-list`.

Closes-Bug: #1631281
Depends-On: I00c6301394512e123436ca6c5650827c2475308e
Change-Id: I4d5167d5fea5e75ae7246d1e92537489fc9a6f1e
2016-10-14 14:36:49 +00:00
Steven Hardy a6221608bd Add optional overcloud deploy roles_data.yaml override
Allows users to optionally pass -r roles_data.yaml to override the
default file in the plan.

Note this is the first step, a similar interface needs to be added
to the overcloud plan create command but this may require rework
of the default plan creation workflow (or some way to re-trigger
the j2 templating after modifying the roles data).

Change-Id: I5c6e22fe9516c4e2dad4495127d923f971c32f5d
Partial-Bug: #1626955
2016-10-04 19:03:59 +01:00
Dougal Matthews 12f32846c3 Remove another openstackclient import
osc_lib should be used instead of openstackclient now.

Change-Id: I656ec078b25127f350a5528e70242c737df1e391
2016-10-03 13:02:20 +00:00
Julie Pichon fe28e43c3e Stop plan creation when container exists
The action result was not properly checked, leading to errors being
missed and the plan creation failing, sometimes silently.

Change-Id: I8c5391be5ff7bc4c7227ebbe4f8200eda6f8de09
Closes-Bug: #1621493
2016-09-23 08:30:18 +00:00