Bug 1300410 - Cloud-init not running scripts on launching CFME instance
Cloud-init not running scripts on launching CFME instance
Status: CLOSED ERRATA
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Appliance (Show other bugs)
5.5.0
Unspecified Unspecified
unspecified Severity medium
: GA
: 5.6.0
Assigned To: Joe Vlcek
luke couzens
: ZStream
Depends On:
Blocks: 1305560
  Show dependency treegraph
 
Reported: 2016-01-20 12:26 EST by luke couzens
Modified: 2016-06-29 11:31 EDT (History)
7 users (show)

See Also:
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 11:31:50 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description luke couzens 2016-01-20 12:26:03 EST
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 14:42:59 EST
Assigning to add test case
Comment 3 Joe Vlcek 2016-02-01 17:39:52 EST
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 06:21:01 EST
Luke,

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

Thank you JoeV
Comment 5 Joe Vlcek 2016-02-02 06:29:10 EST
Luke,

Please ignore my last comment regarding testing on Ec2.

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

commit 36fba00a9325ef6dc814042248a553562c99f323
Author:     Joe VLcek <jvlcek@redhat.com>
AuthorDate: Tue Feb 2 11:46:57 2016 -0500
Commit:     Joe VLcek <jvlcek@redhat.com>
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 14:38:33 EST
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@redhat.com>
AuthorDate: Thu Feb 11 14:32:51 2016 -0500
Commit:     Joe Rafaniello <jrafanie@redhat.com>
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 14:38:37 EST
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@redhat.com>
AuthorDate: Mon Feb 8 16:55:25 2016 -0500
Commit:     Joe VLcek <jvlcek@redhat.com>
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 16:17:47 EDT
Verified in 5.6.0.4-beta2.3
Comment 12 errata-xmlrpc 2016-06-29 11:31:50 EDT
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

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