/srv/irclogs.ubuntu.com/2015/02/10/#cloud-init.txt

=== harlowja is now known as harlowja_away
jseunguys, where's the .py file that plays with networking configuration, especially, /etc/network/interfaces ?13:42
jseunok, this is handled in distro classes13:47
jseunit looks like cloud-init writes to /etc/network/interfaces from a template where eth0 is not marked as auto.  a) can I tell cloud-init to not alter /etc/network/interfaces ? or b) where can I modify the template, if any?14:18
jseunI have put eth0 configuration into /etc/network/interfaces.d/eth0 and would like cloud-init to not overwrite /etc/network/interfaces unless I put some configuration directive in my meta-data file14:20
larsksjseun: are you booting with a config drive? Or just using the metadata service? With a cursory glance at the source, it looks as if cloud-init only ever writes that file when using config drive, nocloud, or OpenNebula data sources.14:39
larsks...but I could be wrong.14:39
jseunlarsks: it's meta-data and user-data file written to an ISO, I guess this is NoCloud14:40
larsksNo, that's config drive :)14:40
jseunah! :)14:40
larsksHuh, it *looks* as if the network configuration is only written if your metadata includes network configuraiton information.  I'm looking in cloudinit/sources/DataSourceConfigDrive.py, around line 215.14:41
larsksSimilarly, in .../DataSourceNoCloud.py around line 186.14:41
larsksI'm actually not sure which data source you're hitting :/14:42
jseunlarsks: my meta-data file does not specify any network configuration, yet /etc/network/interfaces got smashed14:42
larsksHmmm, in the nocloud datasource, there is also a check against (self.dsmode in ("local", seeded_interfaces)), and I don't know the code well enough to know what that does.14:43
larsksI guess I would stick some debugging code in there and run it from the command line to see what happens.14:43
jseunI fixed it, for now, having auto eth0\niface eth0 inet dhcp\n in the meta-data file14:44
smoserthat is config drive'14:44
smosermeta-data and user-data.14:44
smosercloud-init in 0.7.X really expects that eth0 is 'auto' in the OS.14:45
larsksWeird, then, because it looks like the network config is only written if there is a network_config key available.14:45
smosernetworking is one thing that really needs improving.14:46
smoserit is complex though, to block system boot waiting for networking information from somewhere that might not be there... 14:46
smoserat least for making generic images, and the goal for ubuntu is "one image that works everywhere".14:46
jseunany ways I could provide the eth0 ip address in final_message or is it more a runcmd thing?15:04
=== rcj is now known as Guest25083
tennishi.... How can you determine what cloud-init thinks is the default user? 21:36
tennisThat is, how can I be sure my "default_user" parm in /etc/cloud/cloud.cfg worked?21:38
smoserhttp://paste.ubuntu.com/10164529/22:01
smoserharlowja, arent we missing the return on the not case tehre?22:02
harlowjasurely would seem like it, lol22:02
harlowjagood catch22:02
tennissmoser: Does my above query make any sense? 22:03
smosertennis, /var/log/cloud-init.log has a line like:22:04
smoser2015-02-10 21:37:24,737 - __init__.py[INFO]: User ubuntu already exists, skipping.22:04
tennissmoser: ah, ok.  Thanks!22:04
smoserharlowja, lp:~smoser/cloud-init/py2-3 we're closer.22:14
harlowjawoot22:14
harlowjaprogress22:15
smoseri'm down to a failure around random_seed.22:15
smoseri really hate bytes and strings and encode and decode22:15
harlowja:)22:15
harlowjaya22:15
harlowjame too22:15
harlowjawaste of my life, lol22:15
smoseralright.22:17
smoseri hope to upload to vivid tonight. 22:17
smoserlater.22:17
harlowjacool22:22
harlowjalata22:22

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!