/srv/irclogs.ubuntu.com/2014/10/01/#cloud-init.txt

=== rcj` is now known as rcj
=== praneshp_ is now known as praneshp
=== harlowja is now known as harlowja_away
harmwharlowja_away: I'm looking over netutils.py again, and isn't Nova just by design skipping the network_template stuff when it's dealing with a dhcp'ed network?11:41
smoserharmw, that may well be how it works.13:08
smoseri have never succeeded in getting a template available in config drive :)13:08
smoserits definitely something that needs work.13:08
harmwyea, well13:08
smoseri really hope to fix openstack and cloud-init to do sane things13:08
harmwI hope to get a better look at things tonight13:08
harmwand that'll could very well result in a bugreport13:10
harmwnot that it is a true bug, but given how it currently looks it should just do what I want - not what someone decided it 'should probably do in this or that situation'13:11
glevHello, I have a question about fs_setup.  Does it need to be entered under the cloud configmodules section in cloud.cfg to be used in my user-data cloud-config file?14:07
glevIt appears cc.disk_setup is the appropriate module, but it doesnt seem to work.  Where is this all documented?  The documentation I find shows configuration examples, but they don't work for my CentOS instance.  The log seems to not provide much useful information.15:03
glevAm I in the correct place for cloud-init project related information?15:14
=== zz_gondoi is now known as gondoi
=== gondoi is now known as zz_gondoi
=== zz_gondoi is now known as gondoi
=== gondoi is now known as zz_gondoi
=== zz_gondoi is now known as gondoi
harmwharlowja: ping18:38
harlowjaharmw pong18:38
harmwwow18:38
harlowjaping pong18:38
harmwI which everything was so low-latency18:38
gholmsHeh18:39
harlowjawell u can't play ping pong at high latency18:39
harlowjait doesn't work out so well18:39
harmwtrue, true18:39
harmwlisten, I'm checking out netinfo.py in nova18:39
harlowjakk18:39
harmwreturn template.render({'interfaces': nets, 'use_ipv6': ipv6_is_available})18:39
harmwthat should print the template with everything substituted18:40
harlowjaright18:40
harmwbut it doesn't18:40
harmwit just prints the original template18:40
harlowjais there anyway u can add in a print before/after the render?18:40
harlowjaand the variables to18:40
harlowjamaybe this is a juno bug :-/18:41
harmw(im on icehouse)18:41
harlowjaoh18:41
harlowjacan u add those prints anyway18:41
harmwofc18:41
harmwin build_template i've added print of very function (template.render())18:42
harmwwhich just prints out the original template18:42
harmwwith the nasty literal $ signs18:42
harmwthe net_info that is set on L136 contains proper values18:43
harmweg. this works: LOG.debug("NET_INFO: eth%s %s %s %s %s", ifc_num, address, netmask, gateway, dns)18:43
harmwand this prins the original template: LOG.debug("OK, got template with contents: %s" % template.render({'interfaces': nets, 'use_ipv6': ipv6_is_available}))18:43
harmwthis jinja2 stuff is way to complex for me :P18:44
harmw(btw, I hacked away 2 continue statements to make it this far)18:45
harmwnets[0]: {'broadcast': '192.168.168.255', 'netmask': '255.255.255.0', 'gateway_v6': '', 'name': 'eth0', 'dns': u'212.54.35.25', 'address': u'192.168.168.66', 'gateway': u'192.168.168.1', 'netmask_v6': None, 'address_v6': None} 19:02
harmwso thats good19:02
smoserJayF, in thinking about netowrking and cloud-init19:40
smoserand that netowkring config.19:40
smoseri think i'd like some bit of info that says "block boot on this adapter"19:40
smoseror something like that19:40
JayFthat info comes from neutron atm19:41
JayFidk if there's a way to link that in, but I'd make a comment on the blueprint if you have desires19:41
smoseri'm saying the new format.19:41
smoseri realize the information comes from nuetron19:41
smoserthe reason being, if cloud-init gets this info on a config drive.19:42
smoserits going to configure networking. 19:42
smoserbut then it should not let user code run until sane bits of netwoork are up.19:42
smoserhm..19:42
JayFwho is to decide what is a sane amount of network?19:42
JayFI'm always careful about that19:43
smoserright.19:43
JayFbceause in our cloud, at least, you can spin up boxes in 100% private networks19:43
smoserits non-trivial19:43
JayFso we can't depend on things for the general case that require internet to exist19:43
smoserso heres the thing i was thinking about.19:43
smosersystem boots. reads some network from config drive.19:43
smoseruser hotplugs network device19:43
smosercloud-init reads config from MD server for that device and configures it.19:44
smosershould cloud-init block the next boot on presense of that device ?19:44
JayFI don't know about that specific scenario19:45
JayFbut I'd say cloud-init should do as much as it can regardless of some failures19:45
JayF(and then give me a way as a developer to instead have it throw a hissy fit, aka exception, if something breaks)19:45
smosertheres a difference between failure19:45
smoserand "hasnt hotplugged yet"19:45
JayFAh19:45
smoserand no real way to know the difference19:46
JayFYeah, IDK about those cases19:46
JayFbecause I don't hotplug things :)19:46
JayFatm at least19:46
smoserright. 19:46
smoserso vm, neutron hotplug the thing.19:46
smoseron reboot, i dont know if i should expect that nic or not.19:46
smoserand dont know if i've missed an event that would have pulled it from my config.19:47
smoserie, missed the hotplug remove during the reboot.19:47
JayFthis is why in the model I proposed for event-driven changes19:47
JayFthat you just pass the event and the updated data and say "make it right"19:47
JayFyou can't manage this as a certain number of steps to perform in order every time imo19:47
JayFyou have to just take the data you're given and do a thing with it, and if, for instance, that data references a network drive that the hypervisor didn't hook up, or that the OS image didn't wait to be ready before cloud-init runs19:48
JayFthen that can't be a cloud-init problem, it's an environmental problem19:48
smoserhm.19:48
smoserthats a good point. 19:49
smoserbut then makes the data on config-drive possibly stale.19:49
JayFyes19:50
smoserand at that point in boot, before a network is available to the MD thats all i have.19:50
JayFI mean, should we support a mix of sources generally? Do we?19:50
JayFooooooooh.19:50
smoserso if data on config drive had 'required' or not.19:50
smoserthen i could block until all required.19:50
smoserand just "never unplug stuff that is required" rule.19:50
smoserand then once required are up i can hit MD and get updated info19:51
JayFYeah I'm not sure I have a good informed opinion on this, and I have other stuff I need to finish this week, but I'm going to let that bake for a while and think about it19:51
smoser:)19:51
smoserthis was bout all the time i could spend on this now too19:52
smoseri'll comment in gerrit19:52
harlowjaharmw so it seems like the template is getting populated then right?20:07
harmwit's beeing read just fine, but nothing gets replaced inside... so the original template is copied with any specifics in to the configdrive20:08
harlowjaya, thats totally weird20:09
harmwwhat else is new :P20:09
harlowjais it possible to open a nova bug for this, it seems like someting is wrong ;)20:09
harlowjaalthough i'm not sure why y! hasn't seen it since we run that code 20:09
harlowjaand are running icehouse20:09
harlowjaso that part doesn't quite make sense, ha20:10
harmwhaha20:10
harmwtemplate.render(nets[0])20:11
harmwthat still produces the original template :|20:11
harmwI don't get it20:11
harlowjathat should run via https://github.com/openstack/nova/blob/stable/icehouse/nova/virt/netutils.py#L150 right?20:11
* JayF suspects requirements differences20:12
harmwyup20:12
harmwJayF: I'm growing a feeling in that direction as well20:12
harlowjabut jinja2 not processing variables would be like a bad bug, ha20:12
harlowjaor not processing in the same manner, lol20:12
harmwindeed, so I'm doubting my own setup as well :p20:12
harlowjacan u dump 'nets' and such, then try to load the template in a smaller script that uses your own code, try to replace nets in that code instead?20:13
harlowjajust to cause the same failure20:13
harmwalready trying something like that20:14
harlowjahmmm, and your template is https://github.com/openstack/nova/blob/stable/icehouse/nova/virt/interfaces.template right?20:14
harmwoh my20:14
harmwno20:14
harmwnowhere near20:14
harlowjahmmm20:14
harlowjathat might be it20:14
harmwuhu20:15
harlowjait seems https://github.com/openstack/nova/commit/fa0d61084e50 changed cheetah -> jinja220:15
harmwI'm reading the vars in the template should be {{ bla }} as well20:15
harlowjadid RDO forget to pickup that file :-/20:15
harmwwhich is merely a $bla in my template20:15
harlowjaya, thats cheetah syntax :(20:15
harmwah!20:15
harlowjaso ya, that would be an issue ;)20:15
harlowjau used RDO?20:16
harmwofcourse20:16
harmwcentos6 + rdo icehouse20:16
harlowjaah, ya, rdo packagign bug i think20:16
harlowjawonder if thats been reported20:16
harmw# rpm -qf /usr/share/nova/interfaces.template 20:16
harmwopenstack-nova-common-2014.1.2-1.el6.noarch20:16
harmwthough thats the old file20:17
harlowjaya, i bet they forgot to update it or something20:17
harlowja*they being RH20:17
harmwuhu20:17
harmwyou know where their bugzilla is at?20:17
harlowjanot sure, ha20:17
harmwh20:17
harmwbugzilla.rh20:17
harlowjasomething like that20:18
harlowjau can poke 'dprince_' in #openstack-dev20:18
harlowjahe might be able to get that to occur quicker20:18
harlowjaafaik he knows the people that know the people20:18
harmwah ok20:18
harlowja*and also works @ RH20:18
harmwhhe20:18
harmwopenstack-dev, guess I should join that channel as well then20:18
harlowjaya, openstack has tons of channels, lol20:19
harmwmy irssi is getting a bit crowded20:19
harlowja:)20:19
harmwdoes he share your TZ?20:20
harlowjaharmw i think EST us20:22
harlowjaso not mine (PST)20:22
harmwok, well added a bug20:30
harmwhhee, well that apparently did the trick - I changed the template to be jinja220:35
harmwso I now have a configdrive with proper network file, woohoo20:36
harmwhm, well, this *almost* works 20:47
harmwnova just told my vm something about eth0... and freebsd only knows of vtnet020:48
harmwso thats something to look into in freebsd.py20:48
harmwbut other than that, configdrive works and even configured the network (eventhough it was the wrong interface)20:49
harmwand now it's bedtime :)20:49
harlowjaharmw coolness21:02
=== gondoi is now known as zz_gondoi
=== zz_gondoi is now known as gondoi
=== gondoi is now known as zz_gondoi

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