/srv/irclogs.ubuntu.com/2017/03/31/#cloud-init.txt

=== shardy is now known as shardy_lunch
=== shardy_lunch is now known as shardy
jgrimmsmoser, i'm gonna work on https://bugs.launchpad.net/cloud-init/+bug/1583841 if you don't mind13:24
smoserthat is odd that we explicitly install ruby1.813:25
smoseroh... because we just dont know i guess? as the gems installer is not from the archive/13:25
smosermaybe. but thanks!13:25
jgrimmi'm assuming at one point there were multiple rubys and it needed specific one13:25
jgrimmalso noticed that our chef example config is broken, i have that working locally.. i'll submit bug & MR13:26
jgrimmthe upstream apt repo changed13:26
smoserjgrimm, fyi, cloud-init got let in this morning to zesty.13:29
jgrimmi saw!13:29
jgrimm\o/13:30
jgrimmpowersj, if i want to run the tox citest against code changes i've made in my local cloud-init repo.  i'm guessing i need to create a dep and supply it, otherwise it will test against archive cloud-init?14:26
jgrimms/dep/deb14:26
rharperjgrimm: yes;14:29
rharperI think we should add that workflow example to the tests.rst doc14:29
jgrimmthanks, right..  i found it in practice, but the docs could be clearer14:30
rharperI'm pretty sure you can: ./package/bddeb  ; and then feed the resulting deb to the test ... now;  magicalChicken did work on adding a 'build deb' stage14:30
jgrimmsweet14:30
rharperas not everyone has deps installed for binary build14:30
jgrimmright14:30
rharperI've just not tested it, so don't know the flags/steps etc14:30
rharperif you figure them out, a MR for doc updates would be great14:30
jgrimm:) i was mostly looking for confirmation of what i was seeing14:31
jgrimmand yes, on docs updates14:31
rharper=)14:31
powersjor we could just accept wes' merge that does it for you :)14:39
jgrimmheh, indeed i want that to happen soon14:39
=== nacc_ is now known as nacc
smoserrharper, https://code.launchpad.net/~smoser/cloud-init/+git/cloud-init/+merge/32157815:06
rharperlooking15:07
rharperneat15:08
rharperreviewed, somewhat concerned by always filtering 'stolen' mac  entries;  I'd like to scope the filtering to just the rename case where we know that we don't want those interface mappings15:13
smoserrharper, read my comment there please. and see what you think16:04
smoserbah. adding the RuntimeError makes unit tests fail on my system16:11
smoserRuntimeError: duplicate mac found! both 'virbr0-nic' and 'virbr0' have mac '52:54:00:4c:a1:4a'16:12
rharpersmoser: looking16:14
rharpersmoser: if all callers are expecting 'physical' nics then maybe the method ought it be called get_physical_interfaces_by_mac();  it certainly appears that all users of the method were interested in 'physical' only;16:16
rharpersmoser: shouldn't we mocking the response there?16:16
rharperw.r.t your RunTimeError16:16
rharperthat looks like host data16:16
smoserwell, yeah, it *is* host data.16:18
smoserwhich yeah should be mocked, but is a good find. thats a bridge, which i think most of the time will have the address of a nic also.16:19
rharpery16:19
rharperhehe16:19
smoseri dont like the word 'physical'16:19
smoserbecause explicitly im' including veth16:19
smoser"base nics" ? i dont know.16:19
rharperI don't know either16:20
rharperin the docs I wrote16:20
smoserbut yeah. all callers were expecting "ethernet interfaces"16:20
rharperI mentioned this was a mix of criteria16:20
rharpers/ethernet/network interfaces;  and I suspect 'present without configuration/composition'16:21
smoser:)16:21
smoserget_interfaces_present_without_configuration_by_mac()16:21
rharperheh16:21
smoserrolls right off the tounge16:21
rharperclearly16:21
rharperget_renameable_interfaces16:21
smoserso i think i'm going to just exclude bridges for now16:22
rharperI think the property is certainly key16:22
rharperwe were before as well (excluding bridges) and (name=veth*)16:22
smoserwell, except i'm explicitly including in that list stuff that has a '0' in addr_assign_type16:22
smoserwell the get_interfaces_by_mac() didn't previously exlude bridges16:23
rharperwhich is fine, no?  those devices were *created* in the kernel vs. added/renamed/modified during boot16:23
smoseri dont follow.16:27
smoserso i just changed get_interfaces_by_mac() to exclude bridges16:27
smoserwhich i think is right. because bridges are not "present_without_configuration"16:28
rharperI don't have a bridge around , what addr type was it?16:30
rharperthere's one; 1 for me16:30
rharperso would have been allowed,; yeah I'm in agreement;  I was confused; in the fallback networing code, there is some filtering done there when selecting nics; in that case bridges, lo, and nics with 'veth*' in the name were dropped16:31
rharperit might be worthwhile to consolidate this 'get_interfaces_by_mac_without_config_excluding_lo' into something common16:32
naccis 'lo' the literal value used? maybe get_interfaces_by_mac(with_config: bool, excludes:list) ?16:33
smosernacc, yes.16:35
smoser invalid_interfaces = set(['lo'])16:35
naccmakes for at least a shorter function name :)16:35
nacci would possibly make flags: enum or something, if there are multiple types of withouts16:35
rharpernacc: yeah, so ls -1 /sys/class/net/*  are all of the 'net' devices;  some of those don't support renaming, and also aren't useful for a default "first nic which we can likely expect DHCP to work on"16:36
naccrharper: yep, makes sense16:36
rharpersmoser: fyi, just tested the zesty cloud-init in a uc16 image; it cleans up the default netplan config perfectly and rendered a new one as expected;  nice!16:41
smoser\o/16:43
rharpertesting in OpenStack next, and then I'll upload an image for plars to check out on maas16:43
smoserrharper, nothing is ever easy17:06
rharper=)17:06
jgrimmpowersj,  i haven't looked into it, but it would be nice to be able to override 'enabled: False' without editing a testcase.yaml..17:10
smoserrharper, and for the resolvconf/ifupdown i need to file a debian bug17:11
powersjjgrimm: like when you try running it by hand with -t <testcase> and have it still run?17:11
jgrimmyep!17:11
powersjah! ok :)17:11
powersjI'll jot that one down17:11
jgrimmpowersj, as there are testcases disabed due to 'taking too long' for part of normal ci17:11
jgrimmbut i want to easily run it17:12
powersjjgrimm: none should be disabled for taking too long, only if 1) we know they don't work 2) they are not done 3) it is covered by another test case17:12
jgrimmpowersj, see tests/cloud_tests/configs/example/TODO.md17:14
jgrimmpowersj, but indeed, i did not find the chef one to actually take longer than anything else really to run17:14
naccjgrimm: ok, just verified the fix for the cloud-images does work17:15
naccOdd_Bloke: --^ fyi17:15
jgrimmcool17:15
jgrimmnacc, i'm assuming iscsi. :)17:15
powersjjgrimm: ah yeah that list is things that have not even been written yet17:16
naccjgrimm: ack17:17
jgrimmpowersj, heh.. well someone wrote ' (takes > 60 seconds to run)' so I assumed they'd actually run it17:17
jgrimmpowersj,  indeed comments can lie. :)17:18
powersjah ok :)17:21
jgrimmpowersj, i'm using that install_run_chef_recipes.yaml to test https://bugs.launchpad.net/cloud-init/+bug/1678145 ...  I'm ambivalent whether I enable it for citest? thoughts?17:22
powersjIf you get it running, go for it17:23
jgrimmright now i've only cobbled in a single test just to see that chef installed.. as good enough, with FIXME to add more comprehensively17:23
powersjif you don't let me know and I can finish it up. I'd prefer the test while you are working on it :)17:23
jgrimmmy hestitations were 1) that someone explicitly said it should be disabled (per comment I showed you) 2) it depends on an upstream  repo  .. I'm not thrilled with external network dependencies in CI  3) only LTSes supported by external apt repo17:24
jgrimmso #3 probably needs to wait for wes's featureflag to do skips??17:25
magicalChickenjgrimm: that would be pretty easy to do using feature flags, just add a 'ubuntu_lts' flag and require it there17:27
jgrimmyep! indeed quite handy17:27
powersjhmm I agree that the 3rd party repo is undesirable :\17:28
jgrimmheh, but that's what the feature is there for.. easy of installing the upstream17:29
jgrimmbut shouldn't a hard error if the resource is unavailable would be desired behavior17:30
powersjI know having unreliable and false negatives is annoying, so do we have any idea how available  it is? If it is failing for you even during development then I think that is an easy no.17:32
jgrimmpowersj, i have no idea at all whether its _really_ unreliable.. just my overall concern with external resources17:32
jgrimmheh, except that its a hard failure today because they changed the repo17:33
jgrimmand we'd not noticed as we don't have any test. :)17:33
powersjright so a test would have caught this :)17:33
powersjhaha17:33
jgrimmexactly!17:33
magicalChickenpowersj, jgrimm: i could add in support for overriding base feature flags from cmdline. that way the feature could be unavailable everywhere by default, and we could just enable it when we know the resource is available17:33
* powersj wants to just add it and if smoser sees too many failures we can pull it17:34
jgrimmi think that may be handy generally17:34
jgrimmpowersj, yep, i'm fine with enabling it. skip again if its not worth it17:34
jgrimmbut.. i'm going to wait for feature flags17:34
smoserwhich is this ?17:35
smosertalking about a test for chef ?17:35
jgrimmyep, specifically install_run_chef_recipes.yaml17:35
jgrimmwhich is our chef config example17:36
jgrimmno test for it today, which is why this was never noticed:   https://bugs.launchpad.net/cloud-init/+bug/167814517:36
rharpersmoser: plars tested the ds-identify change for maas cfg parsing, that's working as well17:43
Odd_Blokenacc: \o/17:44
smoserjgrimm, yeah.. so we can enable / add one. but as we've seen external dependencies suck17:45
smoserie, curtin dependencies on launchpad or archive have a very non-zero failure rate.17:45
smoseradding a 3rd party dependency has potential for the same.17:46
jgrimmsmoser, yep.  totally aware, that's why i flagged it as an issue17:50
naccOdd_Bloke: thanks for your help!17:50
jgrimmsmoser, for now, i was just looking to add a test that we can use on demand, i'm more wary of having it always enabled.17:53
smoserright.17:53
jgrimmsmoser, with zesty cloud-init uploaded, i'm assuming you are working on the corresponding xenial SRU?18:07
smoseri'm still working on this bond thing :)18:08
smoserbut yeah, that'd be the plan18:08
jgrimmok, yeah, we are gated on next steps with that SRU18:09
powersjjgrimm: seems you got a harder review than I did ;)20:02
jgrimmpowersj, lol.  its the nature of reviews.  you can see something new every time you look in20:03
smoserrharper, still there?20:11
smoserhttps://bugs.launchpad.net/cloud-init/+bug/1677846 . i think i just need to ggive up20:11
rharperhere20:13
rharpersmoser: I thought we already pointed back at the OpenStack change there20:14
rharperjust a dup, right?20:14
smoseryeah. its just that i think i'm going to give up. at lest for 'dvs'20:15
smoserand re-push upstream proposal20:15
rharperwhy?20:15
smoserthe real rason for ping20:15
smoserhttp://paste.ubuntu.com/24290015/20:16
smoser^ that is the diff i have  locally20:16
smoserhave to remove use of 'assert_called()'20:16
smoserbut wanted you to review that.20:16
rharperlooking20:16
smosertaht is diff agastin what is in https://code.launchpad.net/~smoser/cloud-init/+git/cloud-init/+merge/32157820:17
smoserdoes that provide rasonable test ?20:17
smoserthe thing is kind of hard to test. wihtout mock-o-rama20:17
* rharper wishes for assert_called(); I use len(mock_obj.call_arg_list) != 0 IIRC 20:17
rharperso, in the case that we see a duplicate, why is devs reset to empty list ?20:19
rharperOSError is for something besides the RuntimeError for duplicates I suspect20:21
rharperstill not sure why the list would be reset in that case; documenting why we reset the list here would help (it's not obvious to me)20:21
rharperthat said, the unittests look good20:23
smoserwhere do you see the list is reset ?20:27
smoserrharper, ^ ?20:29
rharperline 25- > 2720:30
rharperon the OSError exception if errno.ENOENT20:30
rharperdevs = []20:30
smoserthat has always been there.20:33
rharpercode motion then20:33
rharperok20:33
smoserif get_device_list() raises an exception20:33
smoserthen it sets the list to []20:33
rharperstill seems odd to wipe the list, rather than return what it already had20:33
smoserie, if you didn't have /sys/class/net20:33
smoserthen you get "no devices"20:33
smoserthere is no "already had"20:34
rharperI see, if devs was none20:34
rharperit just looks strange to set it to list, and then continue with a for name in devs which wont do anything, just return []20:34
rharperoh, I see, we're returning a dict; well could return an empty dict20:35
rharperit's fine20:35
rharperit's harder to see with just the patch context;20:35
smoseryeah.20:35
smoserand you're right. return {}20:35
smoserwould be the same20:35
smoseri dropped the 'devs=' param20:36
smoseras it was wierd.20:36
smoser    Also drop the 'devs' argument to get_interfaces_by_mac.  It was20:36
smoser    non-obvious what the result should be if a device in the input20:36
smoser    list was filtered out. ie should the following have an entry for20:36
smoser    bond0 or not.  get_interfaces_by_mac(devs=['bond0'])20:36
rharperyeah, not sure who we pre-loading it with a set of params20:36
smosernothing used it like that.20:37
rharpers/we/would20:37
rharperyeah20:37
rharpermaybe for easier unittesting =)20:37
smoserright20:37
smoserthats why i added it i'm sure20:37
rharper=_20:37
rharpererr, =)20:37
jgrimmsmoser, thoughts on URL shortener that won't disappear (or desire to use/avoid in the project??) -> https://bugs.launchpad.net/cloud-init/+bug/1669727/comments/122:14
jgrimmsmoser, fwiw... i'm trying to catch up to my long ago promise to sweep through the old bugs and do some housekeeping. long overdue, sorry22:45

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