When listing instances fetch all allocations to a cache,
fetch each nodes allocation from the cache. This is
significantly faster than calling get_allocation for each
node.
time metealsmith list # 250 nodes:
real 0m54.970s vs real 1m45.048s without "cached".
Story: 2010571
Task: 47318
Change-Id: Ic4cef61e338fb57bea5de4f96eb3584386cc5152
Remove or update the corresponding CI jobs. Use the new custom Cirros
image in the HTTP job to avoid relying on CentOS.
Temporary increase complexity requirements while we have a deprecation
warning in the provisioner.
Change-Id: I5e65f9949ee3b78430309017800b88c1ba21dd02
cloud-init will use fall-back config when network metadata
is *not* present. This works fine if the first NIC on the node is
connected to a network with DHCP. But, when the first NIC is not
used for provisioning, cloud-init will only write a fallback config
for the first NIC. This causes the provisioned node to be unavailable.
Extend instance configuration to include network metadata so that
cloud-init can configure node networking.
Story: 2009238
Task: 43378
Change-Id: I70f1a972a6d5a0398cd348f00308957386d66067
Since we've dropped support for Python 2.7, it's time to look at
the bright future that Python 3.x will bring and stop forcing
compatibility with older versions.
This patch removes the six library from requirements, not
looking back.
Change-Id: I19384db89fc2a68376efc3f9f2e05fbd05046fd6
It is useful to see the purpose of a port when viewing a port list or
port details. This change will set the port name to
<hostname>-<net-name> when the hostname is provided to the NICs
constructor.
Change-Id: Ic5789c0c3808afaa6b45408bce51d6c4ca86dbe5
This makes metalsmith consistent with what the nova ironic driver
does, and provides a way of discovering the hostname for a node
without needing to query the allocation API.
Change-Id: I40bbf155421cd2b382f8262eb38393c3300478cd
This change switches from a mix of metalsmith and SDK exceptions
to consistently using metalsmith exceptions.
Change-Id: I43339686a42644877dbe40d1116db1585a8a0800
With the allocation API we will need to provide the hostname as
the allocation name. Thus, we have to do it earlier.
Change-Id: I8afd8af23ad929fd9768e95a82fecd114fdcbfd9
Currently stale values can be left in instance_info (and reused next time)
if a deployment attempts fails. This change ensures that we:
1) Purge instance_info completely on failures
2) Only keep traits and capabilities in instance_info on deploy.
Change-Id: I52a85620d9ac2f471bca6498294871f3bb16d47f
After the switch to openstacksdk we no longer have a sufficient check
on node's availability or maintenance. This patch restores it.
Change-Id: I2c85cf0adb02061b3dd85f19dd10c8a5af1118da
Currently show_instance returns an Instance even if the requested node
is not actually an instance (e.g. just an available node). This change
corrects it. Make list_instances consistent with it.
Also make the states a proper enum to avoid consumers from using invalid
values (I did it several times when working on this patch).
Change-Id: If9aad0d7f4d10a7119d1f0bccc1cc32a918a72e3
It is not going to be compatible with the proposed allocation API,
because the API will have to be compatible with Placement, which
requires resource class.
Change-Id: Ib288e7f933f421d6ff756e6bc4877fd344515c74
Story: #2004341
Task: #28027
The result of get_session does not respect baremetal-specific options
like baremetal_endpoint_override in clouds.yaml.
Change-Id: Idccf4a0fc055dc9b81705b9e3b632a61a8891cfa
Covers a popular case of nodes having a pre-defined IP.
Also moves NICs code to a separate module for clarity.
Change-Id: Id8272cc30728ca68e7ce2efd4f3a2f9887ef7449
Story: #2002171
Task: #26340
Remove ValidationFilter, make it a part of reservation to avoid calling
it too many times. Fix AttributeError on failing the custom predicate.
Remove double validation in the reserver, we do another validation later
on anyway.
BREAKING: changes the exception classes.
Change-Id: Ibc3815989917ab777298a05810fd8f3e64debc8f
Story: #2003584
Task: #26178
If something fails during provisioning, we need to leave the node
intact for debugging. The undeploy command should be used to clean up.
Change-Id: If4bbeceb0307a4df07dbae912db1d7f69c94e3c5