Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 581212 - app-emulation/cloud-init-0.7.6-r1 copies Debian-style network/interfaces over conf.d/net, causes unbootable instance
Summary: app-emulation/cloud-init-0.7.6-r1 copies Debian-style network/interfaces over...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High critical
Assignee: Matthew Thode ( prometheanfire )
URL: https://code.launchpad.net/~promethea...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-04-25 21:36 UTC by Robin Johnson
Modified: 2016-10-07 16:13 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2016-04-25 21:36:09 UTC
This is a linking bug for an upstream issue.

On boot, cloud-init is copying a Debian-style /etc/network/interfaces on top of the Gentoo /etc/conf.d/net. Since they have radically different syntaxes, this causes the Gentoo boot to break.

Here's an example of it, booting on DreamHost's DreamCompute OpenStack environment:
http://dev.gentoo.org/~robbat2/gentoo-openstack-amd64-default-20160421.console.txt
Comment 1 Matthew Thode ( prometheanfire ) archtester Gentoo Infrastructure gentoo-dev Security 2016-04-30 02:59:08 UTC
does ~0.7.6_p1212 fix it for you?
Comment 2 Matt Summers (RETIRED) gentoo-dev 2016-08-16 21:14:44 UTC
I was bit by this today, yippee. I note that cloud-init-0.7.7 is now available, but have not looked at it. No version currently in the tree works for me.

Another little detail, the 0.7.6_p1212 version does not install the init scripts with +x, looks like it just drops the files instead of the usual doinitd fun.

All of this is in the context of AWS EC2, btw.

Any workarounds or clues? I guess I will go back to using my mangled version of app-admin/amazon-ec2-init for now.
Comment 3 Matt Summers (RETIRED) gentoo-dev 2016-08-16 21:46:39 UTC
Another note, I see this from cloud-init on a fresh install too. This seems to mean that dev-python/oauthlib should be installed.

Traceback (most recent call last):
  File "/usr/lib/python-exec/python2.7/cloud-init", line 43, in <module>
    from cloudinit import netinfo
  File "/usr/lib64/python2.7/site-packages/cloudinit/netinfo.py", line 23, in <module>
    import cloudinit.util as util
  File "/usr/lib64/python2.7/site-packages/cloudinit/util.py", line 59, in <module>
    from cloudinit import url_helper
  File "/usr/lib64/python2.7/site-packages/cloudinit/url_helper.py", line 32, in <module>
    import oauthlib.oauth1 as oauth1
ImportError: No module named oauthlib.oauth1
Comment 4 Matthew Thode ( prometheanfire ) archtester Gentoo Infrastructure gentoo-dev Security 2016-08-18 21:18:07 UTC
I've updated cloud-init to 0.7.7, fixing the chmod issue and updating the deps.  Was that the only issue you had?

can you test the new stuff?

@robbat2 can this be closed?  I'm working on up-streaming that patch.
Comment 5 Matthew Thode ( prometheanfire ) archtester Gentoo Infrastructure gentoo-dev Security 2016-08-18 21:45:01 UTC
submitted a patch to https://code.launchpad.net/~prometheanfire/cloud-init/+git/cloud-init/+merge/303339
Comment 6 Matthew Thode ( prometheanfire ) archtester Gentoo Infrastructure gentoo-dev Security 2016-08-22 00:28:13 UTC
I've started https://github.com/prometheanfire/cloud-init (which cloud-init-9999 installs)  I haven't tested it, but it's my working area for getting this stuff working.
Comment 7 Matthew Thode ( prometheanfire ) archtester Gentoo Infrastructure gentoo-dev Security 2016-08-22 03:46:43 UTC
@quantumsummers, try cloud-init-9999 it worksforme, I'm going to try and get it into 0.7.8.
Comment 8 Matthew Thode ( prometheanfire ) archtester Gentoo Infrastructure gentoo-dev Security 2016-10-07 05:00:35 UTC
fixed in 0.7.8  networking requires a reboot still though
Comment 9 Matthew Thode ( prometheanfire ) archtester Gentoo Infrastructure gentoo-dev Security 2016-10-07 16:13:21 UTC
cloud-init and cloud-init-local should be runlevel boot
cloud-init-local should not depend on netmount

fix for first boot is here

https://code.launchpad.net/~prometheanfire/cloud-init/+git/cloud-init/+merge/307969

also added an elog to pkg_postinst to let people know that cloud-init-local should run in the boot runlevel

fix is in 0.7.8-r1