All relatively modern cloud-inits are capable of creating default user
as well as granting root privileges for them. Currently
cloud-init creates pretty much the same sudoers file.
So running steps under the new DIB_DEBIAN_CLOUD_INIT_HELPER
does not make sense for last couple of Debian releases.
Change-Id: I3cebd318f1f0313bba00ecf639328978d3ad0f32
This was precipitated by nodepool switching its image builds to Debian
Bookworm. This caused sibling jobs between nodepool and dib (and others)
to fail because python-lzma and yum-utils could not be installed on
Bookworm.
In order to make this more future proof we reorganize some of the bindep
rules so that they match (or negative match) on static lists of things
which should allow new releases of Ubuntu and Debian to function without
updating the rules again.
Change-Id: I00b099daea099b9de5ee4b563ca7e401b0f856f3
Set the grub timeout style to display the menu. By default it set to
'hidden' but can be changed to 'menu' to display the menu and then
wait for the timeout expire before booting the default entry.
Change-Id: I8c58407ef645d528dd77efe866bfe0389cbbbd33
Signed-off-by: Maksim Malchuk <maksim.malchuk@gmail.com>
There is no need in pipe and sudo for changing /etc/cloud/cloud.cfg
TrivialFix
Change-Id: I905e8d3964f1322ec3ccc2eb09c517a02ef88044
Signed-off-by: Maksim Malchuk <maksim.malchuk@gmail.com>
Remove extra spaces from GRUB_CMDLINE_LINUX_DEFAULT in the
/etc/default/grub when there is no boot laber and/or fips
not enabled.
TrivialFix
Change-Id: Ie83781b9ceca16ff63e08e3d1f887aa6d33fec99
Signed-off-by: Maksim Malchuk <maksim.malchuk@gmail.com>
For quite a while Debian is shipped with systemd-sysv
by default. However, default value of DIB_DEBIAN_ALT_INIT_PACKAGE
is not in sync across elements. We change a default now for
the `debian` element along with removing `apt_get_bp_extra_opts`
that is not defined or used anywhere else.
Change-Id: If5d3f0a21467f926c23bb39a1853be73befa768e
Followup I2dd1c60e3bfd9c823a7382b1390b1d40c52a5c97.
The 'wait_for' array always updated even the command not executed
after test because of '&' control operator, so lets wrap construction
in standard 'if..then' case instead of using '&&' control operator.
Change-Id: I1d1ecb05e61f3995a98de450705451b94b437a08
Signed-off-by: Maksim Malchuk <maksim.malchuk@gmail.com>
Legacy elements deploy-tgtadm, deploy-targetcli, and deploy-baremetal
have not seen use in ages. Another element seems to date back to this,
deploy-kexec, but appears to see no actual use as the underlying methods
leveraged by these elements were long moved away from. iSCSI based
deployment being the last, and even then it required the
ironic-python-agent.
Change-Id: Ib5b3a7690c35d6859e2e0fdac2326dcd16c051d3
Currently space is reserved for the metadata volume, but there is also a
spare metadata volume which is used for metadata check and restore.
This change reserves space for the spare. It also changes the volume
reference in the lvextend call to vg/lv_thinpool, the path based
reference results in the spare not growing.
Resolves: rhbz#2232632
Change-Id: If78743bb37f24756c049939645db202261df6775
Debian Cloud Images are shipped with netplan as a way to
configure networking for Debian. Without netplan being installed,
images built by DIB with cloud-init do not bring networking up,
since systemd-networkd is not enabled after installation, and there
are no other means to configure networking.
Alternative approach could be to enable networkd, though it is
better to be closer to official cloud images.
Change-Id: I115ab83cf374819bc447fc1bd596e71326d13ed9
Fedora has moved their old images (prior to 37) to archives,
so default URIs are adjusted to reflect that.
Change-Id: I81dc6df4e4372149cffe448708ac2416d3528394
It's needed downstream when packaging. In RDO and Fedora,
we are hitting the issue "ERROR: ambiguous python shebang" during
the build.
Change-Id: Icaf0e62a8c6f0f873016ef1d17c434941e794c2f
The usage of the DIB_CHECKSUM variable is extended to have an
ability generate the only one checksum file, for example only 'sha256'
(by setting an environment variable DIB_CHECKSUM='sha256'), and to
retain the backward compatibility (DIB_CHECKSUM=1 will generate
both 'sha256' and 'md5' supported at this moment). As an additional
feature we have the simple way to completely deprecate 'md5' later,
and add new methods, for example, 'sha512' etc.
Change-Id: I2dd1c60e3bfd9c823a7382b1390b1d40c52a5c97
Signed-off-by: Maksim Malchuk <maksim.malchuk@gmail.com>
This patch tries to add more detailed info by appending
error output to exec_sudo print.
In current implementation, only a simple static note `Exception:
exec_sudo failed` is printed:
```
INFO diskimage_builder.block_device.utils [-] Calling [sudo sgdisk
/tmp/dib_image.jZaDPxtX/image0.raw -n 1:0:+550M -t 1:EF00 -c 1:ESP
-n 2:0:+8M -t 2:EF02 -c 2:BSP -n 3:0:+2077M -t 3:8300 -c 3:root]
ERROR diskimage_builder.block_device.blockdevice [-] Create failed;
rollback initiated
// ... ...
diskimage_builder.block_device.exception.BlockDeviceSetupException:
exec_sudo failed
```
but the root reason is missing. We can’t get more error info to
make sure what the real root reason even a simple problem like
`command not found`, we have to reproduce locally and manually.
After this patch, the error message like:
```
INFO diskimage_builder.block_device.utils [-] Calling [sudo sgdisk
/tmp/dib_image.jZaDPxtX/image0.raw -n 1:0:+550M -t 1:EF00 -c 1:ESP
-n 2:0:+8M -t 2:EF02 -c 2:BSP -n 3:0:+2077M -t 3:8300 -c 3:root]
ERROR diskimage_builder.block_device.blockdevice [-] Create failed;
rollback initiated
// ... ...
diskimage_builder.block_device.exception.BlockDeviceSetupException:
exec_sudo failed: sudo: sgdisk: command not found
```
We can easily find the real problem and solve it.
Closes-Bug: #2024980
Change-Id: I9efcd9cb6621e6403df6de14f122b1cf371bd800
Currently, NetworkManager can't automatically create default
connection profiles for InfiniBand interfaces.
So, as a workaround, we are adding nm-dhcp-ib-interfaces element to
install NetworkManager-system-connections-infiniband.nmconnection
to NetworkManager to create a wildcard InfiniBand connection profile.
The content of NetworkManager-system-connections-infiniband.nmconnection
is generated by running this command:
`nmcli --offline connection add type infiniband connection.multi-connect multiple`
Closes-Bug: #2016965
Change-Id: Ic972b90e4df9c4aa36cfe3c8631db3e4533045f4
OpenDev has removed Fedora from the mirror AFS volumes. Don't try to
use it during build.
Co-authored-by: Ian Wienand <iwienand@redhat.com>
Change-Id: I0b337c37421de2ff893bcd90d99f569d6551c79e
Signed-off-by: Maksim Malchuk <maksim.malchuk@gmail.com>
TARGET_ROOT is not a valid key during pre-install step. The error
`TARGET_ROOT: unbound variable` raises now.
This PR remove the useless TARGET_ROOT in openeuler-minimal.
Change-Id: I6fae2ca0e6c6e57a3b195367f2626d9e498e0329
The bootloader element now has variable
DIB_BOOTLOADER_VIRTUAL_TERMINAL to customize or suppress the
console=tty0 kernel argument.
This is proposed to allow console=tty0 to be removed entirely as it is
causing significant performance degredation in DPDK environments.
Change-Id: Iba2ee5b8a6b4acdd236a770550dffd29c784ce11
Related: rhbz#2179366
Now as network-scripts package is derprecated, and NM should be the default for managing networking in redhat OS family, we need ifup/down scripts for dhcp-all-interfaces element and no one is providing them
So adding the package map for redhat family in the element source
Change-Id: I11e596e17477c39b156617762c4c5b840754ed64
Red Hat changed the repository names/labels for
Satellite Client repository in Satellite 6.11 and
above, See: https://access.redhat.com/solutions/7004377
This change updates the satellite_repo URL's to use the
new labels.
Also adds environment variable REG_SAT_REPO to allow the
user to override the repository label.
Closes-Bug: #2013451
Change-Id: I6c2a93658213644140caf0e4a8c910b1af22cd1c
The file name under pre-install.d should be like "^[0-9A-Za-z_-]+$",
otherwise the script will be skipped by the name check step and raise
"Ignoring non-conforming filenames" warning.
This patch rename the openeuler mirror script to ensure it follows
the regex.
Change-Id: I6d868df7932345547711100519523546bd53360e
In the baremetal case this isn't required because it is done by
ironic-python-agent when writing the image to the volume[1].
But when using the image directly (such as in a nova VM) the GPT
structure needs to be extended first. This change does that, along
with the detection for whether extending is required, using the same
approach as [1].
[1] https://github.com/openstack/ironic-lib/blob/master/ironic_lib/disk_utils.py#L670-L674
Co-Authored-By: rminishev@itkey.com
Co-Authored-By: sbaker@redhat.com
Change-Id: I3240eb0ef4dbbb41557985f0129ae4998a846417
The jsonschema lower constraint for train is version 3.0.2. This is
making some jobs fail because it can't install the diskimage-builder.
Closes-Bug: #2012489
Change-Id: I620265f6bb09966ff5eaafe9b7b5ee960d0a4977