After fixing a bug with https://review.openstack.org/#/c/603802/ the
return introduced there is bogus, we have to raise a proper exception
and handle it like timeouts, to get all the mistral allright.
Change-Id: Idcdbd38129f5694c5452f3f8aca0388df80476b2
If the WebSocket connection is already disconnected we don't have to
wait for messages
Change-Id: I7543c8e61711f036140db20416a57447da6c4c18
Closes-Bug: #1793264
When creating zaqar websocket client, if the endpoint has tls enabled
provide the CA to the client.
Closes-Bug: 1791970
Change-Id: I09fca4ea80ae8246f136ea6998dfc7ad1c6bb4d2
Currently we have no record of this, it would be useful to include it
when --debug is used on a CLI command.
Closes-Bug: #1776874
Change-Id: Iec3267423594db838a5c8c0624aaae23aab0f488
Now that we share a queue with other commands and other clients (the GUI
at least) we should never delete the queue.
Closes-Bug: #1757984
Change-Id: I1555b5e43984dea941885f221c4ec46092a34735
For update and upgrade, we need to pass a different queue name
to the websocket in order to read the ansible runtime
This review allow to pass another queue than the tripleo default
one
Change-Id: I7166093cf1a26969425b33f4442f45fa8dc707f0
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
This patch refactors undercloud deploy:
- Cleans up the ordering so that you can plainly see what is happening.
- Calls heat to resolve the stack without actually doing anything.
- Downloads Ansible from resolved heat stack.
- Calls ansible directly with exec().
- Cleans up error handling to be very clear in the case of any errors
from the script or from heat.
- Kills heat silently and reliably.
- Removes fake keystone.
- Removes any yum updates.
Co-Authored-By: Dan Prince <dprince@redhat.com>
Depends-On: I03f1789957ba157871fd13164592116d7fcdabe4
Depends-On: I5413ae4eadd5affdd1ae01678b61eafbe50b7919
Change-Id: I9fce6477566b439ceb2b5dc25eae307af9c9cc2b
Currently, tripleoclient will ignore messages from workflows if they
don't match the execution ID of the worflow it starts. This can happen
if the workflow starts sub-workflows, which run under their own
execution ID. tripleoclient will also stop listening for messages after
it recieves the first message from the workflow it started. Meaning, it
assumes the workflow to send one, and only one, message.
This change tackles the first limitation, by turning the message
consumption into a generator which yields each message one at a time.
It then starts a convention of assuming the workflow has finished if it
recieves a message with the top level execution ID and it contains a
status that isn't "RUNNING". For example: {"status": "SUCCESS"}.
Partial-Bug: #1646887
Change-Id: Ida07718b4fab41e0a6088f2db8f9b42b6fb09f72
This patch adds a new 'undercloud deploy' option which:
-installs and configures os-collect-config, and hooks using instack
-forks an all-in-one heat-api/engine process using noauth
-spawn our own fake keystone thread for noauth Heat
-creates a Heat stack for the undercloud using t-h-t
-starts os-collect-config to drive the deployment of Heat
metadata
Partially-implements: blueprint heat-undercloud
Depends-On: I50a8cc46b4c3c235d438a711760fba94bf8e9715
Depends-On: I36df7fa86c2ff40026d59f02248af529a4a81861
Co-Authored-By: Ian Main <imain@redhat.com>
Co-Authored-by: Flavio Percoco <flaper87@gmail.com>
Change-Id: Ib05062e3710aeec922988d5f1308be44b5468473
This patch adds a mechanism for setting a timeout when waiting for websocket
messages. It then adds it to workflow executions which are fairly predictable.
This means that they always take roughly the same length of time. Other
workflows like baremetal introspection can be much slower or quicker
depending on the the users environment.
Closes-Bug: #1618445
Change-Id: I656735d58b1b676148e6ceacfc9861b3c5f44e5d
This new library provides the common logic used by openstack
clients. Replacing the imports from openstackclient and cliff.
Depends-On-External: https://review.rdoproject.org/r/#/c/2088/
Depends-On: I095209c241876c6ab48595962e07144fc5cc34a6
Closes-Bug: #1620964
Change-Id: I103a13ff6c0af94b82f5e48652380adfbf331d34
Give the user some additional information when Zaqar is down. Also,
move the websocket import to the third-party import list.
Change-Id: I8d4caf2ba08bceba1f014555ccd6ae3ca1a4a6c0
Closes-Bug: #1619712
This uses the new Mistral actions and workflows to create a
plan with the tripleo heat templates. Templates can either
be provided by the user or the default templates on the
undercloud can be used.
Closes-Bug: #1616014
Change-Id: I4f82fda01215b9a45669862ef26c69421fdaad59
tripleoclient WebsocketClient used a private auth attribute. This
switches it to a more public api.
Change-Id: Ib6a3ad21b9d770dad943b6e567cfbea8402cc84f
Closes-Bug: #1605876
The socket is bound to the queue name and this this removes the
ability to work with multiple queues and if the websocket it
closed it can't be easily recreated.
Change-Id: I6d05b9536111a77a54b818dcf1a9d030ad464e7f
This also adds the ability to use the websocket client as a
context manager which simplifies the requirement of calling
cleanup.
Co-Authored-By: Dougal Matthews <dougal@redhat.com>
Change-Id: I80ce73a4fdf6d1f12495960f2c4bf460f1875e4e
Updates the plugin ClientManager so that we support creating
a websocket authenticated with Zaqar so that actions can
interact with Zaqar queues.
Co-Authored-By: Thomas Herve <therve@redhat.com>
Co-Authored-By: Dougal Matthews <dougal@redhat.com>
Depends on external: https://review.rdoproject.org/r/#/c/1289
Partially-implements: blueprint remote-execution
Change-Id: Idf522b3d4193776a5b6626cef28336820257d4e7
Use the OSC-compatible orchestration client instead of the home-grown
one. This reduces duplicate code, and relies on more thoroughly tested
code elsewhere.
Change-Id: Ib77d20086f86a260197c6f289fd9c270b766544c
Depends-On: I7aa0fd7c152ee91b6e2b956f7e594f8c8aacafa7
The Ironic client now supports the OSC plugin interface directly, so
this wrapper is no longer needed. Removing it will allow us to specify
which Ironic API version to use via the standard mechanisms.
Change-Id: If92855c307ecd389fbe6050e426d0ced959a9665
Depends-On: Icdbd28c487351af6d67205837aa536aedb31b41a
Use a property instead of a function. This is more in line with how the
clients are referenced with openstackclient, thereby making it easier
to switch to the Ironic OSC plugin in the future.
Change-Id: I0b4d35f0af6136dd1bce6c6d4202caa52f4c042e
Use a property instead of a function. This is more in line with how the
clients are referenced with openstackclient, thereby making it easier
to switch to the a Heat OSC plugin in the future.
Change-Id: I849593e6328f3883235e9ae34232f92d6b3c0d80
This change removes Tuskar support from the following commands:
- openstack overcloud deploy
- openstack overcloud node delete
- openstack overcloud update stack
This removal is due to the limiting nature of Tuskar, we can achieve everything
we need and more without it. The change also removes python-tuskarclient from
the requirements and if the Tuskar CLI (openstack management commands) is
required it will need to be installed independently.
This change is dependant on the Tuskar examples being removed from the
documentation. These are removed in the dependant change ID below.
Depends-On: I2d4aa114156c5bafb003e6a67862ed6d1449fd98
Change-Id: Ic6fd4568054fe91b8fc898728022a7d7ed8cf3cf