Commit Graph

689 Commits

Author SHA1 Message Date
Steve Baker
5c1f9a3238 Don't install centos-linux-release on 8-stream
This package doesn't exist in the stream base repo, and neither does
centos-linux-repos.

These are presumably replaced by centos-stream-release and
centos-stream-repos. This change adds an else block to handle the
non-stream base packages.

Change-Id: I32249199c3dfa44fc24fba28d24f314112c2e200
2021-02-23 12:57:05 +13:00
Zuul
cbbcf377d8 Merge "Remove the deprecated ironic-agent element" 2021-02-03 08:45:43 +00:00
Zuul
6cfc94c8bf Merge "Install last stable version of get-pip.py script" 2021-02-03 01:16:13 +00:00
Zuul
d4cbaf12f0 Merge "Fix CentOS Stream 8 base repo in centos element" 2021-02-02 14:10:23 +00:00
Zuul
6ebd8cb974 Merge "simplify updating python versions in gentoo" 2021-02-02 07:28:12 +00:00
Zuul
68c47f91fb Merge "Set eus repositories if REG_RELEASE is set" 2021-02-02 07:24:59 +00:00
David Hill
71449a60ff Set eus repositories if REG_RELEASE is set
Set eus repositories if REG_RELEASE is set instead of the base repos
as the current behavior is to use the non-EUS repositories for RHEL
8.2 deployment which breaks image building for customers.

Change-Id: I8e687b27922c3f6fc3d69794866795ab89ecc346
2021-02-01 09:44:16 -05:00
Daniel Pawlik
383fab59e9 Install last stable version of get-pip.py script
The get-pip script does not work well with Python 2 and
it raise error during the installation [1].

[1] https://github.com/pypa/get-pip/issues/83

Change-Id: I3755c34da313ef647547c6ae18b59cc04c2cdd60
2021-02-01 08:29:04 +01:00
Matthew Thode
4d5ba1497c
simplify updating python versions in gentoo
portage now generates /etc/python-exec/python-exec.conf based on the
order of PYTHON_TARGETS in /etc/portage/make.conf

fixes an issue where ARCH was being detected as amd64 not x86_64
fixes kernel installs (virtual/dist-kernel)

standardizes simple if statements (note, the 'shorthand' method will
pass the exit code back to shell but the 'longhand' does not).

Change-Id: I74041c232bc6ab4d6e67a4ecfaa759aa4a5feb6c
Signed-off-by: Matthew Thode <mthode@mthode.org>
2021-01-27 11:34:09 -06:00
azvyagintsev
3f8a85f932 Add 'DIB_UBUNTU_MIRROR_DISTS' to ubuntu-minimal
* Add "DIB_UBUNTU_MIRROR_DISTS":
    Default: ``updates,security,backports``
    Notes: For some deployment, is may be required
           to disable backport|update|etc packages
           integration.

Change-Id: Ic7dcd29ea658a66763b4422915149e4d3fe663cc
2021-01-27 10:32:49 +02:00
Javier Pena
59f6922e22 Fix CentOS Stream 8 base repo in centos element
The file name for a CentOS 8 repo file is BaseOS.repo, not Base.repo.

Change-Id: I97f5cbd8e5bc17b453db4fcee6e8492652da73aa
2021-01-22 14:54:01 +01:00
Dmitry Tantsur
fd1848282f Remove the deprecated ironic-agent element
Despite having several issues (like missing firmware), it is still
used by people. It seems that the only way to stop that is to remove it.

Change-Id: I4baed8e8ab663c624dcc8d06ff0293d57b082abb
2021-01-21 14:06:08 +01:00
Zuul
2737d909bf Merge "Fix building error with element dracut-regenerate" 2021-01-18 06:45:18 +00:00
Zuul
3c2d18d33e Merge "Fix centos 8.3 partition image building error with element iscsi-boot" 2021-01-18 06:43:25 +00:00
Matthew Thode
45796c65c5
add missing packages for python reinstall on gentoo
Change-Id: I1022c2c6db843701e9e6ece87b0ac87071723b99
2021-01-17 02:34:50 -06:00
Xinliang Liu
447354f933 Fix centos 8.3 partition image building error with element iscsi-boot
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
2021-01-14 02:05:20 +00:00
Xinliang Liu
4c4f49abcc Fix building error with element dracut-regenerate
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
2021-01-14 01:30:52 +00:00
Chandan Kumar (raukadah)
eeb4d901a7 Enable dracut list installed modules
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
2020-12-28 14:24:20 +00:00
Daniel Pawlik
8c714716ed Remove centos-repos package for Centos 8.3
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
2020-12-14 16:55:21 +00:00
Dmitry Tantsur
9be4221b4a Install git-core instead of git on RH systems
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
2020-11-26 17:16:31 +01:00
Zuul
71e3b81788 Merge "Run autoremove on post-install step" 2020-11-23 23:29:50 +00:00
Zuul
2eb1c9161f Merge "simple-init: also remove en* interfaces from the images" 2020-11-23 15:42:30 +00:00
Zuul
39807fc2f5 Merge "Add support for vlan interfaces in dhcp-all-interfaces.sh" 2020-11-23 15:27:12 +00:00
Zuul
f52ad7c839 Merge "Fix python-stow-versions" 2020-11-23 05:15:54 +00:00
Dmitry Tantsur
1462b80781 simple-init: also remove en* interfaces from the images
Modern distros use more creative interface naming, e.g. CentOS 8
adds both eth0 and ens3 (!). Remove everything.

