This is the first in a series of commits to add support for codespell. This is continuning the process completed in ironic-python-agent.
Future Commits will add a Tox Target, CI support and potentially a git-blame-ignore-revs file if their are lots of spelling mistakes that could clutter git blame.
Change-Id: I41b2db35cdf21917ac20ed0866af3b9c94789f0b
Often it is beneficial to use the functionality provided by `use_cirros`
and `cirros_deploy_image_upstream_url` to download and test with images
of other OS distributions. This patch changes the variable names to
reflect that use case.
`use_cirros` -> `download_custom_deploy_image`
`cirros_deploy_image_upstream_url` -> `custom_deploy_image_upstream_url`
The functionality of the old variables is retained for backwards
compatability.
Co-Authored-By: Alex Welsh <alex@stackhpc.com>
Change-Id: I8b3a973bd5ef19333af563c170b2a28fbbfb5c76
The _process_sdk function starts by calling cloud.list_machines() which
returns all nodes including their names. There is no need to call
cloud.get_machine individually for each node just to get its name
attribute when we might be skipping this node.
This speeds up execution of the Bifrost inventory module when
BIFROST_NODE_NAMES is used.
Change-Id: I27ccc12b9f408d510710d5ba82ad04135169827a
argparse will remove quotations, breaking extra_kernel_options and
inspector_extra_kernel_options when more than one option is used, e.g.
--extra-vars extra_kernel_options="console=tty1 console=ttyS0,115200n8"
Change-Id: I324e1681303115162656f39d7b6cd60a3e717b9f
Running them without sourcing the venv configuration results in a very
confusing error message from ansible. Prevent that.
Change-Id: I0cc408b475134eb76d3229b9cccefb9555b4bcba
We don't really need to specify the name of the host in the yaml
if it's already be there in the key. YMMV.
Change-Id: I82a11e1ae9b89f0426b1cc12923fb700406a873b
We definitely should not default to using Google DNS or assuming a
specific MTU. The default gateway won't work for many deployments.
Remove them, refactor network_metadata and add some unit tests.
Change-Id: Icb5d077a5f68b5affc1ed545e04c96dcc01d9f3e
A new simplified command is added for deploying nodes, optionally
specifying an image.
The underlying role is updated to allow specifying a full image URL,
a configdrive URL or contents and a full checksum.
Change-Id: I6c99b01dc827c0bd2ef98eff73de4dfbac433fe1
It is recommended to pass the same variables (e.g. testing) to other
commands and playbooks, the new file makes it possible.
Change-Id: I2adc4e2dcfd8555b2c9e6c3bf0f512f603367091
The main function is wrapped with a sys.exit function[1] which has an optional
argument but the current implementation doesn't return a value in case of a
successful execution. This change ensures that main function returns a value
consumed by sys.exit function.
[1] https://docs.python.org/3/library/sys.html#sys.exit
Change-Id: I3b65db9ce57e53b8696e417bcfbd52c67ddb0b89
Ansible accepts YAML files via the syntax `-e @path.yaml`. Since
bifrost-cli changes the working directory to "playbooks", relative paths
don't work as expected. Fix that by turning them into global paths.
Change-Id: I02ba2ac85c72362dbc424037c3d23231098e065b
In Ussuri and earlier releases, the Bifrost custom inventory returns all
node fields as facts. Currently, most of these are returned as null.
This happened following the switch to openstacksdk. The plugin checks
for the presence of a properties field, and gets detailed node
information if it is missing. This worked with shade, but with
openstacksdk, the returned node object has most fields present but set
to null.
One of the most obvious consequences is that provisioning fails, since
the 'Deploy to hardware - Using custom instance_info.' task tries to use
the instance_info value of null.
This change fixes the issue by removing the check and always getting the
detailed node information.
Change-Id: Ia87c8332994f3b0f037ada953a299987bba246e5
Story: 2008394
Task: 41321
Starting with Ansible 2.9.10, the "Collecting node facts" task in
bifrost-configdrives-dynamic can fail because it tries to SSH to
localhost, which may not be possible in some environments, such as
Bifrost deployed as a container by Kolla.
Change-Id: I1ed19e325db9396ff6b250e14c967ce90c785201
Story: 2008260
Task: 41118
This commit adds support to install the Ironic Prometheus Exporter,
it's necessary to set `enable_prometheus_exporter=True` or pass
`--enable-prometheus-exporter` when using the `bifrost-cli`
Also the ipe is now enabled in the
bifrost-integration-tinyipa-keystone-ubuntu-bionic/centos8
Change-Id: I3972e88162fba31ad6e262f47b67a37cd37a2076
We update defaults on each stable branch to match its release, so
if no release can be detected, let's not provide 'master'.
Change-Id: I01009307a066b6c60a97959764c31b5e7624708e
For upgrades we need bifrost-cli to always try to setup environment
(e.g. in case of a different ansible version). To avoid polluting
the output, make `set -x` conditional on a new variable BIFROST_TRACE.
Change-Id: I8caea6be0962db0e7019d0aa1484ef2424b7629e
Bifrost cannot operate in virtual environments without system site
packages, so overriding ansible_python_interpreter to system Python
is not necessary.
Document this limitations.
Change-Id: I669c4e248d23f65015533635ed09dcaf60f8f8f2
We're currently defaulting to localhost which makes clouds.yaml/openrc not
portable and complicates TLS configuration. Moving to internal_ip makes it
possible to just copy clouds.yaml around.
Refactored endpoint creation in keystone to use the openstack modules and
to avoid copy-pasting authentication information. As a side effect, it
becomes possible to update existing endpoints.
The use_public_urls variable loses most of its sense now and is replaced
by explicitly checking for public_ip.
Change-Id: I48b5ab9aa656abbddd619df4bed6be9bf3766da5
The voting jobs also use the new mode (since it requires more OS
coverage), the DHCP jobs are left with no-auth.
Change-Id: I8c8ee112edbc1e61b54aff13c06c518c7daa9700
If the user used to install and run bifrost can't run sudo
passwordless, the bifrost-cli appends the --ask-become-pass option
that makes ansible ask for the BECOME password, used to run
commands with become set to true.
Change-Id: I7148243b19baa8bfdd652827a9280d469622e3f3
We used to disable cleaning because only full disk cleaning was
available. Enable metadata cleaning by default and add an option
to enable full cleaning.
Change-Id: Ie1198768889bd468176cd68c8ccb48791c724262
This greatly simplifies initial configuration. The simple CLI
now defaults to the community hardware types.
Change-Id: If4bee8ee3e3349742e360fd44f1f5f93b4913aed