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

=== cpaelzer_ is now known as cpaelzer
=== sterfield_ is now known as sterfield
smoserbah.14:27
smoserrharper, http://people.canonical.com/~rharper/curtin/topics/networking.html14:27
smosercan routes be per-interface ?14:27
rharperyes14:27
rharperthey are in cloud-init;  I've a branch to bring curtin in-line14:28
rharperit was needed to support the routes from network_data.json14:29
rharpersmoser: http://paste.ubuntu.com/17644428/  (that's an network_config with routes per subnet)14:36
smoserrharper, i think they bot lost in cloud-init14:37
smoser:-(14:37
rharperhrm14:49
rharperI don't think so14:49
rharpersmoser: cloudinit/net/eni.py:Renderer:_render_route14:50
rharperit's possible the logic got broken in the refactor ; I don't think we have a unittest specifically for the routes under a subnet14:51
smoserrharper, yeah, i think it got busted.14:58
* rharper shakes fist at harlowja 14:58
smosernote the coede does14:58
smoser for route in subnet.get('routes', []):14:58
smoserbut then later14:59
smoser for route in network_state.iter_routes():14:59
rharpersmoser: shall I fix it? or do we make harlowja do that ?14:59
smoserwell, i'm close to having it and some other cleanups14:59
smoserin bzr+ssh://bazaar.launchpad.net/~smoser/cloud-init/trunk.net-improve-lo-dns/15:00
rharperok15:00
smoseri'm not sure exactly how to get the per-iface routes though15:00
rharperin the new fancy net refactor world... I need to look at that15:01
rharpersmoser: hrm, yeah I don't think that iter is actually what we'd need15:02
rharperthe routes in subnets were part of the subnet under the iface property15:02
rharperso you really want to iface_iter15:02
rharperand then get subnets under the iface15:02
rharperiter_interfaces15:03
rharpersmoser: hrm, it looks ok from here... in _render_interfaces, we have the for iface in iter_interfaces, and then we have a for route in subnet.get('routes', []); that'll render per-interface routes; the outer iter_route is for the global routes (type: route)15:05
smoserbut i dont hitnk subnet.get('routes', []) ever returns anything but []15:06
smoserok. seems i was wrong.15:12
smoserrharper, ^15:12
smoserbut in your http://people.canonical.com/~rharper/curtin/topics/networking.html15:12
smoserit says gateway is CIDR netmask notation15:13
smoserwhichi 'dbut it seems it needs a netmask.15:13
rharperthat's a copy/paste error, thanks15:13
rharperthe gateway itself doesn't take cidr, but it can be address with cidr, or address + netmask key15:14
rharperand I've not updated the curtin docs on routes per interface yet since we haven't merged in that code yet;  I have a branch but decided to wait until we moved cloud-init networking to the refactor;  after this branch of ours, I can rebase curtin net on this stuff.15:15
smoserrharper, https://code.launchpad.net/~smoser/cloud-init/trunk.net-improve-lo-dns/+merge/29803515:30
rharpersmoser: reading15:32
smoserrharper, this is where we need an equality test for *something* . whether that be network config or network state or ENI.15:34
smoserits hard to test that what was rendered is right.15:34
rharperthere are two steps15:35
rharper1) cmp(expected_output, input -> output )15:35
rharper2) validate expected_output achieves what it says (run eni in a guest)15:36
blackjidHi! i'm having some problems with execution order on a multipart config. Please here are the details... http://serverfault.com/questions/785344/how-to-execute-some-commands-before-the-user-scripts-in-cloud-init15:36
blackjidthanks15:37
rharperwe don;'t have a "vmtest" in cloud-init yet;  the cloud-init-tests repo is the closest we have, which would look at the input (and render it to state or yaml) we inspect an instance after cloud-init runs and extract network config and compare that to the input15:37
smoserblackjid, look in /var/lib/cloud/instance/scripts/15:43
smoseryou'll see one file named 'runcmd'15:43
smoserand the other files that are in your multipart are named by their filename15:43
smoserthe scripts in that directory are run in C locale sorted order (as if by runparts)15:44
smoserso if you change the name of the script you've added from15:44
smoser filename="00-rancher_server_install"15:44
smoserto15:44
smoser filename="zz-rancher_server_install"15:44
smoserthen yo'ull be good.15:44
smoserrharper, yes. thats surely one way. but if i have a parser of ENI, then i should be able to render an ENI and then parse it back into network config.15:45
smoserand then compare that network config to the one i started with.15:46
blackjidthanks smoser!, I'll try! that.. I thought they were run in sorted order, that's why I added the 00-  but I don't quiet understand why is the other way around...15:47
rharpersmoser: that's step 1, but without someone putting fixed input into the expected output; I worry that if we're generating both sides, something can get missed15:47
smoserblackjid, http://paste.ubuntu.com/17647782/15:49
smoserblackjid, if i had it to do again, i might make runcmd be in a file called '50-runcmd' to be more fitting. but its not easily changed at this point15:50
blackjidthanks again smoser!, it worked perfectly!...15:53
smoserand generally speaking the ability to compare two network configs for equality without booting a system is fairly desireable.16:06
rharpersmoser: sure; but declaring them equal without checking if they do anything isn't super valuable, we need both.  and I argue that we we'll want both the round-trip eni -> config -> eni ; as well as hand-crafted eni vs. generated eni as a check on parser bugs16:12
=== dmsimard is now known as dmsimard|afk
harlowjarharper smoser what did i break, lol17:15
harlowjathat code needs more tests :-P17:15
smoserharlowja, it does indeed17:19
smoserand i dont think you actually broke anything though17:19
harlowjaah, woot17:26
harlowjai never break anything17:26
harlowjaobviously17:26
harlowjalol17:26
smoserharlowja, https://code.launchpad.net/~smoser/cloud-init/trunk.net-improve-lo-dns/+merge/298035 if you want to read that, htat'd be nice.17:49
harlowjakk17:49
harlowjagot a internal review, then that one17:49
harlowjathen some openstack ones17:49
harlowjaguess today is review day17:49
harlowjalol17:49
=== dmsimard|afk is now known as dmsimard

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