Glance will soon be switched off by default, so the baremetal
management code needs to handle the glance endpoint not existing.
This change returns None from get_image_client when there is no glance
endpoint.
The only callers of get_image_client use the result to call
create_or_find_kernel_and_ramdisk[2]. This function only requires a an
image client when the image reference is not a valid URL, and handles
a None client with image URLs just fine.
[1] https://review.opendev.org/711364
[2] https://opendev.org/openstack/tripleo-common/src/branch/master/tripleo_common/utils/glance.py#L22
Blueprint: nova-less-deploy
Change-Id: I703660e72a934e8b0925d63a19cb78f603bff5ba
Its only usage was remved in https://review.opendev.org/#/c/694287/.
That patch incorrectly mentions that it's removed from
tripleo-common.
Task: #38839
Change-Id: I491aac723d58426b912c1b51873421b7077ed9da
Moves the code for updating plan environment and parameter
caching related functionality to utils/plan.py.
Story: 2007212
Task: 38577
Task: 38578
Change-Id: I73407fdd6a1990e91ca2a8d8843901948ec256e3
The ironicclient.v1.client.Client started requiring passing a Session
with 3.0.0. Use the high-level interface ironicclient.client.get_client
instead since it can create a Session for us.
Change-Id: I913f5b127be59cb86df2102724ba1f3cea10f384
Closes-Bug: #1845189
During upgrade to a nova-less undercloud, existing ACTIVE nodes won't
have an allocation entry. The allocation API allows backfilling an
allocation entry for an existing node without going through the full
allocation process. This change checks for a missing allocation entry
for existing nodes and creates one where necessary.
This will make upgraded nodes appear to be the same as nodes
provisioned by metalsmith.
Change-Id: I5b6fc2594089557e64bea8a6a35b8f87d4933f4e
Blueprint: nova-less-deploy
The context sent to actions by Mistral has changed. It is now a class
with the potential to carry more context information - we only use the
security context at present. This updates the context usage to make it
use the security attribute.
Closes-Bug: #1718353
Change-Id: I759a1d7a2da0a978b5b784be9f0e58a549b51e06
This will be used to upload validations to Swift on undercloud deploy.
Implements: blueprint store-validations-in-swift
Change-Id: Ia08d5eea17450db94279c95078453831c0017a67
This patch enables the swift upload for big files (+5GB)
in TripleO.
Also, adds support to the undercloud backup CLI to upload
big backups to swift.
Change-Id: I80163c8df15377dd3b5a44b5439a23223d8cccee
Depends-On: Iff73833f1d470750862873f70a4a9aaba50bd164
Closes-Bug: 1761412
Set the physical_network property of barematal
ports to 'ctlplane' by default.
Implements: blueprint tripleo-routed-networks-deployment
Change-Id: I726c72e26ae3707d4f8fa7396bfac1840c134a27
We were using deprecated arguments to create the client, which have
been removed in I9df8296ddc1b41cde22ff8b0f26d73c4408741ce.
Also make explicit the keystoneauth1 requirement - the library is
already used in other parts of the code but wasn't explicitly
referenced.
Change-Id: I2314020a6414f90d964f7be474668658913e61b9
Closes-Bug: #1747057
This removes some duplication and can be reused in a future patch
switching the ansible action to use the TripleoInventory class.
Change-Id: I5278ec75c2ff714c148901f723fb6ef5e1327f49
Ife653558bfcda794e7f37086832f70b0ad7c28a4 changed the way this data is
represented, now there's a nested context with the security data in,
and the old interfaces are deprecated.
Change-Id: Id0ba10d1192314187bedb14998d4aadc5fb91ef5
Closes-Bug: 1740891
Tripleo-common clients were not using session. Add keystone sessions to
some clients.
Change-Id: Ic9cd67cce307d489a514254d3f3200a058a009a2
Closes-Bug: #1733345
In order to allow sending messages to zaqar queue we need to
provide Zaqar client in TripleOAction.
Change-Id: I2378e3626a415fd0cdf085735a4ed890e6aa61f4
As project_domain_name and user_domain_name were not passed in creating
novaclient it tries to reach keystone v2(non existing) and fails.
Change-Id: I9a952f8c8eef5d9fc1d331b6c2da26084526ad8d
Closes-Bug: #1723171
This is required to fully use the power of the new-style drivers, but
was missing when support for hardware types was originally introduced.
Change-Id: I6ad2b669023cf7a08acb69fce7e1058bb7e699d6
Closes-Bug: #1706411
The keystone utils for getting project endpoints is the last reason that
we import directly from Mistral. This change copies over the relevant
code that we need.
Removing the dep also discovered two dependancies that we had but didn't
explicitly state previously.
Change-Id: If4cb4ac4ca75ea0f165196b4a0a08ea3d3a16e25
mistral_lib base TripleoAction has a context in the run method
signature. These changes remove the mistral.context and make use
of the one provide by the default executor
Change-Id: Ib1a5aa8d5735b05f5308dc943ac088b5eeeec253
This caching in swift changes the time for the GetParametersAction from
15s to 3s
Added tests for plan.UpdatePlanAction as there were none there.
Change-Id: I0b543e082a3b02a35e3e979339698ae237b32ce4
Closes-Bug: #1647301
The current novaclient creation code passes in a url parameter which
isn't valid. This change updates the client creation and uses the same
code as Mistral does for it's own OpenStack actions.
Change-Id: Id72cefcb7a1bd9baf515dd95f389d206a3ccf01a
Closes-bug: #1665637
The underscore typically designates these methods as private, but
they are intended to be used by any/all of the subclasses. This
change clarifies the API.
Change-Id: I4dc95a0e1f84570b184f8b75f51a2c1456909fb9
This patch sets the following defaults in the swfit connection to
manage retries.
retries – Number of times to retry the request before failing
starting_backoff – initial delay between retries (seconds)
max_backoff – maximum delay between retries (seconds)
Change-Id: I26fcb994f91309eedb9d8ccc17939bc9f4c6a116
Closes-Bug: #1634195
This patch is bumping the max_retries and retry_interval when
instantiating the Ironic client to 60 seconds. This is to workaround the
NodeLocked problem that might happen to some baremetal commands.
Looking at some TripleO-CI logs it's not uncommon to see this exception
being raised when it's registering nodes in Ironic, that's because
commands like --register-nodes does also change the node's state to move
it from "manageable" to "available" which may conflict with the periodic
task in the Ironic conductor syncing the power state.
A FIXME was left in the code noting that we should use the
ironicclient.get_client() functions instead of instantiating the
Client() class directly, that's because the Client() class does not
validate any parameters.
This patch also adds a new unittest module for the actions/base.py which
is currently not unittested at all.
Closes-Bug: #1612622
Change-Id: I09501ee989d881b727434275fc0384fb5b67aa32
The root device configuration code and unit tests come from the
python-tripleoclient project. By moving them into a common Mistral
action, they can be reused by other clients like the UI. The workflows
will also be used for the new 'overcloud node configure' command in the
client.
Change-Id: I5ba0a3710012c44822dd3b8e69662bbef04d3787
Related-Bug: #1595205
This patch adds a custom wrapper around the tripleo-common
utils/nodes.py register_all_nodes function so that we can
call it in a workflow to help register nodes.
Co-Authored-By: Ryan Brady <rbrady@redhat.com>
Co-Authored-By: Dougal Matthews <dougal@redhat.com>
Change-Id: Ibd5b2f12b453b70c54272e43ae31195895bd4a20
Depends-On: I17116c0f995ab76ed79bd8b2df57629c1ed4e4d0
This patch includes the base elements needed for integrating Mistral
and TripleO. For a development workflow, clone the source code and
use the following steps:
* Create additional actions in the /actions directory
* Add an entry point in the setup.cfg file [entry_points]
* See README for instructions on importing actions into Mistral
Change-Id: Iac675122e79c6f9b2f41ba455c15d6422c796929
Co-Authored-By: Dan Prince <dprince@redhat.com>
Co-Authored-By: Dougal Matthews <dmatthews@redhat.com>
Blueprint: mistral-deployment-library
Depends-On: Ibb98013d6ef283bd454f958bb036557d2b02997f