DIB fails to build RHEL image

Bug #1627000 reported by Jiří Stránský on 2016-09-23
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Jiří Stránský

Bug Description

Instack-virt-setup on rhel (which uses DIB for building the undercloud image) fails with:

+ install_grub2
+ '[' -f /tmp/grub/install ']'
+ source /tmp/grub/install
++ rpm -i /tmp/grub/grub2-2.02-0.41.el7.x86_64.rpm
warning: /tmp/grub/grub2-2.02-0.41.el7.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID f21541eb: NOKEY
error: Failed dependencies:
        grub2-tools = 1:2.02-0.41.el7 is needed by grub2-1:2.02-0.41.el7.x86_64

Fix proposed to branch: master
Review: https://review.openstack.org/375430

Changed in diskimage-builder:
status: Triaged → In Progress

Reviewed: https://review.openstack.org/375430
Committed: https://git.openstack.org/cgit/openstack/diskimage-builder/commit/?id=93425d14ce251139e0518a3a9533506dd1615f97
Submitter: Jenkins
Branch: master

commit 93425d14ce251139e0518a3a9533506dd1615f97
Author: Jiri Stransky <email address hidden>
Date: Fri Sep 23 14:09:02 2016 +0200

    Fix grub installation for RHEL

    Grub is first removed and then installed during RHEL image building. The
    grub2 package typically requires the same version of grub2-tools, so if
    we just remove and install the grub2 package, the installation can
    potentially fail on being out of sync with grub2-tools version. Removing
    and reinstalling both packages fixes this issue. Those packages are
    already in package map for RHEL as "grub-pc", so we can use this alias.

    Change-Id: Iefd9c17fffd43de3fea260510ad218b1322eecb3
    Closes-Bug: #1627000

Changed in diskimage-builder:
status: In Progress → Fix Released
Ian Wienand (iwienand) wrote :

I can't seem to reopen this, but I've had to propose a revert of this with https://review.openstack.org/388468 because it's going to break fedora & centos builds

Looking more closely, I think the above solution is wrong. grub2-tools should have been installed by the package-map.yaml file. Thus we should only need to install the grub2 package at final time.

I get the feeling that this is instack and maybe it's not doing the package-map installs? I think we'll need more logs to debug this further

Jiří Stránský (jistr) wrote :

The revert would break RHEL again, i explained at https://review.openstack.org/388468 why. If possible we should try to fix this in a way that will make all distros build fine so that we don't just oscillate between different kinds of breakages.

Based on your description of the failure (rpm failing because the package is already installed) i proposed an alternative to the revert here https://review.openstack.org/388567/ Hopefully that could fix it?

Changed in diskimage-builder:
status: Fix Released → New

Change abandoned by Jiri Stransky (<email address hidden>) on branch: master
Review: https://review.openstack.org/388567
Reason: We went with Iafe3611f4eec3c6357587a6cae6a30a261686ead

Reviewed: https://review.openstack.org/388580
Committed: https://git.openstack.org/cgit/openstack/diskimage-builder/commit/?id=e531980a14d55ecf437188fb92fc332a82c2d537
Submitter: Jenkins
Branch: master

commit e531980a14d55ecf437188fb92fc332a82c2d537
Author: Ian Wienand <email address hidden>
Date: Wed Oct 19 09:34:54 2016 +0000

    Remove RedHat grub workaround install

    AFAICT this is no longer necessary. I've tested minimal and image
    builds and they seem to work.

    The original problem seems to be with installing the package in the
    chroot, although it was never quite clear it ever affected the Red Hat

    This code is currently broken (see
    I884cb1e78ad8c31d985f3fc94a58091b993edd7d). This is proposed as an
    alternative to I74eed074494134334d5e49042bb5214bd0dd7339.

    Related-Bug: #1627000

    Change-Id: Iafe3611f4eec3c6357587a6cae6a30a261686ead

Changed in diskimage-builder:
status: New → In Progress
Download full text (16.0 KiB)

Reviewed: https://review.openstack.org/391939
Committed: https://git.openstack.org/cgit/openstack/diskimage-builder/commit/?id=7cc65d3cbdbffb4ac941dbb889f436be1d18cfa2
Submitter: Jenkins
Branch: feature/v2

commit 872da68a9032036d392e7b6236d730b7c17b7eb7
Author: Paul Belanger <email address hidden>
Date: Sun Oct 23 18:49:33 2016 -0400

    Add support for bindep.txt

    Currently, this is a noop, since diskimage-builder currently uses
    tests/install_test_deps.sh to manage OS dependencies. The next patch
    in the series, will complete the migration to bindep.

    Change-Id: I3b599983106b87fec6a4b6348469ed037654810e
    Signed-off-by: Paul Belanger <email address hidden>

commit 7f1494a43348da65c0006c8d2477c6ab36bd5fb1
Author: Markos Chandras <email address hidden>
Date: Wed Oct 19 18:59:07 2016 +0100

    elements: zypper: Do not pull recommended packages

    Recommended packages are usually useful but we normally don't need
    them in order to have a working system. As a result, avoid pulling
    them in when doing a regular package installation or a distribution
    update. Extra packages can be pulled in using the usual '-p' parameter
    or from within the elements that actually need them. The results of
    this change are quite significant, resulting to gains from a few dozen
    of MBs up to a few hundred depending on the selected elements.

    Change-Id: I5838829c631990c7a1f3b67548accd9a603fe20c

