Bug 1387267 - dhcp-all-interfaces doesn't work for rhel6 images
Summary: dhcp-all-interfaces doesn't work for rhel6 images
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: diskimage-builder
Version: 10.0 (Newton)
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: rc
: 10.0 (Newton)
Assignee: Derek Higgins
QA Contact: Derek Higgins
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-10-20 13:52 UTC by Derek Higgins
Modified: 2016-12-16 07:17 UTC (History)
6 users (show)

Fixed In Version: diskimage-builder-1.21.0-6.el7ost
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-12-14 16:23:29 UTC


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2016:2948 normal SHIPPED_LIVE Red Hat OpenStack Platform 10 enhancement update 2016-12-14 19:55:27 UTC
OpenStack gerrit 392555 None None None 2016-11-02 11:14:56 UTC
Launchpad 1638527 None None None 2016-11-02 11:15:35 UTC

Description Derek Higgins 2016-10-20 13:52:57 UTC
RHEL 6 images build and boot successfully (built with the following command)

DIB_REG_TYPE= DIB_CLOUD_IMAGES=file://$PWD DIB_RELEASE=6.8-20160425.0 disk-image-create --mkfs-options "-O ^64bit" rhel baremetal dhcp-all-interfaces grub2 -o rhel6-image

(Note: the --mkfs-options "-O ^64bit" is required if building a RHEL 6 image on a RHEL 7 host)

But when the instance boots its not getting any IP address

The problem seems to be that dhcp-all-interfaces isn't being installed correctly as its using dib-init-system to decide how to install itself.
dib-init-system is reporting that the image uses upstart as a init system instead of sysv

Also when localy forcing dhcp-all-interfaces down the sysv path it fails because 

/tmp/in_target.d/install.d/50-dhcp-all-interfaces: line 26: update-rc.d: command not found

We should instead be adding 
# chkconfig:         3 9 50
to the init script header and doing something like
chkconfig dhcp-all-interfaces on

Comment 1 Derek Higgins 2016-10-20 14:47:58 UTC
An update to the previous comment dib-init-system is probably returning the current value (it is upstart on RHEL 6) but the networking is being handled by the sysv compatibility layer.
here
/etc/rc.d/rc3.d/S10network -> ../init.d/network

Comment 4 Derek Higgins 2016-11-15 11:45:46 UTC
Tested using
diskimage-builder-1.21.0-6.el7ost.noarch

Built a rhel6 image with
DIB_RHSM_POOL=$POOL DIB_RHSM_PASSWORD=$P DIB_RHSM_USER=$U DIB_REG_TYPE= DIB_CLOUD_IMAGES=file://$PWD DIB_RELEASE=6.8-20160425.0 disk-image-create --mkfs-options "-O ^64bit" rhel baremetal dhcp-all-interfaces -o rhel6-image

Booted the image and all was well

[cloud-user@undercloud ~]$ ssh cloud-user@192.0.2.6 cat /etc/redhat-release 
Red Hat Enterprise Linux Server release 6.8 (Santiago)

Comment 6 errata-xmlrpc 2016-12-14 16:23:29 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHEA-2016-2948.html


Note You need to log in before you can comment on or make changes to this bug.