Change-Id: Ibdebdb09ea790787840cf9b817d4eb549ef18249
2020-11-22 20:17:42 +01:00
Dmitry Tantsur
19378bbd9d Fix dynamic-login with grub2
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
2020-11-20 15:00:54 +01:00
Dmitriy Rabotyagov
d0ce0d34e5 Run autoremove on post-install step
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
2020-11-17 09:23:35 +00:00
Dmitriy Rabotyagov
75a5415dbc Fix python-stow-versions
DIB_PYTHON_PREFIX variable was neither defined nor needed.

Change-Id: I36ebe5a6dee511c0c89cc251e9ec340ec7ed915d
2020-11-17 09:23:32 +00:00
Bob Fournier
5d23d8e6b0 Add support for vlan interfaces in dhcp-all-interfaces.sh
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
2020-11-03 10:04:17 -05:00
Nicolas Hicher
c160538465 yum-minimal: Add centos-stream-repos package for centos-8-stream
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
2020-11-03 09:09:03 -05:00
azvyagintsev
f6315c9757 Allow processing 'focal' ubuntu release in lvm
* Those would unlock ubuntu-focal builds

Change-Id: I628d17bfcf07fdff7d2290be7db0701095486bbf
2020-10-28 16:55:49 +02:00
Zuul
061cc48583 Merge "Ensure yum-utils is installed in epel element" 2020-10-13 09:56:57 +00:00
Javier Pena
f13eb1bcea Ensure yum-utils is installed in epel element
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
2020-10-08 09:49:57 +02:00
Lon Hohberger
91ce15afd1 Fix runtime error if DIB_DNF_MODULE_STREAMS is not set
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>
2020-10-07 07:28:46 -04:00
Zuul
580256f374 Merge "Disable growpart in cloud-init-disable-resizefs" 2020-10-07 08:41:03 +00:00
Michal Nasiadka
520e12ec29 Disable growpart in cloud-init-disable-resizefs
This disables growpart module in cloud-init, not resizing / partition
to maximum disk free size by default.

Change-Id: I69984a9141fa8abb12dc5d51bd334f9280deca67
2020-10-06 14:03:57 +02:00
Zuul
6c788f5a09 Merge "Revert "Avoid disabling rhel-7-server-rh-common-rpms"" 2020-09-24 16:57:09 +00:00
Zuul
cbeca0babd Merge "Add support for CentOS 8 Stream cloud image" 2020-09-24 14:55:23 +00:00
Zuul
7ef82de0db Merge "rhel-common: Provide method to select module streams" 2020-09-24 14:32:19 +00:00
yatinkarel
0c341f5820 Revert "Avoid disabling rhel-7-server-rh-common-rpms"
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
2020-09-21 10:35:22 +05:30
Dmitry Tantsur
77fac28078 Rename duplicating 10-debian-minimal.bash
This file is present in both dpkg and debian-minimal element,
causing a failure to build anything with debian.

Change-Id: I8213d581a79bb432281f31955a44418e4047d9e1
2020-09-18 14:52:56 +10:00
Zuul
1355421ce8 Merge "bootloader: remove dangling grubenv links" 2020-09-17 01:01:42 +00:00
Zuul
58034ef253 Merge "Install gzip instead of busybox-gzip on suse" 2020-09-17 00:36:55 +00:00
Zuul
8eb20d2faf Merge "Install grep before busybox on suse distros" 2020-09-16 19:22:59 +00:00
Lon Hohberger
5299371957 rhel-common: Provide method to select module streams
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>
2020-09-16 08:43:30 -04:00
Zuul
3d4e8d749d Merge "Move centos python3 installation after RHEL subscription" 2020-09-16 08:50:23 +00:00
Zuul
d8108885df Merge "Copy apt gpg keys directly into trusted.gpg.d" 2020-09-16 08:34:32 +00:00
Zuul
32441d052d Merge "update various gentoo bits" 2020-09-16 08:34:31 +00:00
Clark Boylan
c091227f4e Install gzip instead of busybox-gzip on suse
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
2020-09-14 16:00:47 -07:00
Clark Boylan
45688b20a2 Install grep before busybox on suse distros
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
2020-09-14 11:57:40 -07:00