Bug 1300410

Summary: Cloud-init not running scripts on launching CFME instance
Product: Red Hat CloudForms Management Engine Reporter: luke couzens <lcouzens>
Component: ApplianceAssignee: Joe Vlcek <jvlcek>
Status: CLOSED ERRATA QA Contact: luke couzens <lcouzens>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 5.5.0CC: abellott, cpelland, jhardy, jprause, lcouzens, mfeifer, obarenbo
Target Milestone: GAKeywords: ZStream
Target Release: 5.6.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 5.6.0.0 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1305560 (view as bug list) Environment:
Last Closed: 2016-06-29 15:31:50 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1305560    

Description luke couzens 2016-01-20 17:26:03 UTC
Description of problem:

Running cloud-init on RHOS to set anything on a fedora 23 box works fine but running the exact same test using a CFME 5.5.2 image does not. The only difference I can see is the cloud-init version on fedora is 0.7.7 and on CFME its 0.7.6. However I don't believe this is the catalyst.

I have tried a number of scripts to add users to groups, setting root password etc. Even trying to create a simple text file in /tmp does not seem to work.

Version-Release number of selected component (if applicable):


How reproducible:100%


Steps to Reproduce:
1. login to RHOS
2. create new cfme 5.5.2 RHOS image
3. launch instance
4. fill out tabs as required
5. add cloud-init script to direct input
6. launch instance
7. check changes on instance

Actual results:no changes made by cloud-init


Expected results: changes completed


Additional info: script tested with is as follows: 

#cloud-config
write_files:
  - path: /tmp/test.txt
    content: |
      Here is a line.

Comment 2 Shveta 2016-01-27 19:42:59 UTC
Assigning to add test case

Comment 3 Joe Vlcek 2016-02-01 22:39:52 UTC
An update:

The Problem Description:
------------------------

This particular issue has multiple root problems. The main issue is that
the metadata-service, available at http://169.254.169.254 is not reachable
because a bogus route is being added to the routing table by an OS networking
script:

/etc/sysconfig/network-scripts/ifup-eth

Configuration for the ifup-eth script can be maintained in file:

/etc/sysconfig/network

On Fedora the /etc/sysconfig/network file contains:
NETWORKING=yes
NOZEROCONF=yes
DEVTIMEOUT=10


On the CFME appliance the /etc/sysconfig/network file contains:
HOSTNAME=localhost.localdomain
# Created by anaconda



The solution:
-------------

I am not sure what the best way to populate this /etc/sysconfig/network file is
yet. We could do it when constructing the CMFE appliance but it may be possible
to pass configuration from the RHOS controller to launching instances.

At least now that I fully understand the problem I will be able to determine
the best solution soon.

Comment 4 Joe Vlcek 2016-02-02 11:21:01 UTC
Luke,

Can you please confirm if this issue is also encountered on Ec2?

Thank you JoeV

Comment 5 Joe Vlcek 2016-02-02 11:29:10 UTC
Luke,

Please ignore my last comment regarding testing on Ec2.

JoeV

Comment 7 CFME Bot 2016-02-05 16:34:55 UTC
New commit detected on ManageIQ/manageiq-appliance-build/master:
https://github.com/ManageIQ/manageiq-appliance-build/commit/36fba00a9325ef6dc814042248a553562c99f323

commit 36fba00a9325ef6dc814042248a553562c99f323
Author:     Joe VLcek <jvlcek>
AuthorDate: Tue Feb 2 11:46:57 2016 -0500
Commit:     Joe VLcek <jvlcek>
CommitDate: Tue Feb 2 12:15:33 2016 -0500

    Disable zeroconfig to allow access to meta-data service by cloud-init
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1300410

 kickstarts/base.ks.erb | 6 ++++++
 1 file changed, 6 insertions(+)

Comment 8 CFME Bot 2016-02-11 19:38:33 UTC
New commit detected on cfme_productization/master:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme_productization.git;a=commit;h=abbaae313d0d41cfb0723b49633aa3dc428cc99c

commit abbaae313d0d41cfb0723b49633aa3dc428cc99c
Merge: 40ca4d5 155fbd2
Author:     Joe Rafaniello <jrafanie>
AuthorDate: Thu Feb 11 14:32:51 2016 -0500
Commit:     Joe Rafaniello <jrafanie>
CommitDate: Thu Feb 11 14:32:51 2016 -0500

    Merge branch 'bz_1300410' into 'master'
    
    Disable zeroconfig to allow access to meta-data service by cloud-init
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1300410
    
    https://github.com/ManageIQ/manageiq-appliance-build/pull/85
    
    See merge request !179

 manageiq-appliance-build/productization/kickstarts/base.ks.erb | 6 ++++++
 1 file changed, 6 insertions(+)

Comment 9 CFME Bot 2016-02-11 19:38:37 UTC
New commit detected on cfme_productization/master:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme_productization.git;a=commit;h=155fbd20adf816e81066d30f3717979a46f68459

commit 155fbd20adf816e81066d30f3717979a46f68459
Author:     Joe VLcek <jvlcek>
AuthorDate: Mon Feb 8 16:55:25 2016 -0500
Commit:     Joe VLcek <jvlcek>
CommitDate: Mon Feb 8 16:55:25 2016 -0500

    Disable zeroconfig to allow access to meta-data service by cloud-init
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1300410

 manageiq-appliance-build/productization/kickstarts/base.ks.erb | 6 ++++++
 1 file changed, 6 insertions(+)

Comment 10 luke couzens 2016-04-27 20:17:47 UTC
Verified in 5.6.0.4-beta2.3

Comment 12 errata-xmlrpc 2016-06-29 15:31:50 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://access.redhat.com/errata/RHBA-2016:1348