This use the same workaround as element bootloader's[1] to fix CentOS
8.3 partition image building error with iscsi-boot:
...
2021-01-12 07:11:02.439 | + grub2-mkconfig -o /boot/grub2/grub.cfg
2021-01-12 07:11:02.654 | /usr/bin/grub2-editenv: error: cannot rename the file /boot/grub2/grubenv.new to /boot/grub2/grubenv: No such file or directory.
2021-01-12 07:11:02.665 | Generating grub configuration file ...
2021-01-12 07:11:03.112 | /usr/bin/grub2-editenv: error: cannot rename the file /boot/grub2/grubenv.new to /boot/grub2/grubenv: No such file or directory.
...
[1]: https://review.opendev.org/c/openstack/diskimage-builder/+/750279
Closes-Bug: 1911120
Change-Id: I2de5444f7e1a145df9abb03fa4c367e8bb914e03
This fixes below building error When build centos with element
dracut-regenerate on ubuntu by specifying the initrd and kernel version.
...
2021-01-12 03:44:15.758 | dracut: Cannot find module directory /lib/modules/5.4.0-58-generic/
2021-01-12 03:44:15.759 | dracut: and --no-kernel was not specified
2021-01-12 03:44:15.765 | Traceback (most recent call last):
2021-01-12 03:44:15.766 | File "/tmp/in_target.d/finalise.d/50-dracut-regenerate", line 102, in <module>
2021-01-12 03:44:15.766 | main()
2021-01-12 03:44:15.766 | File "/tmp/in_target.d/finalise.d/50-dracut-regenerate", line 82, in main
2021-01-12 03:44:15.766 | raise e
2021-01-12 03:44:15.766 | subprocess.CalledProcessError: Command '['dracut', '--list-modules']' returned non-zero exit status 1.
...
Change-Id: I87ae20b3fa2f291bb107e607137fcd7b1c0a4996
While looking at DIB logs, it is very hard to debug dracut
issues due to missing modules, listing dracut modules will
give an insight.
Related-Bug: #1907457
Signed-off-by: Chandan Kumar (raukadah) <chkumar@redhat.com>
Change-Id: I4d277bdfd648adba5a749d22d905c66b807e249a
With Centos 8.3, centos-repos package has been replaced by
other packages [1].
[1] https://lists.centos.org/pipermail/centos-devel/2020-September/056069.html
Also Increase flake8 and pyflakes version in lower-constraints.txt as
this was already broken.
Change-Id: Ife139fcaff0c2d944098ea353259971d2d3f18b8
The git package pulls in heavy dependencies for just a few rarely
used commands. git-core should be enough (and already uses for Suse).
Change-Id: I96b71072c22c26b3b651466053b9e9561527cbe5
Modern distros use more creative interface naming, e.g. CentOS 8
adds both eth0 and ens3 (!). Remove everything.
Change-Id: Ibdebdb09ea790787840cf9b817d4eb549ef18249
Grub2 messes up arguments with double quotes in them, changing from
key="value" to "key=value" [1]. Support this format as well.
[1] https://bugzilla.redhat.com/show_bug.cgi?id=950760
Change-Id: Icf4c9f86009d29a342d6e0e21644af680066b0b2
Autoremove can touch packages, that are assumed to be present
for post-install step.
A good example is dkms, which is dropped in
install.d, but dkms element try to use it in post-install step.
This results in the following log [1]
[1] http://paste.openstack.org/show/797809/
Change-Id: I635af230c6b250fee273039935cf19506e83b3d1
This is never called externally to dib, so doesn't need to be an
entrypoint. Call it from within dib using the running python
executable and from the lib/ directory; this means we do not need to
have the virtualenv activated to run disk-image-create.
Change-Id: Ie9b551824792864402b0c63ccc350dc5c92dcc3f
This is really an internal dib tool. Move it to the lib directory,
and call it with the python we are running under.
This is one less reason to require the virtualenv to be activated when
you run 'disk-image-create'.
Change-Id: Id689683a0b1fdcb446b04ba967284a216133d743
Provide ability to run dhcp client on VLAN interfaces created on
top of an Ethernet interface. See also
<https://storyboard.openstack.org/#!/story/2008298>`__ for further details.
Change-Id: Ic3ffd7b8e23b1e996cfe6c79ce0ff47e521f30be
centos-repos package is not available on centos-8-stream:
2020-11-02 15:35:20.962 | No Match for argument centos-repos
2020-11-02 15:35:20.992 | No Match for argument centos-release-stream
The build fails later on install_pkg_manager sed command:
2020-11-02 15:35:22.903 | sed: can't read
/var/cache/nodepool/dib_tmp/dib_build.iPSHptNW/mnt/etc/yum.repos.d/*repo: No
such file or directory
This change ensure centos-stream-repos package is installed to provide
/etc/yum.repos.d/*repo files
This change replace 'centos-release-stream' package with the new
'centos-stream-release' package [1]
[1] https://lists.centos.org/pipermail/centos-devel/2020-September/056069.html
Change-Id: I6c397bf7b5797a02e5f006c18ee63c9cdf66b38c
Python modules related to coding style checks (listed in blacklist.txt in
openstack/requirements repo) are dropped from lower-constraints.txt
they are not needed during installation.
Change-Id: I94a87c4a7d0c2d5104e092d3b17ea42e0dd6bbaa
We are running yum-config-manager/dnf config-manager in the epel
element. Even though the yum-utils package is declared in the
package-installs.yaml file, the package-installs pre-install.d
script is executed after the one in the epel element, so image
build fails.
This commit ensures yum-utils or dnf-plugins-core are installed
before running the command.
Change-Id: Ib292b0b2b31bd966e0c5e8f2b2ce560bba89c45c
Initial patch for I78d7bcf214a45245e2073428120fcbdd968e1acd
works without the envvar set, however, 'set -eu' causes it to break
if unset.
This makes the module configuration variable not required to be
set, consistent with other DIB scripts.
Change-Id: I5ca80f518d0371a18c107c061dc923876463af57
Signed-off-by: Lon Hohberger <lhh@redhat.com>
This disables growpart module in cloud-init, not resizing / partition
to maximum disk free size by default.
Change-Id: I69984a9141fa8abb12dc5d51bd334f9280deca67
The docs requirements migrated to doc/requirements.txt
we need not install things from requirements.txt.
Change-Id: Iddb46304a6c7611f3e8e993561537fe2e5d02bcf
Originally it was added for missing python-cheetah dep
for openstack-nova. Nova has removed usage of it long
ago with [1]. rhel-7-server-rh-common-rpms should be
disabled once it's usage is over as it packages from
it can conflict with other openstack repos.
If some package which is needed by OpenStack Packages
is missing then instead of adding rhel-7-server-rh-common-rpms
repo consideration should be to add it in RDO.
[1] https://review.opendev.org/#/c/40205
This reverts commit c7219a5a60.
Change-Id: Iad3a1c353c10bb35f9c9ef4076b65f5c84b803b2
This file is present in both dpkg and debian-minimal element,
causing a failure to build anything with debian.
Change-Id: I8213d581a79bb432281f31955a44418e4047d9e1
Some OpenStack releases on RHEL require specific modules
in order to function correctly. This adds the ability
to set DIB_DNF_MODULE_STREAMS which then are selected
prior to package installation.
Change-Id: I78d7bcf214a45245e2073428120fcbdd968e1acd
Signed-off-by: Lon Hohberger <lhh@redhat.com>
e2fsprogs pulls in info which needs gzip. But that conflicts with the
preexisting busybox-gzip. Install normal gzip to ensure that things can
proceed without conflict.
Change-Id: I3bed5bc141eaa0f3a15bfbf9da3e2d6e7c964a76
busybox-grep is pulled in by the base image and it conflicts with rsync
package installs because rsync needs grep proper. Install grep proper
prior to installing the base distro to avoid this issue later when
trying to install rsync.
Change-Id: I2ec2bf39a2af214443a93776231657b25035e54f