[DIB] disable-firewall element fails when building a CentOS or RHEL image from RHEL7

Bug #1653535 reported by Luigi Toscano
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Sahara
Fix Released
High
Luigi Toscano
Newton
Fix Released
High
Luigi Toscano

Bug Description

When building image using RHEL7(.3) as base (at least CentOS7 and RHEL7), the generation fails during the post-install phase of disable-firewall, inside 30-disable-firewalld.

dib-run-parts Thu Dec 22 10:10:52 EST 2016 Running /tmp/in_target.d/post-install.d/30-disable-firewalld
+ set -eu
+ set -o pipefail
+ case "${DISTRO_NAME}" in
+ which systemctl
/usr/bin/systemctl
+ systemctl disable firewalld
Operation failed: No such file or directory
++ /usr/share/diskimage-builder/lib/img-functions:run_in_target:66 : check_break after-error run_in_target bash
++ /usr/share/diskimage-builder/lib/common-functions:check_break:108 : echo ''
++ /usr/share/diskimage-builder/lib/common-functions:check_break:108 : egrep -e '(,|^)after-error(,|$)' -q
+ /usr/share/diskimage-builder/lib/img-functions:run_in_target:1 : trap_cleanup
+ /usr/share/diskimage-builder/lib/img-functions:trap_cleanup:44 : exitval=1
+ /usr/share/diskimage-builder/lib/img-functions:trap_cleanup:45 : cleanup
+ /usr/share/diskimage-builder/lib/img-functions:cleanup:50 : unmount_image
+ /usr/share/diskimage-builder/lib/img-functions:unmount_image:22 : sync
+ /usr/share/diskimage-builder/lib/img-functions:unmount_image:26 : unmount_dir /tmp/dib_build.60WTpWSk/mnt
+ /usr/share/diskimage-builder/lib/common-functions:unmount_dir:290 : local dir=/tmp/dib_build.60WTpWSk/mnt
+ /usr/share/diskimage-builder/lib/common-functions:unmount_dir:291 : local real_dir
+ /usr/share/diskimage-builder/lib/common-functions:unmount_dir:292 : local mnts
+ /usr/share/diskimage-builder/lib/common-functions:unmount_dir:294 : '[' '!' -d /tmp/dib_build.60WTpWSk/mnt ']'
++ /usr/share/diskimage-builder/lib/common-functions:unmount_dir:301 : readlink -e /tmp/dib_build.60WTpWSk/mnt
+ /usr/share/diskimage-builder/lib/common-functions:unmount_dir:301 : real_dir=/tmp/dib_build.60WTpWSk/mnt
++ /usr/share/diskimage-builder/lib/common-functions:unmount_dir:303 : grep '^/tmp/dib_build.60WTpWSk/mnt'
++ /usr/share/diskimage-builder/lib/common-functions:unmount_dir:303 : awk '{print $2}'
++ /usr/share/diskimage-builder/lib/common-functions:unmount_dir:303 : sort -r
+ /usr/share/diskimage-builder/lib/common-functions:unmount_dir:303 : mnts='/tmp/dib_build.60WTpWSk/mnt/tmp/yum
/tmp/dib_build.60WTpWSk/mnt/tmp/in_target.d
...

This may be a duplicate of https://bugs.launchpad.net/sahara/+bug/1547653, even if I was not able to reproduce it at that time. It became easier to reproduce it, but not consistently, starting from Newton (a review is already out). It's probably relate to the way host and guest variables and settings interact, and it's time to fix it (also in Newton), also because it was found by 3rd party users:
https://bugzilla.redhat.com/show_bug.cgi?id=1408251

Tags: dib
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to sahara-image-elements (stable/newton)

Fix proposed to branch: stable/newton
Review: https://review.openstack.org/416079

Changed in sahara:
status: New → Incomplete
status: Incomplete → Triaged
importance: Undecided → Medium
importance: Medium → High
assignee: nobody → Luigi Toscano (ltoscano)
milestone: none → ocata-3
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to sahara-image-elements (master)

Reviewed: https://review.openstack.org/381580
Committed: https://git.openstack.org/cgit/openstack/sahara-image-elements/commit/?id=42d79a982815cff83ed6e89b269b45c982b906b6
Submitter: Jenkins
Branch: master

commit 42d79a982815cff83ed6e89b269b45c982b906b6
Author: Luigi Toscano <email address hidden>
Date: Tue Oct 11 17:51:57 2016 +0200

    Disable firewalld (also on centos7) when it is enabled

    Calling systemctl disable on a non-existing unit leads to a failure due
    to `set -e`. This checks prevents it.
    Also applies the same codepath to centos7 (as it is for rhel7, also
    because centos7 has currently test coverage).

    Closes-Bug: #1653535
    Change-Id: I21f9cfd1959dcde80ed6abbf410bd0c4e93cc803

Changed in sahara:
status: Triaged → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to sahara-image-elements (stable/newton)

Reviewed: https://review.openstack.org/416079
Committed: https://git.openstack.org/cgit/openstack/sahara-image-elements/commit/?id=6e663a7dff880a15b3e6ec5b2487a2055c23a164
Submitter: Jenkins
Branch: stable/newton

commit 6e663a7dff880a15b3e6ec5b2487a2055c23a164
Author: Luigi Toscano <email address hidden>
Date: Tue Oct 11 17:51:57 2016 +0200

    Disable firewalld (also on centos7) when it is enabled

    Calling systemctl disable on a non-existing unit leads to a failure due
    to `set -e`. This checks prevents it.
    Also applies the same codepath to centos7 (as it is for rhel7, also
    because centos7 has currently test coverage).

    Closes-Bug: #1653535
    Change-Id: I21f9cfd1959dcde80ed6abbf410bd0c4e93cc803
    (cherry picked from commit 42d79a982815cff83ed6e89b269b45c982b906b6)

tags: added: in-stable-newton
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/sahara-image-elements 6.0.0.0b3

This issue was fixed in the openstack/sahara-image-elements 6.0.0.0b3 development milestone.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/sahara-image-elements 5.0.1

This issue was fixed in the openstack/sahara-image-elements 5.0.1 release.

tags: removed: in-stable-newton
Luigi Toscano (ltoscano)
tags: added: dib
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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