This PS implements the following changes:
- switches freeze approach to requirements-direct.txt and
requirements-frozen.txt files
- adjusts code tabulation style according to yapf recommendations
- replaces deprecated usage of responce.body attribute with
responce.text
- fixes integration tests in controlled by Makefile + tox
- uplifts Helm to v3.9.4
Change-Id: I751db72eb8f670825382f11a36657112faeb169a
During MAAS enlistment (and commissioning), an IPMI account (named
"maas" by default) is created on each node, which MAAS then uses for
power management.
This change allows MAAS to use the same credentials as the ones used by
the OOB driver, by overwriting the power parameters for the discovered
nodes. This includes the power type, so if the node is configured to use
Redfish, then Drydock will update a MAAS node discovered as IPMI to use
Redfish instead.
It also provides an option to instruct MAAS not to recreate IPMI
credentials during commissioning, which is passed through to the MAAS
API. Setting this to true is only supported in MAAS 2.7 or later [0].
The two maasdriver configuration options are introduced in drydock.conf,
along with their default values:
[maasdriver]
use_node_oob_params = false
skip_bmc_config = false
These options do not prevent MAAS from creating the IPMI account during
enlistment - this would require addition MAAS customization.
0: 8842d0bfd3
Change-Id: I24d3bc3b1cc94907d73bc247de3fc06dd4750ab1
The MAAS API call "GET /MAAS/api/2.0/machines/" retrieves information
about every machine known to MAAS, which is very slow. The API supports
filtering based on hostname and mac_address (among others), and querying
for power parameters for all nodes at once.
This change modifies identify_baremetal_node to avoid calling refresh on
the full machine list.
Also, the refresh method of ResourceCollectionBase is updated to allow
passing of params, which can be used to take advantage of the filtering.
Note that a filtered call to refresh overwrites the resources collection
to only contain the returned values.
Most calls to Machines.refresh() aren't really needed at all - they are
replaced with a call to Machines.empty_refresh(), which will still make
sure that the API endpoint is accessible but return an empty collection.
(This may get removed entirely in the future.)
Change-Id: Ie58c45e1790c5c827d9d47f5582214ca519946de
Flake8 version recently updated to include new PEP8 rules. Some of
the codebase is not compliant with the new rules.
Change-Id: I0f5b3d41ee54ff0d9ffa05f733f98c7e34f0f258
Signed-off-by: Alexander Hughes <Alexander.Hughes@pm.me>
- Drydock should support defined networks that MAAS cannot
see. This fixes an issue that caused this use-case to fail
by ensuring that the MAAS client models with no internal
resource IDs work.
Change-Id: I1a20d4730e94eee7268ff0cc3451e4b459a1e62b
- If two threads concurrently update the power parameters
of VMs on the same libvirt host, it seems to leave MAAS
with broken state. Add locking in Drydock so that Drydock
does not do this concurrently.
Change-Id: I85575f4ba48152b4dc79c646871f33b69f845ab9
This patch implements Refish as new OOB driver for Drydock.
All the existing Drydock Orchestrator actions are implemented.
Change-Id: I31d653fb41189a18c34cfafb0f490ca4f4d661b5
- Update the maasdriver to support two concurrent
rack controllers when configuring networking.
- Identify a baremetal node from both the MAAS node and
rack controller collections
- Relax validation to only require at least one healthy
rack controller
Change-Id: I04beb56a8212b65061840021b13b412fbb37ae81
Adding the baclient code to Drydock requires a refactor
of the build automation to support multiple languages
and multiple artifacts included in a single Docker image
NOTE: the go source here is a placeholder 'hello world' sample
Change-Id: I1b4883f018b33b3d4fcd7cbcb6cba660fcdc93de