Lately this is making the Wallaby on CS9 line crumble. After some tests,
it seems, at least on CS9, we're able to get rid of this option - and
should, since it's crashing virt-customize.
Change-Id: I4e3cbe4507cbe7d1471f75cb41af99f84725b3ad
Closes-Bug: #2018356
Related-Bug: #1743749
In order to run specific command on the image, we need
to add support for --run-command to the modify image role.
It will be useful to run specific command instead of using
script.
This functionality will be consumed here:
https://review.opendev.org/c/openstack/tripleo-quickstart/+/868864
Related-Bug: #2000226
Signed-off-by: Chandan Kumar <chkumar@redhat.com>
Change-Id: I8575c712467db8fea403459d26731dd7070df131
This reverts commit a7a05c4371.
This was failing on train, ussuri, victoria because the fallback path
assumed the overcloud-full partition image is in raw format, but is
qcow2 on these stable branches.
This revert now includes the same image format detection that was
introduced to tripleo-mount-image in change
I628abc4cb8c46c3b2e5bfd3cd16bb6d5cc95fabe.
Change-Id: I0354a7f8804949916cfccfc22c59f26b54c4c134
With qemu-nbd it is not necessary to mount the raw image. Leaving it
as qcow2 will save around 45 seconds.
Change-Id: I2f4e9c8d0b474b839bcff5b7cf9027f695eef047
tripleo-mount-image will only be backported as far as Wallaby, so a
minimal qemu-nbd fallback is included which assumes a simple partition
image.
Depends-On: https://review.opendev.org/c/openstack/tripleo-common/+/809486
Change-Id: I04c0a589ed32149ef94557ea7ab36d217f8b8d11
Blueprint: whole-disk-default
This will soon be overcloud-hardened-uefi-full on master, and the
download will be of a qcow2 file, not a tar file.
This change moves whole_disk_images default setting to extras-common,
and also adds default variable overcloud_image, which is used wherever
'overcloud-full' is currently hard-coded.
Change-Id: Iba7833c16eae3d3129b7bab48434c66ec2e1efcf
Blueprint: whole-disk-default
RHEL 8.4 image does not include /etc/resolv.conf
automatically.
This review adds the file to the temp dir
used in the modify-image role if it is
missing.
Change-Id: Ia6deca65b3561e8763445923f77355444d9a2ef0
The role relies on qemu-image rpm, let's ensure
it's installed.
It used to be installed with tripleoclient before
[1], since the role relies on that rpm let's have
it as part of role.
Also use set -eo pipefail for convert image task
so that task fail if any part of the script fails.
[1] https://review.rdoproject.org/r/#/c/30690/
Closes-Bug: #1906486
Change-Id: I532e236caad86941db8a4cfcffa4be67c76502b5
- run `pre-commit autoupdate` and fixed new issues
- adopted newer pre-commit config for ansible-lint 4.2.0+
- fixed some reported broken rules
- temporary disabled few rules, just to contain the size of of review,
planning to drop/fix them in follow-ups.
Change-Id: I807ba4e919527be56c85ec72d0f4c7148f04e994
Upgrades yamllint to latest version and adots use of its strict
checking.
Fix all known problems reported by yamllint so we don't have to do
that while touching these files.
Change-Id: I4bdc520d9e2aff086c4b463718bc1e053261a4f5
Story: https://tree.taiga.io/project/tripleo-ci-board/task/381
Allow users to override the setting on their own risk
of being hit by bug 1743749
Related-Doc: http://libguestfs.org/guestfs.3.html#force_tcg
Related-Bug: #1743749
Change-Id: I5aa3f665d9e449eaa8e91441a3f46d322d5d43a4
Signed-off-by: Bogdan Dobrelya <bdobreli@redhat.com>
Assert that the "/" directory in the ramdisk has the permissions
of 755 and not leave it up to umask (or chance).
Change-Id: I609914f15b8eca6f3cb8e72099c130b88f294224
Closes-Bug: #1770972
Yum fails to run in chrooted environment because of blocking
access to /dev/urandom. Mount hosts /dev to chrooted.
Close-Bug: #1771755
Change-Id: I4849d77f21163ec8f116859c857a85f9c72ec282
Centos 7.5 is released with the new kernel so workaround applied
for Centos 7.4 update kernel needs revert.
The patch reverts the following 4 commits applied
in order to override kernel. Some nested VMs(Skylake) have
issues running virt-customize with kvm backend, so set
LIBGUESTFS_BACKEND_SETTINGS=force_tcg to not use
kvm accelaration. Setting this option drops performance
for running virt-customize a little but can't find any other
option until it's fixed in kernel/kvm.
Revert "add option to turn on/off non default kernel"
This reverts commit fec6fd069d.
Revert "Do not attempt install kernel when chrooted"
This reverts commit d991c1033f.
Revert "Ensure libguestfs_kernel_override kernel is installed"
This reverts commit ff0a5c9ac7.
Revert "Set SUPERMIN_* variables to working kernel"
This reverts commit 6aac21081d.
Change-Id: If46010d7ca14f9dde9a49173aa0b6de91c3826a8
Related-Bug: #1743749
When using pipes in ansible shell module we can miss the error
because shell is executing without pipefail by default.
This rule will check every shell module if it has "set -e pipefail"
and will fail in case if not.
It excludes tasks which have 'ignore_errors: true' or register
variables.
Change-Id: I394c72040d62dff76180aeb9d703bb8a212bcc98
When building images from a container/chroot, do not
attempt to install kernels.
Use the shared via the common defaults chrooted param
to control that behavior.
Depends-On: I8cc198bd1081e0c1864228dad6228daa92ac32b7
Related-Bug: #1676373
Change-Id: Ie880a33fbb758240638178c45c43156e80bf4d24
Signed-off-by: Bogdan Dobrelya <bdobreli@redhat.com>
https://review.openstack.org/#/c/535293/ assumed
that centos7 base kernel 3.10.0-693.el7.x86_64 is
always installed in the centos 7.4 vm. But it's not true for
some images which are build using DIB(ex: centos7-minimal).
This patch ensures libguestfs_kernel_override kernel
is installed before running virt-customize command.
Change-Id: Ic41b0675153c590ad7daf79a3bc117156f2173f3
virt-customize(libguestfs) is not working with current
kernel 3.10.0-693.11.6.el7 in centos.
So until it's fixed in libguestfs or kernel, let's
use working kernel 3.10.0-693.el7.x86_64.
The kernel version is managed using following variable
which can be overridden when required.
Libguesfs requires following environment variables
to use the overridden kernel.
- SUPERMIN_KERNEL_VERSION: {{ libguestfs_kernel_override }}
- SUPERMIN_KERNEL: /boot/vmlinuz-{{ libguestfs_kernel_override }}
- SUPERMIN_MODULES: /lib/modules/{{ libguestfs_kernel_override }}
Change-Id: I129ec6c48d801cd605c4befda5ee00a025480413
Partial-Bug: #1743749
Set undercloud inventory before it's used in next playbook.
Fix images update issues and set centos images to newest.
Set 'libguestfs_mode: false' to avoid running virt-customize
on initramfs.
Closes-bug: #1730997
Change-Id: I46dce77166ecb828d4186b3f2ffa56cf9aa9d31e
Right now it logs on something like
/var/lib/oooq-images/repo_setup.sh.log this changes so that it can
save that log on the {{working_dir}} to be more accessible
Change-Id: Ifa7d6eb43ea86e97ef5707d378901d3e2c074a7a
Add support for initramfs images in modify-image role for
updating packages in CI in ironic-python-agent image.
Change-Id: I1dd4d6fa0629d498c4f0d30da33ff49844ca4068
Because of very long image modifying by libguestfs, implement
different way to do it by converting image to raw, mounting it
and modifying in the place. This patch uses usual tripleo-ci way
to do it, as it was before transition.
Change-Id: Ice4487aa8d263aa7f4a426b7924104a469bd1b52
It can be useful (i.e. in baremetal deployments) to set the root
password on the overcloud image, this commit adds this ability to the
modify-image role.
Change-Id: Idf3ee95745c00fbbdbc3a9df4cc8d3e8ea71b46f
Without doing this, if a play includes multiple runs of the
modify-image role, the virt-customize args keep growing. This can
lead to unintentionally re-running scripts or re-uploading files.
Since we now ignore user input for vc_args key it is renamed
_vc_args, and the defaults are updated to reflect the variable
being "private".
Change-Id: I17cb09a084136cdaabf4d25dd684f594f1f546eb
We need to differentiate local_working_dir from working_dir
as well as decouple the stack user from `ansible_user` var.
Both of these are causing issues as we begin to automate
deployments in more environments.
- Cleanup duplicate variables that are consumed via extras-common
- Note: extras-common depends on the common role in OOOQ
- Cleanup redundant var and superfluous quotes from overcloud-scale
role
- Cleanup redundant comments in <role>/defaults/main.yml
Closes-bug: 1654574
Change-Id: I9c7a3166ed1fc5042c11e420223134ea912b45c5
We use virt-customize for many tasks. Instead of having these tasks
all being implemented in different ways across the various roles,
we can instead have a utility role for that purpose. This allows
us to keep the implementation uniform across those tasks and
provides a single place to fix issues with our virt-customize
implementation.
New roles in quickstart-extras will be expected to use this role
for any virt-customize tasks. Eventually, we will want to port
existing virt-customize tasks to use this new role as well.
Change-Id: I6dcb398e17f20a4a2f862873067d92b1b520748c