/srv/irclogs.ubuntu.com/2016/04/21/#cloud-init.txt

Odd_Blokerharper: smoser: Happy release day!  I've just realised/discovered that lxd images still write out eth0.cfg when they are launched; they use this template: http://paste.ubuntu.com/15963686/.  Does http://paste.ubuntu.com/15963681/ look like a reasonable replacement for that to drop in to /var/lib/cloud/seed/nocloud-net/network-config ?11:49
Odd_Bloke(That seed directory is the same one they use for everything else)11:50
Odd_BlokeMy testing suggests that it is, but I wanted to get your eyes on it first. :)11:51
Odd_Bloke(The interface we care about will always be called eth0)11:51
rharperOdd_Bloke: the control field can always be auto; ie, do you want ifupdown to make sure the iface is 'up';12:34
smoserOdd_Bloke, that does seem right.12:58
smoserOdd_Bloke, fwiw, it does work right now for 'dhcp'12:58
smosercloud-init deletes the 'eth0.cfg' file that has the rendered template12:59
smoser http://bazaar.launchpad.net/~cloud-init-dev/cloud-init/trunk/revision/121012:59
smoserrharper, this  mioght have been the issue you were seeing that i coudl not reproduce.13:00
smoserif you got 'manual' written there.13:00
Odd_Blokesmoser: Even if cloud-init didn't delete it, it'd be fine for the dhcp case; it's the manual case that's the problem. :p13:00
rharpermanual case is for when you're doing link-local only networking13:01
rharperhence the check in the lxd config get13:01
Odd_BlokeYeah, and then we don't want to dhcp, so fallback config would also be wrong.13:01
rharpernow, I think we want control: auto (which we didn't have before)13:01
rharperOdd_Bloke: right, in the case one wants to use link-local, then we need subnet: manual  and control: auto13:02
rharperI think that will have ifup "up" the iface; I'm not sure if that's enough for link-local to work; but it's likely better than ignoring it altogether unless some other part of lxd up's the iface13:02
rharperand certainly better than attempting to dhcp on a the iface with no dnsmasq setup to respond13:03
rharperIIUC the problem13:03
rharperI should add a link-local set to curtin networking13:03
Odd_Blokehttps://bugs.launchpad.net/cloud-images/+bug/1573000 is the bug.13:03
rharperah13:04
rharperindeed, so providing a config to cloud-init would prevent the writeout of the fallback dhcp13:04
Odd_BlokeYeah.13:04
smoserwhere is your diff, Odd_Bloke ? the changes your proposing ?13:05
rharperin the bug13:05
rharperhttp://paste.ubuntu.com/15963681/ as well13:05
Odd_Blokesmoser: There is no cloud-init diff, this is just about the network config lxd would write out to its seed.13:05
smoserwhat should i write to get this ?13:06
smoserer... how do i answer questions in dpkg-reconfigure lxd to get this13:07
rharperdisable the bridge13:07
rharperI think you want to say no to lxdbr0 ?13:07
smoser http://paste.ubuntu.com/15965001/13:07
smosertrying that13:07
Odd_Blokelxd ships in link-local mode.13:08
Odd_BlokeSo we are in the not-quite-working case in the images by default.13:08
Odd_BlokeIf you configure the bridge, then the lxd image and cloud-init write out configuration that agrees.13:09
Odd_BlokeWHich is still a bug, but less noticeable.13:09
Odd_BlokeYou can easily fake one or the other with "-c user.network_mode=link-local" and "-c user.network_mode=" when launching a container.13:09
=== rangerpbzzzz is now known as rangerpb
smoser http://paste.ubuntu.com/15965123/13:16
smoserso that seems like it should work.13:16
Odd_Blokesmoser: Yeah, I've tested it; it works as I expect.  Just checking if there are gotchas that I'm not seeing. :)13:17
smoserOdd_Bloke, if you dont have a reason, i'd prefer 2 spaces for indentation levels rather than 4. but i dont have a good reason as to why.13:17
smoser(in the template you're writing)13:17
Odd_Blokesmoser: The rest of the lxd templating stuff is YAML using 4 spaces, so I'll stick with that.  I'll add you as a reviewer once I have something. :)13:18
smoserits just obnoxiously wide. but consitency is better.13:20
Odd_Blokerharper: So were you earlier saying that I probably wanted 'control: auto' for both cases?13:20
smoserwhat we really need though is for13:20
smoser%{network_config.yaml}13:21
smoseror soemthign to that affect.13:21
smoseri geuss, need to declare the version that we want also13:21
smoserbut.13:21
zgredeqHello all, will someone give me a helping hand? tl;dr: cloud-init + multiple nics brings up only first interface. Metadata service is available and reachable (openstack).14:10
Odd_Blokerharper: (Did you see my earlier Q?  "So were you earlier saying that I probably wanted 'control: auto' for both cases?")14:29
rharperOdd_Bloke: sorry, if I missed it; yes; control: auto means that network target will attempt to make sure any 'auto' iface is up before continuing;14:30
Odd_BlokeOK, cool.14:30
rharperwhat's not clear to me, without testing, is in the link-local case; what ifupdown does with auto14:30
rharperbasically ifquery will return the iface name if it's marked auto; and then I think ifup would need to touch the file in /run/network/$Iface.XXX to know that its up;  if ifup on a linklocal doesn;t do that14:31
rharperthen it'll fail and cause cloud-init not to continue (no network!)14:31
Odd_Blokerharper: OK, I'll investigate what happens. :)14:32
rharperso we need to confirm that either manaul is fine (and the network comes up OK) or auto (and that ifup on a link-local) does the right thing14:32
rharpercool14:32
Odd_Blokerharper: (I've seen that configuration there work as expected FWIW, but I'll see what auto does if you think it's more correct (if it works :p))14:33
rharperOdd_Bloke: right, my thoughts as well14:33
smoserhold on.15:09
smoseryou want auto15:09
smosercontrol: auto15:09
smoseron both.15:09
smoserits very odd actually.15:11
smoseri think there is a bug in ifupdown there.15:11
smoser iface eth0 inet manua15:12
smoserwiuthout 'auto eth0' or 'allow-auto eth0'15:12
smosershould not show the device as up15:12
smoserwhat a mess.15:14
smoser http://paste.ubuntu.com/15966891/15:19
smoserrharper, ^ . so if you put 'manual' then it comes up auto15:30
smoserwhich i think i a bug15:30
smoserthe 2 calls i realize now are because i had an 'eth0.cfg' file , which we're fixing :)15:30
rharperthat sounds like a bug15:31
rharperpretty sure manual means (don't up this yourself)15:32
smoseryeah, so part of htat above is user fail15:32
smoseri had multiple stanzas15:33
rharperah15:33
rharperhehe15:33
smoseractually it odd that auto eth015:33
rharperyes15:33
smoserauto eth015:33
smoserauto eth015:33
smoserbrings it up 3 times15:33
smoseri think15:33
smoserbut ignore that.15:33
smoserjust putting this in:15:33
smoseriface eth0 inet manual15:33
smosermeans that the interface *is* up (listed in ifconfig without -a)15:34
smoserbut no ifup hooks are called15:34
rharpersmoser: hangout15:34
smoseryeah, so that said, we should declare it auto15:34
rharperagreed, Odd_Bloke is testing that it DTRT for link-local15:35
Odd_BlokeIt looks like it DTRT with auto.15:35
smoseri think you end up with link local with 'manual' with or without auto15:37
smoserwhich i kind ofthink is a bug15:37
rharperinteresting15:38
smoserrharper, opened https://bugs.launchpad.net/ubuntu/+source/ifupdown/+bug/157311215:55
rharperok16:01
smoserOdd_Bloke, https://code.launchpad.net/~daniel-thewatkins/cloudware/+git/cpc_build_tools/+merge/292557 just commented there. sorry didnt' look earlier18:00
smoser http://paste.ubuntu.com/15970544/18:10
Odd_Blokesmoser: Oh, shoot, I copy-pasted from an old version on my test box.18:15
Odd_Blokesmoser: Thanks. :)18:15
smoserOdd_Bloke, what do you think about 'copy' ?18:17
smoseri really think you dont want it18:17
smoseras interfaces.tpl didnt have it.18:17
Odd_Blokesmoser: Right, but all the other cloud-init bits _do_ have it.18:17
Odd_Blokesmoser: So I was on the fence.18:17
smoserand for 16.04 we should kill those upstart.X files18:17
Odd_Blokesmoser: Right; let's get networking fixed first though. ;)18:18
smoserwhat does 'copy' mean ?18:18
Odd_Blokesmoser: I believe it means that the file will be regenerated when a container is copied to become a new container.18:18
smoserthat the rendered file should be coied when the image is copied (from inside the instance) or that the template shoudl be copied.18:18
Odd_BlokeBut I mostly cargo-culted it.18:18
smoserhm....18:19
Odd_Blokesmoser: It was more important when we were using the MAC address in there, but it turned out we didn't need it, which simplified matters.18:19
smoseryeah, but only "mostly"18:19
smoser:)18:19
smoserwell, with or without the mac, it would need to be re-rendered when you start a new image18:20
smoserright ?18:20
Odd_BlokeRight, because network_mode might have changed.18:20
smoserright.18:20
smoserso whatever means *that* is what we want18:20
Odd_Blokesmoser: So in lxd/container_lxc.go, at line 267718:21
Odd_BlokeFAIL18:22
Odd_BlokeAt line 2702, the trigger is compared against the "when" list and if it's found the template is run.18:22
Odd_BlokeSo I believe having 'copy' there is what we want.18:22
Odd_BlokeIt looks like the triggers used are "start", "create", and "copy".18:23
Odd_BlokeBah, I accidentally cleaned up my test host.18:24
smoseri still dont knwo what 'copy' means.18:24
smoserstart and create somewhat make sense to me18:24
Odd_Blokesmoser: 'copy       - Copy containers within or in between lxd instances.'18:24
smoserand i had strgraber ask you all to change to just 'create' rather than 'start'18:24
smoserlive?18:25
smoseror images18:25
Odd_BlokeI think that would be 'move       - Move containers within or in between lxd instances.'18:25
smoseri still dont understand what it means. why would i care about rendering a file on 'copy'18:26
smoserif i'm going to have to 'start' or 'create' it on the other side after i 'copy' it.18:26
Odd_Blokesmoser: But you might not want to regenerate a template for _every_ start.18:27
smoserthat does make some sense, yes.18:27
smoser(although i doubt you really want it as if your container goes down unintended it will get re-rendered , in addition to explicit 'stop' and 'start')18:28
smoserbut thats beside the point.18:28
smoserwe do not want 'start'. we want create.18:28
Odd_BlokeYep.18:29
smoserhm..18:30
smoserwhy is that mp private ?18:30
smosermaybe i should not ask that in public :)18:30
smoserbut we probably need to ask stgraber what we want to do here.18:30
smoserand we could/should do that in lxc-dev.18:30
* larsks wonders why there is a set_hostname method in the Azure data source.18:32
Odd_Blokesmoser: Yeah, I was going to get stgraber to review as well.18:33
Odd_BlokeBut I'll pick this up tomorrow morning; I want to finish off the last release bits I have and then EOD. :)18:33
larsksOdd_Bloke: it looks like you are responsible for large chunks of the azure data source? If that's true, got a moment for a couple of questions?19:08
=== rangerpb is now known as rangerpbzzzz
Odd_Blokelarsks: Drop me an email at daniel.watkins@canonical.com?20:15
larsksOdd_Bloke: Sure, if that's your preference.20:17
Odd_Blokelarsks: Yeah, I'll grab you on here once I've read through.20:17
Odd_Blokelarsks: (I'm UK based, so I'm not really here ATM)20:18
Odd_Bloke*disappears in a cloud of smoke*20:18
larsksOdd_Bloke: I figured from your EOD comment earlier :)20:18

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