commit a44b55ccaaff7f252f048a180a26006c86d21ceb
Author: Ian Wienand <email address hidden>
Date: Thu Oct 20 15:19:31 2016 +1100

    Turn down yum install-packages

    When debugging, this is very noisy for very little value. If we need
    to specifically debug this script we can turn up the level.

    Change-Id: Ie15f16397c37e718aa919853697cbf2c5c08503c

commit cfcbd4ffbefe4d5bc2bd78b510a3eb1f619af377
Author: Markos Chandras <email address hidden>
Date: Wed Oct 19 17:53:01 2016 +0100

    elements: source-repositories: Add git package mapping for SUSE

    The 'git' command line tool is in the git-core SUSE package

    Change-Id: Ib2c5dc5ab9bbde2520f43682c654a9c3270bac09

commit 1fe1e3f606aacabad8de78d36c0ba1f91962bc9e
Author: Markos Chandras <email address hidden>
Date: Wed Oct 19 16:16:35 2016 +0100

    elements: growroot: Add SUSE package mappings

    Add growpart and e2fsprogs package mappings for SUSE.

    Change-Id: I4544c3b5bd561f7483cd10f65e2d6366b52d57cd

commit bb29082910b822aae2c27cdf39c67545e3f326f9
Author: Matthew Thode <email address hidden>
Date: Tue Oct 11 20:17:49 2016 -0500

    Document install of diskimage-builder on Gentoo

    Change-Id: I27bf3499f998dcbdeb5cfebddde306e5200cc0b5

commit 82b299bbdfb4df55c44b1526491be64cdf89e181
Author: Matthew Thode <email address hidden>
Date: Fri Oct 7 11:16:28 2016 -0500

    start cloud-init-local in the boot runlevel

    cloud-init-local needs to be run in the boot runlevel because it
    modifies services in the default runlevel. When a runlevel is started
    it is cached, so modifications that happen to the current runlevel while
    you are in it are not acted upon.

    Change-Id: Ifeae0071fc9e738ec223ec0...

tags: added: in-feature-v2
Download full text (14.6 KiB)

Reviewed: https://review.openstack.org/399347
Committed: https://git.openstack.org/cgit/openstack/diskimage-builder/commit/?id=7d5afecfd9e2ea5249ea7f12eba74c77c1abd7e6
Submitter: Jenkins
Branch: feature/v2

commit 8d7362aa9b4a9d2430de7959d4ee4c78429464c0
Author: d.marlin <email address hidden>
Date: Thu Nov 17 03:36:54 2016 -0500

    Change path for dnf arch override so basearch is not overwritten.

    After writing the basearch value to /etc/dnf/vars/basearch the
    arch value was overwriting the same file. This appears to be
    incorrect, so changing it to write /etc/dnf/vars/arch, which
    matches the subsequent 'yum' code paths.

    Change-Id: I5da54f03224c11f9e286f16b68533936c4174c2a

commit fb8cf95b6fb0820867ebfd262c38d2cae5ab43fa
Author: Ben Nemec <email address hidden>
Date: Wed Nov 16 16:27:24 2016 -0600

    Disable all repos in os-refresh-config too

    This change was made for pre-install so it applies during the
    image build, but wasn't applied to the os-refresh-config script
    that would run after deployment. The same problems apply there,
    so we should do the same thing.

    Change-Id: I4b8534cc9586eeb588b5c358550e76e27d40556a
    Closes-Bug: 1629922

commit a1f57b8cad0717090eb12014d7847a35bd0563a3
Author: Markos Chandras <email address hidden>
Date: Mon Oct 31 21:43:47 2016 +0000

    lib: common-functions: Fix tmpfs umounting

    It has been observed that some chroot operations spawn additional
    processes which rely on chroot files. More specifically, zypper, uses
    gpg-agent to import and validate gpg keys for its repositories. This
    gpg-agent process may stay alive for longer which prevents unmounting of
    the tmpfs directory since the gpg-agent process still uses libraries etc
    which were present in the chroot. We try to solve this by using walking
    all the pids in /proc to find out the running processes in the chroot and
    kill them gracefully. If that fails for whatever reason, then we simply
    keep trying to umount the tmpfs directory before we give up.

    The gpg-agent process usually terminates soon after its home directory
    disappears but on fast systems we can reach the 'umount tmpfs' point
    before gpg-agent terminates by itself. The solution is generic enough so
    other 'chroot processes' can also be handled appropriately.

    Change-Id: Iccf332678c79266113e76f062884fc5ee79e515d

commit e88d6b37df5a210ad15da24403274914f737956e
Author: Noam Angel <email address hidden>
Date: Mon Oct 31 11:54:58 2016 +0200

    add support for SUSE in dhcp-all-interfaces

    This patch will add support for SUSE network scripts,
    network script in SUSE saved under "/etc/sysconfig/network/ifcfg-*"
    see: https://www.suse.com/documentation/sled11/book_sle_admin/data/sec_basicnet_manconf.html

    Change-Id: I87ac2e327cee4945c15da9f2e4adc0a8b7650712

commit d07d7ed15d54c37448d5be67c4e4707ba19edac0
Author: Noam Angel <email address hidden>
Date: Tue Nov 1 16:19:44 2016 +0200

    simplify ARCH param for rhel/centos param can be x86_64 and amd64

    for fedora/rhel/centos the main supported ARCH is x86_64. This patch allow
    to call diskima...

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.