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

=== rangerpb is now known as rangerpbzzzz
harlowja:(00:29
harlowja"WTH SMOSER!"00:29
harlowjalol00:29
harlowja;)00:29
smosermgagne, this is same place that you had run and copied that config drive out ?02:01
smosermgagne, i'd really appreciate some help working this out tomorrow. i think you're the only thing i have left on https://code.launchpad.net/~smoser/cloud-init/trunk.fix-networking/+merge/296272 to get right. it seems working well other places.03:14
smoserthe latest commit there (available in the ppa - 1251) will name the devices whatever they happened to be named.04:27
smoserbut i've also tested in a container and modifying the config drive data to match my MAC addresses that it works.04:28
mgagnesmoser: I found the issue16:10
mgagnethere was interface config left in /etc/network/interfaces which conflicted with cloud-init.cfg. The interface found in /etc/network/interfaces looks to be the one before rename16:11
mgagnebut it still doesn't ping16:12
mgagnegateway is not configured at all in 50-cloud-init.cfg16:12
smosermgagne, ok. great. so cloud-init will not write /etc/network/interfaces16:13
smoserif you have an image with that in it, then i consider the image broken...16:13
mgagneyea, I used to delete interfaces in there. I removed it in Xenial in hope it got fixed since but it didn't so I restored it16:14
mgagnesmoser: it is an image built from an iso16:14
mgagneand I install cloud-init in there16:14
smoserwell, you shoudl use our cluod images :)16:14
mgagneit worked before =)16:14
mgagneanyone building an image from iso has a broken installation and isn't compatible with cloud-init16:15
smoserbut basically ENI needs to be writen like http://paste.ubuntu.com/16951086/16:15
mgagneok, I ended up with something similar, all but lo interface16:15
smosermgagne, well you had static configuration in a image that waas to be used in a dynamic (multiple instances) thing.16:15
smoserthat clearly can't work16:15
mgagnesmoser: original image is built with dhcp16:15
smoserit used to work only because16:15
smosera.) 'eth0' was static16:16
smoserb.) we only supported massively simple networking16:16
smosernow with fancier networking supported, that can't work.16:16
mgagneok, will continue to clear interfaces like before16:16
smoseri'd really rather not have cloud-init open that file and rip out stanzas16:16
mgagnenow for the gateway =)16:16
smoseryeah. that is a issue.16:16
mgagnesmoser: right, fine with me regarding ENI clearing16:17
smoserwhats the network_json ?16:17
mgagneone with default route in routes =)16:17
mgagnelet me setup network so I can scp that thing16:17
smoser:)16:17
smoserif only something could set up networking for you :)16:17
mgagnegrep WARN returns nothing16:17
mgagnewhat I found weird though is that16:17
mgagneif network fails for whatever reasons16:18
mgagneEVERYTHING stops16:18
mgagneno cloud-config, hostname, etc.16:18
mgagnewe could argue that16:18
mgagnecloud-config might need network to work properly16:18
smoserwell, "everything stops"...16:18
mgagnebut that's a huge inconvenience when debugging network issue, have to reboot in single mode16:18
smoserwhat happens is if cloud-inti writes busted networking configuration (or busted networking configuration somehow comes into being)16:19
mgagnewell, my hostname is localhost and password doesn't work =)16:19
smoserthen boot will just never get to the point where networking is available16:19
smoserso things that depend upon it (such as cloud-config and cloud-final) can't run.16:19
mgagnehmm so boot will stall forever? (or close to eternity)16:19
smoseri'm not sure exactly... it systemd timeouts ont hte stuff.16:19
smoserbut since cluod-init-final and cloud-config "require" those things, they wont run16:20
smoserbecause those were never there.16:20
mgagneboot is too fast and I don't know systemd that much to debug what happened at boot time =)16:20
mgagneI sure did glanced at a "failed" at boot time16:20
mgagnesmoser: http://paste.openstack.org/show/Q3N1BWnP2ecC9yoYcHpk/16:23
mgagnewith actual IPs first 3 bytes changed16:24
mgagneI do not own 1.1.1.0/24 =)16:24
smoserk. thanks.16:24
mgagneis there any log outputted when default gw is configured?16:39
mgagnesmoser: will need to rebuild image from latest cloud-init I guess, looks like you made a change 12h ago16:44
smosermgagne, yeah. that was to not name tap-ASDFASDF16:45
smosermgagne, i'll get that fixed.16:45
mgagneright, will rebuild and see if it changes anything16:45
smosermgagne, can you just easily mount the image and dpkg -i it ?16:48
smoserfor quicker iteration16:48
mgagnewell, I guess that would be possible. Need to clean cloud-init state right?16:49
mgagnestill no routes but interface names are preserved now16:50
mgagnein fact, I will test with additional routes and see if those are configured16:50
mgagneok, additional routes are not configured16:56
mgagneso I feel like routes field isn't even parsed16:56
mgagneis there a way I can test the network config parser manually?17:05
mgagneI see a lot of print debugging and they aren't logged at boot time17:06
smosermgagne, give me a bit, i'm on a call. you can definitely test.17:07
smosermgagne, really appreciate your time, thank you17:07
mgagne=)17:07
mgagnethanks for help ;)17:07
=== JayF is now known as notJayF
=== notJayF is now known as JasonF
smosermgagne, so to summarize, gateway and static routes ?18:25
smoseris that what we're missing18:25
mgagneyes18:25
smoserk.18:25
smoseri'll take a look (long call)18:25
mgagneI switched to other tasks but I'm back now. is there a way I can test the network config/parsing? at first glance, I don't see any logic around routes parsing which looks for the "0.0.0.0" destination. "0.0.0.0" destination would be the default gateway. But I might have missed it.18:27
smosermgagne, i just took your paste and am trying to put together a test18:31
smoserthere is a test in tests/unittests/test_datasource/test_configdrive.py that does the convert18:31
mgagneok, I was more or less hoping for a way to run test after the fact against configdrive to see what cloud-init "thinks" about it18:32
mgagnebut I guess it's a feature that would be of limited use and for dev only18:33
smoserrharper, http://paste.ubuntu.com/16956870/18:36
smoserthat is me taking mgagne's paste and putting it into a test to run conversion to network config on .18:36
smoserand then we'll see18:36
rharpery18:36
smoserhttp://paste.ubuntu.com/16956919/18:37
smoserthats what it prints otu.18:37
mgagnedoes this format expect the field gateway to be defined?18:38
smoserrharper, http://paste.ubuntu.com/16957033/ <-- my current diff18:40
smoserproduces http://paste.ubuntu.com/16957018/18:40
smoserso yeah, we dont get the stuff rendered at the moment.18:40
rharperyeah, there's a gateway in the routes;  the render_routes() doesn't seem to be getting called on a per-subnet basis18:40
rharperit should18:40
rharperbasicall under the for subnet in subnets, there should be an if 'route' in subnet, etc... IIRC;  so somethings not right;18:41
rharpersomething like this: http://paste.ubuntu.com/16957110/18:41
smoserhttp://paste.ubuntu.com/16957213/18:44
rharperalmost, need to pass in an indent="    "18:45
rharpersmoser: lp:~raharper/cloud-init/trunk.fix-networking-subnet-routes18:47
smoserrharper, right.18:48
smoserhttp://paste.ubuntu.com/16957377/18:48
smoserdoes that look right ..18:48
rharperyes, the pre post18:49
smoserseems sane18:49
smoserhow do you suggest we test this...18:49
smosercomparing the rendered eni is a pita18:49
rharperI'm just about to run through cloud-init-test18:49
rharperVM booting and validating the values get set, ala vmtest18:50
rharperwe at least get feedback that route_n, ifconfig_a matches what's in eni that got rendered18:50
smoserwell, right. but we really need a way to unit test compare more easily18:50
smoseri'lll put a crappy test in18:50
rharperwe have a compare rendered eni test in place18:51
rharperit's just inside the vmtest, it includes parsing ifconfig_a output and the eni and such;  you can lift that, and we just need to presupply ifconfig_a and route_n output18:51
rharperthat's expected18:51
rharperwhich shouldn't be too difficult to construct; it could be templatized w.r.t specifics in the source network_data.json (like mac and ip and netmask and such)18:52
rharpersmoser: see curtin's tests/vmtests/test_network.py for the basics;  I have an updated version for cloud-init-test here: https://git.launchpad.net/~raharper/+git/cloud-init-test/tree/tests/vmtests/test_network.py18:53
smoserrharper, http://paste.ubuntu.com/16957806/18:58
rharpersmoser: y18:58
rharpersmoser: and ideally you extend and add a second non-gateway route to the routes array, and check that we do non 'default' key18:59
rharperand an ipv6 one, that'll fully exercise the render_routes() method19:00
smoserok. rharper what am i missign from you ?19:01
smoseryou had one fix for me.19:02
smoserright?19:02
rharperlemme get you branch19:02
rharperhttp://paste.ubuntu.com/16958041/19:03
rharperthat'll let the LinuxBridge network_data.json work19:04
rharperI sent you the configdrive data for that earlier today19:04
smoserandthere is a fix for mtu there ?19:05
smoserrharper, ^19:05
smoseryeah. ok . i see19:06
rharpersmoser: yes, it's a physical/link property, not subnet property19:06
rharperthat said, if we bring it in, then we likely need a bit more to convert it19:07
rharperI have some data with mtu: null,19:07
smosercommitted and pushed19:07
rharperso, it needs some care to drop the key, or if it's not null, apply int() on it19:07
smoser?19:07
rharper{19:08
rharper    "links": [19:08
rharper        {19:08
rharper            "ethernet_mac_address": "fa:16:3e:ed:9a:59",19:08
rharper            "mtu": null,19:08
rharperif that's not null, but a number, like 150019:08
rharperwe want to convert to int19:08
smoserhttp://paste.ubuntu.com/16958299/19:09
smoserit does get rendered there.19:09
smoserie, its safe to treat it as a string.19:09
rharperok, then maybe just handle the null case19:09
smoserseems to work.19:10
smoserhttp://paste.ubuntu.com/16958359/19:10
smoserthat showed it with None19:10
smoserand also tested with it as not present19:11
smoserand it just doesnt appear19:11
smoserso good work :)19:11
rharpersmoser: yeah, working here on cloud-init test and latest fix-networking branch19:13
smosermgagne, fwiw, why do you not use our images ?20:11
mgagnesmoser: it's not the flow we adopted a couple of years ago. The tool we use (Oz) doesn't deal with .qcow2 but iso20:11
mgagneand the main thing we change in the image is the cloud-init package + config20:12
smoserwhat do you change ?20:12
mgagnethere never was a time in our history where cloud-init works as-is in our cloud20:12
smoser(and the argument of "We use Oz" is like if i asked you 'why do you compile glibc' and you said "we use -O2")20:13
mgagne+ we need to backport cloud-init for older releases20:13
mgagnesmoser: we have a unified build system for all OS, including Windows20:13
mgagnethis is a compromised we made to make it easy for us to enroll now dev so they don't have to learn new tools for each OS20:13
smoseragain... yoou're arguing "we use compiler foo".  i'm saying "don't compile"20:14
mgagnewe aren't closed to the idea of switching workflow/tool, it just happened to not be our priority for now. priority being infra ops20:14
smoserwe give you somethign that is supposed to "just work"20:14
mgagnewell I don't think this discussion will be productive tbh20:14
smoser(i understand your argument and don't mean to sound like i'm fighting... we just work to make our downloadable images "just work".20:15
mgagnethey never worked20:15
smoserthe same way we work to make our compiled kernel or python or glibc "just work"20:15
mgagnecloud-init used to not support cdrom configdrive. we had to patch it (or backport)20:16
smoserdefinitely. there are bugs, and our sru process is slow.20:16
smoser(i really *really* appreciate your help)20:16
mgagnewe inject password in admin_pass field, cloud-init doesn't support that feature https://bugs.launchpad.net/cloud-init/+bug/123688320:16
smoserwe can work to make our images "just work" for you. which will make them "just work" for our customers who use RDO . which is a win for everyone.20:16
mgagnesmoser: tbh, this would thing is *very* frustrating20:16
smoseroh , well thats just silly.20:17
mgagneit just happened that we don't feel there is any progress despite opening bugs20:17
smoseruse ssh keys :)20:17
mgagne...20:17
mgagnewe very well know that ssh keys exist20:18
mgagnethat's not the UX we are selling our users20:18
mgagneand they expect20:18
mgagneI respond to our users expectations in a reasonable fashion. I sure won't install golang by default if they need it. it's their problem.20:19
mgagneI can come up with a list of "features" we provide and see where cloud-init lacks20:20
smoserlets work to make this better. i agree there is lots of room for improvement.20:20
mgagnesmoser: I'm glad we can work this out.20:20
mgagnesmoser: the most best ever feature that could come up from this is backporting of cloud-init to old releases.20:21
mgagnethis is really the thing that causes the most pain20:21
smoserto old ubuntu ?20:22
mgagneall those fixes you are doing to cloud-init (thanks again btw), trusty might never see the light of it due to SRU policies. So we end up needing to backport it ourselves and then rebuild the image ourselves.20:22
smoserat this point trusty has issues also because of systemd20:23
smosererr.. lack of.20:23
mgagneI can understand that it won't be backported to 12.10. I agree with don't care about EOL releases.20:23
smoserdoing the work to get this well functional again in upstart will require some work.20:23
mgagnebut trusty... it needs to work20:23
smoseryeah.20:23
smoserits ok for you to be blunt with me. i promise :)20:23
mgagnesmoser: it used to work, thanks for jayofdoom patch. but we want to get ride of that. and so far, we don't know how to make that happen without canonical contribution.20:24
mgagnea couple of walls have been punched lately tbh20:24
smoserah. the networkign_json for trusty ?20:24
mgagneyes20:24
smoserit will ble non-trivial :-(20:24
mgagneit used to work for 3rd party patch =)20:25
smoserthis merge just did is quite non-trivial20:25
mgagneso there is a way20:25
mgagneI wouldn't mind contributing code. what I'm lacking is experience with bzr (and knowledges of cloud-init inner working). Unfortunately, not a lot of people like it in our team20:27
rharperheh, now that it's merged, maybe smoser will push to +git on launchpad20:30
harlowjagit git gi20:47
harlowjagit20:47
harlowjagit20:47
harlowjalol20:47
waldiigit?20:55
harlowjaugit20:57
harlowjaweallgit20:57
rharperharlowja: nice20:57
harlowjamake git great again20:58
harlowjalol20:58
=== JasonF is now known as JayF
ajorgcloud-init is on github now, but I don't see any pull requests there. are contributions still to be directed at bzr / launchpad?22:15
ajorgwould patches to make cloud-init compatible with python 2.6 be welcomed?22:59
harlowjawhich cloud-init btw?22:59
harlowjajust want to make sure the source repo u are working on is the right one23:00
ajorg0.7.x23:00
harlowjaya, i fixed a bunch in a merge i have pending23:00
harlowjaprob similar to ones u fixed23:00
ajorgah, good23:00
ajorgos.uname in cloudinit/distros/__init__.py is one of them23:02
ajorgwas not a propery in 2.623:02
harlowjahmmmm23:02
harlowjaunsure if i fixed that one, doesn't sound familar23:02
harlowjado u have a set of patches with the ones u fixed23:03
harlowjai can make sure i incorporate (or already might have)23:03
ajorgI do, but I have a lot of patches and need to sort them out now that I'm able to contribute them.23:03
ajorgmany of them not for 2.623:03
harlowjaok, anyway u can figure out the 2.6 ones23:04
ajorgI have been maintaining cloud-init for the Amazon Linux AMI, so I have a lot of RPM / Yum distro patches.23:04
ajorgOn monday I'll try to post a branch with my 2.6 related patches for you.23:05
ajorgWe're on 2.7 now, but the patches are still useful for CentOS / Red Hat 623:05
ajorgharlowja: what's the best time of day for me to find you and smoser?23:06
harlowjaso scott moser is on US Central time zone23:06
harlowjai'm on US pacific23:06
harlowjaso working hours those time zones is usually when we around23:07
ajorgi'm also on pacific, so that should work well for me.23:07
harlowjacool23:07
ajorgSome of our patches will likely require some discussion.23:07
harlowjabut i bounce around alot, but sure let's discuss23:07
harlowjai'm all over the place in cloud-init and ... openstack and ...23:07
harlowjalol23:07
ajorgI'm actually headed home soon, so I'll have to catch you on Monday.23:07
harlowjak23:07
ajorgI'll try to be prepared.23:07
harlowjanp23:08
ajorgis it best to put each patch on a feature branch?23:08
ajorgor can some of them that are closely related land together?23:08
harlowjaclosely related land together i think is ok23:09
harlowja(with-in reason, ha)23:09
ajorgk23:09
ajorgand several of our patches provide backward compatibility for our 0.5.x features (before any Yum / RPM support was added to cloud-init)23:10
ajorgoops, there he went.23:10
ajorgwelcome back :-)23:10
harlowjaha23:10
harlowjaya, wireless -> wired23:10
ajorgwas just saying that several of our patches are for backward compatibility with our old 0.5 fork. are those likely to be accepted?23:11
harlowjaunsure23:11
harlowjaare u from amazon?? :-P23:11
ajorgyes.23:11
harlowjaah23:11
ajorgI'm the cloud-init maintainer here.23:11
harlowjalucky guess, i didn't know anyone else running 0.5 :-P23:11
ajorghaha23:11
ajorgwe haven't been for a long time23:11
harlowjaah, maybe guess was more about who has been running cloud-init for that long then23:12
ajorgbut we landed a bunch of yum / rpm features and our customers used them23:12
harlowjain fact it was mostly just lucky, lol23:12
harlowjahow's seattle :-P23:12
ajorggreat actually23:13
ajorglove it up here23:13
harlowjacool23:14
harlowjabut ya, can't hurt to propose them imho23:15
ajorgi've recently become able to contribute any of our current patches, of which we have a variety23:15
harlowjaya, no doubt23:15
ajorg29 patches at the moment, some of them features, some bugfixes, etc.23:16
harlowjai remember a cloud-init bug many years old that had a amazon person on it, trying to give a patch file and i think smoser couldn't touch it (legal reasons idk?)23:16
harlowjai wonder if that bug is still there somewhere, ha23:16
ajorgif it had something to do with region names that was probably me.23:16
ajorgthe regex was (is?) too strict.23:17
harlowjaunsure, lol23:17
ajorgi'll be more open this year, i promise.23:18
harlowjawoot23:18
ajorganyway, i need to find a bus. i'll catch up on monday, hopefully23:18
harlowjacool23:18

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