With the parameter bifrost_deploy_verbosity it is possible
to set the verbosity of the bootstrap of Bifrost.
This makes it possible to reduce verbosity when running
/bifrost/playbooks/install.yaml if needed.
Change-Id: I5815220f2193a492ae7e1f63443075790ae7aaef
Role vars have a higher precedence than role defaults. This allows to
import default vars from another role via vars_files without overriding
project_name (see related bug for details).
Change-Id: I3d919736e53d6f3e1a70d1267cf42c8d2c0ad221
Related-Bug: #1951785
Bifrost in Yoga will change the default TFTP and HTTP boot directories
to reside under /var/lib/ironic/. We already avoid the cross-filesystem
linking issue that the patch aims to address, by overriding
tftp_master_path. Avoid this breaking us by reverting to the previous
defaults.
Needed-By: https://review.opendev.org/c/openstack/bifrost/+/822743
Change-Id: Idc54c78c618ae90b4d933c2c401bb1789b0abd36
By default those are saved in /var/log/ironic/deploy.
Change of path was introduced by [1] since Victoria.
[1]: https://review.opendev.org/c/openstack/bifrost/+/742854
Change-Id: I0fb69a06d6565d633f9ea0e37e0a780a70bb0ced
This reverts commit 9cae59be51e8d2d798830042a5fd448a4aa5e7dc.
Reason for revert: This patch was found to introduce issues with fluentd customisation. The underlying issue is not currently fully understood, but could be a sign of other obscure issues.
Change-Id: Ia4859c23d85699621a3b734d6cedb70225576dfc
Closes-Bug: #1906288
Main plays are action-redirect-stubs, ideal for import_tasks.
This avoids 'include' penalty and makes logs/ara look nicer.
Fixes haproxy and rabbitmq not to check the host group as well.
Change-Id: I46136fc40b815e341befff80b54a91ef431eabc0
Partially-Implements: blueprint performance-improvements
Currently there is no option to set container_proxy only for one service
(e.g. magnum). This change adds this option.
Change-Id: Ia938ee660ebe8ce84321f721b6292b0b58a06e20
Including tasks has a performance penalty when compared with importing
tasks. If the include has a condition associated with it, then the
overhead of the include may be lower than the overhead of skipping all
imported tasks. For unconditionally included tasks, switching to
import_tasks provides a clear benefit.
Benchmarking of include vs. import is available at [1].
This change switches from include_tasks to import_tasks where there is
no condition applied to the include.
[1] https://github.com/stackhpc/ansible-scaling/blob/master/doc/include-and-import.md#task-include-and-import
Partially-Implements: blueprint performance-improvements
Change-Id: Ia45af4a198e422773d9f009c7f7b2e32ce9e3b97
Bifrost no longer deploys RabbitMQ, so we should not try to stop it
during upgrade. In fact, if we do then it fails:
Failed to stop rabbitmq-server.service: Unit rabbitmq-server.service not
loaded.
Bifrost removed RabbitMQ in Train, so this is only required from Ussuri.
Change-Id: Ie86f85974fd7385e72a918065fc9c5172f9684ba
For the CentOS 7 to 8 transition, we will have a period where both
CentOS 7 and 8 images are available. We differentiate these images via a
tag - the CentOS 8 images will have a tag of train-centos8 (or
master-centos8 temporarily).
To achieve this, and maintain backwards compatibility for the
openstack_release variable, we introduce a new 'openstack_tag' variable.
This variable is based on openstack_release, but has a suffix of
'openstack_tag_suffix', which is empty except on CentOS 8 where it has a
value of '-centos8'.
Change-Id: I12ce4661afb3c255136cdc1aabe7cbd25560d625
Partially-Implements: blueprint centos-rhel-8
This performs the same as a deploy-bifrost, but first stops the
bifrost services and container if they are running.
This can help where a docker stop may lead to an ungraceful shutdown,
possibly due to running multiple services in one container.
Change-Id: I131ab3c0e850a1d7f5c814ab65385e3a03dfcc74
Implements: blueprint bifrost-upgrade
Closes-Bug: #1834332
Many tasks that use Docker have become specified already, but
not all. This change ensures all tasks that use the following
modules have become:
* kolla_docker
* kolla_ceph_keyring
* kolla_toolbox
* kolla_container_facts
It also adds become for 'command' tasks that use docker CLI.
Change-Id: I4a5ebcedaccb9261dbc958ec67e8077d7980e496
During the Train cycle, Bifrost switched to using JSON-RPC by default
for Ironic's internal communication [1], avoiding the need to install
RabbitMQ. This simplifies things, so we may as well remove our custom
configuration of RabbitMQ.
[1] https://review.openstack.org/645093
Change-Id: I3107349530aa753d68fd59baaf13eb7dd5485ae6
With this change, an operator may be able to stop a
service container without stopping all services in a host.
This change is the starting point to start
fast-forward upgrades support.
In next changes new flags will be introducced to disable
stop dataplane services during upgrades.
Change-Id: Ifde7a39d7d8596ef0d7405ecf1ac1d49a459d9ef
Implements: blueprint support-stop-containers
The Bifrost CI job seems quite unstable, often failing while attempting
to reach the public epel package repositories. We shouldn't need to
install any packages when deploying the container - they should all have
been installed in the image already.
This change avoids running the scripts/env-setup.sh script, which is run
when the container image is built.
It also removes sourcing of /opt/stack/ansible/hacking/env-setup, which
is now just a stub.
Change-Id: I1786e5337a397cb7b427d6b87c21eaee600af170
Ironic creates hardlinks between the TFTP master image store and the
HTTP root path when iPXE is enabled. With Docker volumes used for these
locations we run into https://bugs.launchpad.net/ironic/+bug/1507894
during deployment. If we use a directory under /httpboot to store the
master images this issue is avoided.
This change uses the new bifrost config variable,
ironic_tftp_master_path added in [1] to configure the path, rather than
the existing hacked approach of modifying the ironic.conf config file
after the bifrost_deploy container has started.
[1] https://review.openstack.org/#/c/577071
Change-Id: I5c62999c4956bebd0d3920d756ce67ba194b0ebe
Add become to all tasks that use the module "kolla_docker"
Change-Id: I4309c4011687b88ec31d739fd8f834fe2326ff10
Partial-Implements: blueprint ansible-specific-task-become
- rename action and serial to kolla_ansible and kolla_serial
- use become instead of "sudo <command>" in shell
- Remove quota for failed_when and changed_when in rabbitmq tasks
Change-Id: I78cb60168aaa40bb6439198283546b7faf33917c
Implements: blueprint migrate-to-ansible-2-2-0
The permissions of rabbitmq-env.conf for bifrost were changed in
I6e32d94d4172dd96d09d8609e8a5221ab5586a31 to 0660. This breaks bifrost
deployment, as the rabbitmq user is no longer able to read the
root-owned file on startup.
This commit changes the ownership of the file in the container to
rabbitmq:rabbitmq after it has been copied.
Change-Id: I53418f5d4e40b7ca57e546e2e92a57f613fd381e
Closes-Bug: #1766196
This patchset implements yamllint test to all *.yml
files.
Also fixes syntax errors to make jobs to pass.
Change-Id: I3186adf9835b4d0cada272d156b17d1bc9c2b799
Bifrost uses the www-data user for nginx on debian/ubuntu, and nginx on
other platforms. Kolla-ansible currently uses the nginx user for all
platforms when creating a log directory. This change uses the www-data
user on debian/ubuntu when setting ownership of the bifrost nginx log
directory.
Change-Id: I142a158b6f2e8f8a46b684267f6fbb2a6e22a259
Closes-Bug: #1753750
Bifrost cannot modify /etc/hosts from within a container, so add a
host entry during bootstrap.
This was previously fixed by Ied378b4dd755788e75ad1814cecb5700732ba83e
but the logic in bifrost was changed [1], making it out of sync with
kolla-ansible, and triggering a write to /etc/hosts. This change applies
the new logic in bifrost to kolla-ansible, ensuring that the file will
not need to change in the container.
Longer term we should look at ways to make bifrost less eager to modify
/etc/hosts, accepting any file that will work for RabbitMQ.
[1]
60b9a9917e
Change-Id: I0ee05feae3630435b2ec52cfeddf33647a974ee0
Closes-Bug: #1661009
Bifrost will determine the name of the service for MySQL based on the OS
distro if mysql_service_name is not set. Setting it explicitly in
extra-vars was causing problems on systems that use mariadb.
Change-Id: I892b1c9cf636b9dfc1bacc92e1e2f0d066018260
Closes-Bug: #1753522
Using Docker volumes for persistent data in the bifrost container is
necessary for upgrading the bifrost services.
This change adds the following volumes:
* bifrost_httpboot
* bifrost_ironic
* bifrost_mariadb
* bifrost_rabbitmq
* bifrost_tftpboot
Ironic creates hardlinks between the TFTP master image store and the
HTTP root path when iPXE is enabled. With different Docker volumes
used for these locations we run into
https://bugs.launchpad.net/ironic/+bug/1507894 during deployment. If
we use a directory under /httpboot to store the master images this
issue is avoided.
Change-Id: I8653268d3598e7a59d2eb45c8750d45b6fc9e35f
Partially-implements: blueprint bifrost-upgrade
Using a kolla_logs volume ensures that logs are persistent beyond the
lifespan of the bifrost_deploy container. This is necessary to support
upgrading the bifrost services. It also opens the possibility of log
forwarding, although we do not currently deploy a fluentd container on
the bifrost host.
Change-Id: If3118cd75ccc87b0d003d5f382695aeaa43ed0f8
Partially-implements: blueprint bifrost-upgrade
Bifrost cannot modify /etc/hosts from within a container, so add a
host entry during bootstrap.
Change-Id: Ied378b4dd755788e75ad1814cecb5700732ba83e
Closes-Bug: #1661009
In case Kolla's users want to deploy with both of
binary and source image, we should have a variable
install type that define install type for each project.
We also add specific image tag for each Openstack project.
This commit is implemented for Aodh, Barbican and Bifrost projects.
Change-Id: I926c9631c860b527941c40addc68896dd27bd1cc
Implements: blueprint mixing-binary-and-source-image
The 'ansible_python_interpreter' has already defined in /etc/bifrost/bifrost.yml
we should remove the redundant variable
Change-Id: Ie799170d3318a731d31e1f39bcf940a1b220bd53
Add a new subcommand 'check' to kolla-ansible, used to run the
smoke/sanity checks.
Add stub files to all services that don't currently have checks.
Change-Id: I9f661c5fc51fd5b9b266f23f6c524884613dee48
Partially-implements: blueprint sanity-check-container
Bifrost now targets the play in the install.yml playbook at the
target Ansible group instead of localhost.
This change uses the target inventory file to pick up this group
and avoid a 'noop' playbook.
Change-Id: I850993c9d824b59cfb1eec0d8286098d021d4d5f
Closes-Bug: #1665415
Update playbooks to ensure rabbitMQ server starts successfully in the
bifrost container.
Change-Id: I73e3d7f2b50221aeff75576d594f64abcea2d43b
Closes-Bug: #1658768
The bootstrap.yml playbook attempts to source
/opt/stack/ansible/hacking/env-setup and fails because no such file
exists (ansible is not installed in the location /opt/stack/). This step
is not required since the command bash ./scripts/env-setup.sh does not
install ansible from source in the Bifrost container as ansible is
already installed in the base image used by the Bifrost container.
Change-Id: Ibc26b4b77866127e7b57a30d80cd15734dedd85d
Closes-Bug: #1658741