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

=== shardy is now known as shardy_lunch
amaraoHello everyone. I'm trying (continue to try) to make ConfigDrive working on Debian. It just can't use ConfigDrive, as far as I can see. There is ConfigDrive module, but it is ignored (?). Can someone help me? https://snag.gy/ZcfIvd.jpg13:22
amaraocloud-init 0.7.713:22
=== shardy_lunch is now known as shardy
=== rangerpbzzzz is now known as rangerpb
amaraoОh, I found what's wrong. 0.7.7 works really badly with ConfigDrive. After I installed 0.7.9 (from Sid, it start to work). Still, rather annoying.13:46
smoseramarao, i'm  not sure what would be broken, not enough info there to know14:10
smoseryou could potentially file a bug against debian asking them to patch their 0.7.7 version with a fix for you14:10
smoseri'mn not sure what is wrong, we've definitely used config drive successfully for quite some time14:11
smoserbut if 0.7.9 works, that seems simplist14:11
smoserrharper, so... bonds are probably never going to work in a container14:11
smoserat least not unprivilidged14:11
rharpersmoser: we should ask stgaber14:11
smoserwell, they do kernel stuff14:11
smoserin /sys/14:11
smoseroh...14:12
rharperbut... namespaces?14:12
smoserwait we talked about this once. he thought they *should* work, if they were implemented differently14:12
rharperhuh14:12
smoserthat ifupdown path uses /sys/ which is not namespaced14:12
rharperhrm, I can look at the networkd code14:12
rharpernot that I Want to14:12
smoser 14:12
smoserhttp://paste.ubuntu.com/24215499/14:12
smoserthats what happens when you try (after you've modprobed 'bonding' on the host)14:13
rharperbut in any case, the rename should avoid the mac duplication14:13
smoserrharper, i'm not arguing otherwise :)14:13
rharperok14:13
smoseri just wanted to be able to recreate in a container14:13
smoseri looked at examples/tests/bonding_network.yaml though (curtin) for an example14:13
rharperyeah; that looks broken;14:13
smosershouldnt the bond have address of one of the nics ?14:14
rharpershame they can't namespace mount /sys14:14
rharperit will14:14
rharperwhen you enslave a device to a bond14:14
rharperit will pick up one of the slaves' mac address as assign to to bondX14:14
smoserhttp://bazaar.launchpad.net/~curtin-dev/curtin/trunk/view/head:/examples/tests/bonding_network.yaml14:14
smoserbut why do we explicitly declare its mac then14:14
rharperthe bond itself does not require an ip or anything14:14
rharperthat's not required but it's OK14:15
smoserhm.. ok.14:15
rharperbut that's not the issue14:15
rharperthe mac is going to get duplicated when you list nics by mac14:15
rharperls /sys/class/net/*/mac_adress14:15
smoseri know. i understand the issue, i'm not arguing that it is not a bug.14:15
rharperok; I'm somewhat confused with the tangents14:16
smoserthey're not tangents. :). i was trying to recreate it.14:16
rharperin a container yes; it recreates just fine in a VM;  I certainly support fixing/filing bugs against the container14:18
smoseri was hoping to be able to look around and find a different way to ignore 'bond' devices than "they are virtual"14:18
smoseras i have other virtuals that id o not wish to ignore.14:19
smoserdo you have an example of how to recreate?14:19
rharpersmoser: lemme pastebin, it's basically launch an image with the attached network-config from the bug and create a VM with the right macaddress;14:25
rharperI think bond is a special w.r.t mac cloning; I don't think other netdevs assume the mac of an underlying secondary device14:26
smoser(the other virtuals are 'tap', lxc)14:28
rharpermacvtap, tun, dummy; ppp, etc...14:28
rharperthere are a lot of them14:28
rharperhttps://www.freedesktop.org/software/systemd/man/systemd.netdev.html14:28
smoserrharper, https://code.launchpad.net/~raharper/cloud-init/+git/cloud-init/+merge/32029114:48
smoserrharper, sure there are lots of virtual types. but when renaming, i'd rather just specifically ignore bonds than ignore all virtual types (which breaks renaming in lxc as it's nics are virtual).14:50
smoseranyway, i suggested some changes at that MP, if you want to chat about them we can do that. they're small, and then i think we should get this in14:51
rharpersmoser: replied for the v2;  most are fine; I think I do want to make sure the get_cfg_by_path is sane;14:55
rharperas I said, without that change, the unittest doesn't pass; I've not used pdb to walk through the get_cfg_by_path to see why it didn't fetch value from 'system_info' but that's what I needed for it to pass unittest14:56
smosersure. you can and should. but either yoru change or the '_get_arch_package_mirror_info' is wrong.14:58
smoserthen the unit test is being passed the wrong config is suspect14:58
rharpersmoser: so if we provide a network-config in a localds seed it's on the iso but we don't copy it off AFAICT;15:11
rharperwe should do that15:11
smoser"the iso"15:13
smosermeaning NoCloud ?15:13
rharperyeah15:13
rharpercloud-localds15:13
smoserits probably just stored in the object15:13
rharperI can put in a network-config file in there and pass via iso seed15:13
rharperyeah15:13
smoserthat gets pickled15:13
rharperbut we write out user-data and other .cfg files15:14
rharperjust something helpful to see15:14
smoserwell, we write out user-data.15:14
rharperso, I'm looking at the util.get_cfg_by_path and I don't see where it should know to pre-pend 'system_info' in  the distro object ... what am I missing?15:14
smoserthe Distro() object is passed cfg that is just the system_info() portion15:15
smosersystem_info: portion15:15
smoserso your unit test is probably just wrong in that it passes it the whole thing.15:15
smoseri suspect15:15
rharperwell, heh not my unittest; I just added some on top of how the others worked15:16
rharperbut I understand what you're saying now15:16
rharperthe unittest it supplying the distro object the whole cfg, not just the system_info portion15:17
rharperif that's how it works, I can fix up which cfg the unittest passes into the Distro class15:17
smoserbut do you agree that *one* of the two things is wrong.15:19
smoserrharper, cloudinit/stages.py in Init.distro is where the distro object is created.15:22
smoserand there it clearly gets the system_config15:22
smoserwell, maybe not clearly :)15:22
rharpersmoser: it works fine if I pass the write system_info key in;15:30
smoserpowersj, around ?16:15
smoseri have some good news and some baad news16:15
powersjyes16:15
powersj:\16:15
smoserwhich first ?16:15
powersj(has enough bad news with the test failures this weekend)16:15
powersj"baad" news, as you say, first please16:15
smoserbad news is that something needs improvements in order to avoid failures in cloud-init-integration-[xyz]16:16
smosergood news is that those are valid failures.16:16
smosersimilar to what we saw with curtin16:16
smoseryou added a test that tested a new feature that was not goign to work with old cloud-init16:17
smoserand then we ran tests with old cloud-init expecting that new feature to work16:17
powersjahhh! ok16:17
smoserand \o/ surprise!16:17
smoserit didnt work :)16:17
powersjok so I need to update the proposed tests to run from source of proposed16:17
smoseryeah, i guess we need to do somethinng like that.16:18
powersjand similar the daily to test the daily16:18
powersjok that I can fix :)16:18
powersjcurrently looking at curtin CI and why jenkins launchpad plugin is passing the wrong arguments16:18
smoserwhat sucks is that twice (curtin and cloud-init) now i've spent a couple hours thinking and debugging16:19
magicalChickenpowersj: the new version of tests can do '--ppa=cloud-init-dev/daily', which may be useful for the daily tests16:19
smoserwhy is this breaking! ... when the answer is that fixing it in trunk does not fix all versions everywhere :)16:19
powersjsmoser: right16:19
powersjmagicalChicken: that will work, I just need to make sure the unit tests that are ran are from that ppa as well. Otherwise we get this test mismatch between what code is ran versus what tests are ran.16:20
smosermagicalChicken, thats cool. but what we (re)found out is that we need to test the integration tests that were in the source of the package.16:20
smoseror we have to deal with the mix-matched expectations16:20
smoserand somehow version every test16:21
magicalChickenoh, right i missed the unit tests bit16:21
smoserthis is the integration test path16:21
smoserpowersj, added a unit test for a new feature that went in16:21
smoserand then we tested that new integration test with old cloud-init16:21
smoserand it failed16:21
smoser:)16:21
smoserwhich is expected.16:21
magicalChickenok, that makes sense :)16:21
magicalChickenat least the test works16:21
smoserie, we ran trunk integration test and old code16:21
smoserright16:21
smoserwe found this out with curtin a while ago too16:22
smoserDUH!16:22
smoserthe solution we came up with for curtin was that we installed the package and then downloaded the source with apt16:23
smoserso that they were guaranteed to match expectations16:23
magicalChickensimple but inefficient solution here is to clone the branch we want to test and use tree_run inside that branch, so both cloud-init and integration tests are the version in that branch16:23
magicalChickenhas the disadvantage that a deb is built each time16:24
smosermagicalChicken, well, we're interested in testing *exactly* what is in -proposed or in the archive provided.16:26
smosernot something we build, which *might* work out to be the same.16:26
magicalChickensmoser: fair enough, pulling the deb-src like with curtin should work then16:27
smoserin curtin it was easier, because we actually install curtin into a container and use it there.16:27
rharpersmoser: when you get a chance, I wanted to discuss how we handle v2 as input; this goes to why I had a .config property on the NetworkState class (it enabled passthrough of v2 in the netplan renderer); I updated a comment in the MR16:32
smoserok. http://c.brickies.net/hangout16:49
rharperk16:51
rangerpbsmoser, paulmey Odd_Bloke larsks Hey would you guys mind peeking at https://code.launchpad.net/~bbaude/cloud-init/+git/cloud-init/+merge/320411 ?17:56
powersjsmoser: I pushed a fix for the proposed tests to avoid mismatches. It is the same as what we do for curtin. As far as the other failures for integration-[x,y,z], those were introduced last Friday see LP: #1674317. I pushed a MP with fix and ran one test locally.18:24
powersjhttps://code.launchpad.net/~powersj/cloud-init/+git/cloud-init/+merge/32041418:24
rangerpbcan someone take pity on me and remind how to run the cloud-init test suite locally?18:30
powersjrangerpb: if you are trying to run what the CI tests run, then you need the 'tox' command18:31
rangerpbjust execute tox ?18:31
powersjyep it will then go and build the python envs needed to run the checks we have seutp18:31
rangerpbthanks man18:31
powersje.g. python2 and python3 unit tests + flake8 + xenial based tests18:32
powersjnp18:32
rangerpbpowersj, can the tests be run outside the context of tox or is that hopeless?18:35
rangerpbi have quite a few things to fix apparently18:36
powersjrangerpb: you can run outside of tox. Tox is nice because all you need is tox and it keeps you from needing to install other things. However, seeing your failures, I would start with just running nose. Familiar with that?18:37
rangerpbnope18:37
rharpersmoser: I've pushed an update to the v2 net branch; I believe I've fixed up all of the issues you raised18:38
rangerpbim familiar with running unittests straight up but i think these tests go beyond just that18:38
powersjrangerpb: essentially nose runs the unit tests and the command would be something like 'python -m nose tests/unittests assuming you have all the requirements18:38
rangerpbok18:39
powersjthere are quite a few things to install, so best to do in a VM, LXD, or virtualenv18:39
powersjrangerpb: also looking at your failures, TestAzureBounce is trying to read from /sys/firmware/acpi/tables/OEM0, but that is not always going to be on a system. So you would want to mock that or some how deal with it.18:43
rangerpbyeah, i did some refactoring there that is biting me in the ass18:44
rangerpbpowersj, is there a way with tox to be more specific about what to test ?18:50
powersjrangerpb: yes you can specify an env. by running 'tox -e <env>' like 'tox -e py27' to run only the python2 tests. Then if you want to go further and only specify a certain test, you can do that by passing more arguments like 'tox -e py27 -- tests/unittests/test_sshutil.py' to run only the tests in test_sshutil.py18:53
rangerpbthink i got it18:53
rangerpband done to class and method it looks like18:54
powersjyes!18:54
smoserrharper,19:09
smoser2017-03-20 19:08:56,496 - network_state.py[WARNING]: NetworkState Version2: missing macaddress19:09
smoserthat is expected path in lxc19:10
rharperright, if you don't have a macaddr and no other match criteria it leaves a warning19:10
smoserso i dont want the warning.19:10
smoseras its expected path.19:10
rharperwell19:10
rharperno19:10
rharperbut I understand;  LXD knows the mac19:10
rharperno reason to put it in the config it generates19:10
rharperI find with dropping the warning; but oracles should emit everything they know19:11
smoserwell, it certainly *could*, but it does not. so this would make a WARN statement in /vr/log/cloud-init.log in all containers19:11
Odd_Blokerangerpb: That doesn't set the hostname back, right?19:12
rangerpbOdd_Bloke, that == ?19:12
Odd_Blokerangerpb: Your MP.19:12
smoseri understand your position, but since its expected case... we can't generate warnings when its operating as expected.19:13
rangerpbOdd_Bloke, no it doesn't... are you talking about the context method I removed?19:13
rharpersmoser: ack19:14
Odd_Blokerangerpb: Yeah; I believe we set it back previously because cloud-init's hostname handling gets confused later on if we don't.19:14
rangerpbOdd_Bloke, in talking with paulmey, he said it isn't needed.19:14
rangerpbi suppose there is some weird use case?19:14
Odd_Blokerangerpb: If it isn't needed, why are we setting the hostname at all?19:14
rangerpbazure needs it19:15
Odd_BlokeThat should be left for cc_set_hostname to do later in the cloud-init run.19:15
rangerpbazure needs it when the nic is bounced19:15
Odd_Blokerangerpb: OK, so I'm confused about what paulmey said wasn't needed.19:15
Odd_Bloke:)19:15
rangerpbazure needs it when the nic is bounced so the dns can get set up correctly19:15
rangerpbOdd_Bloke, that make sense?19:15
Odd_Blokerangerpb: Right, so paulmey said that we didn't need to set the hostname _back_?19:17
smoserrharper, testing http://paste.ubuntu.com/24216898/19:17
Odd_BlokeIn Azure terms, he's (presumably ;) correct.  In cloud-init terms, however, ISTR that cc_set_hostname has some behaviour that is affected.19:17
Odd_BlokeGive me a minute to see if I can remind myself of what it was.19:17
rharpersmoser: ok19:18
smoser2017-03-20 19:17:57,467 - network_state.py[DEBUG]: NetworkState Version2: missing "macaddress" info in config entry: eth0: {'dhcp4': True, 'dhcp6': True}19:18
rharpersmoser: I think it's fine to pull it out entirely;  one could submit the same v2 config to a VM19:18
smoserhm..19:18
rharpersmoser: paste me your netconfig and I'll fix19:18
smoserok then.19:18
smoserlets just drop it to a debug19:19
smoserrharper, http://paste.ubuntu.com/24216919/19:19
rangerpbOdd_Bloke, He didn't ... but ill follow up with him for sure19:20
smosercreated with http://paste.ubuntu.com/24216920/19:20
smoseractually, created with http://paste.ubuntu.com/24216923/19:20
rharperI think we can relax the macaddr in the parse19:20
Odd_Blokerangerpb: OK, so when you said "in talking with paulmey, he said it isn't needed", what specifically were you referring to?19:20
rharperI did on the rendering side19:20
rangerpbOdd_Bloke, that context method19:21
Odd_BlokeOK, I see.19:22
smoserrharper, and those errors on your mp by the c-ii are valid19:22
smoseri didnt' seem them , but no 'indent' on py2719:22
rharperI don't know what the c-ii is19:22
Odd_Blokerangerpb: So the problem with setting the hostname and not setting it back is that cc_update_hostname (which is distinct from cc_set_hostname) has some logic that compares the previous hostname cloud-init detected to the desired one and behaves accordingly.19:22
rangerpband how is the desired one determined ?19:24
Odd_BlokeSo in the case that "update_hostname: B" is given, but Azure wants "A", I think the following can happen: (1) Azure DS will set hostname to "A", (2) cc_update_hostname will set hostname to "B", (3) user reboots, (4) Azure DS sets hostname to "A", (5) cc_update_hostname compares previous-hostname and cloud-config, and determines no hostname change is needed.19:24
Odd_BlokeLeaving the instance with hostname "A" instead of "B".19:24
Odd_BlokeI _think_ that's the failure case.19:25
rangerpbOdd_Bloke, so ... you would prefer the use of the context method yes?19:25
rangerpbi need to work thsi out because its right where the test cases are failing and I dont want to do this twice19:26
Odd_Blokerangerpb: Well, I'm pretty sure we need to set the hostname back somehow.  I'd done that with the context manager, but I'm not fussy.19:26
rangerpbyep ok19:27
rangerpbOdd_Bloke, ok, let me see if I can work that back around19:27
rangerpbthough I do feel a little bit like I am stuck between Mom and Dad here19:28
rangerpbwould nice to nuke the agent path in DataSourceAzure to simplify things19:28
smoserrharper, c-i bot19:29
smoser https://code.launchpad.net/~raharper/cloud-init/+git/cloud-init/+merge/31925919:29
smosererr.. https://code.launchpad.net/~raharper/cloud-init/+git/cloud-init/+merge/32029119:29
rharpersmoser: looks like I need a py2 or 3 wrapper for using indent from textwrap19:29
Odd_Blokerangerpb: :( Sorry.19:29
rharperI ran into it a while ago, need to look up the wrapper19:29
smoserrharper, http://paste.ubuntu.com/24216970/19:30
rharpersmoser: k19:31
rharperdo you want me to pull and push?19:31
rangerpbOdd_Bloke, what is the purpose of this conditional? -> https://git.launchpad.net/cloud-init/tree/cloudinit/sources/DataSourceAzure.py#n12319:32
rangerpbOdd_Bloke, and also why is line 124 in that important? shouldnt this always be run ?19:34
rharpersmoser: ok, dropped the warning, and picked up your diff; commited and pushed back up19:35
rharperbbiab (picking up kiddos)19:35
smoserrharper, i can do it here.19:36
smoserok19:36
Odd_Blokerangerpb: I believe that allows people to modify whether or not they want this behaviour.19:39
Odd_BlokeI don't really recall why, I'm afraid.19:40
smoseri think Odd_Bloke is probably right above.19:42
smoserwrt the case that the temporary hostname is protectign against.19:42
smoserhttps://code.launchpad.net/~raharper/cloud-init/+git/cloud-init/+merge/319259 rharper, wrt your comment there, you could have used the same merge proposal.  just push over the top of the one (--force) and launchpad will figure it out.19:43
rharpersmoser: it pushed fine (without force) I did push to the same MP19:55
rharperat least I think I did19:55
smoseryou pointed to another one20:00
smoser"I lacked the git-fu to force a proper rebase against itself, so I've pushed a new branch for review:"20:00
rharperoh, sorry20:09
rharperI don't think I repointed to the old one; but hopefully you'll  find the new commits in my rebase-netconfig-v2-passthrough branch20:10
rharpersmoser: I think I understand; you're saying I could have forced pushed my rebase branch onto the previous MR;  and yes --force would have done that;  I sort of have an irrational fear of --force and so I worked around it by starting afresh and then abandon the other;  I think it does mean split discussions (which may be one of your concerns)20:18
smoseri dont really are... i was just letting you know.  as even a rebase would have required --force20:19
smoserrharper, anyway. for right now  i merged your branch.20:20
smoseri'm running an integration test on  a few modules and then going to upload to ubuntu.20:20
rharperok20:20
rharperso on the rebase; I've found that if I pull from remote (and basically re do the rebase a second time) and then push; it goes in, but I find that I need to do the rebase effectively twice annoying;  I suppose I should just use --force there20:21
rharperor figure out why I can't fast-forward the remote (merge trunk in)20:22
=== StoneTable is now known as aisrael
=== lunarlamp is now known as mariusv
smoserpowersj, https://jenkins.ubuntu.com/server/job/cloud-init-integration-x/123/display/redirect20:30
smoserthat is curious.20:31
paulmeyOdd_Bloke, rangerpb, sorry I wasn't here earlier...20:31
smoserwhat is cloud-init-integration-x ?20:31
smoseris that daily ppa installed into x ?20:31
paulmeyI didn't know about the cc modules later on needing the original 'localhost' hostname20:32
paulmeyI was told that the context method was necessary for waagent, which didn't seem to be true20:34
paulmeybut I guess it's necessary to do the network bounce at that time in the cloud-init workflow20:35
rangerpbpaulmey, i think i have another patch set up ... just booting the image on azure as we speak20:36
rangerpbif it works, ill update you and highlight you20:36
paulmeygood, thanks20:36
powersjsmoser: that is run by checking out master, building, and running the integration tests. Those errors are fixed from my merge you pulled shortly ago.20:38
powersjlong story short, master was broken and our integration tests found it. Ideally our tox tests would have caught it, but flake8 is too lax. pylint would have caught it though.20:39
magicalChickenthe tests found a bug \o/20:42
magicalChickeni think that's the first one20:42
powersjwe got one last week too I believe :)20:42
magicalChickennice20:42
smoserpowersj, yeah... iwas confused for a bit. i was thinking it was just testing xenial or xenial-proposed20:46
smoserwhich should not have shown the error.20:46
powersjok, we do have a xenial-proposed test cloud-init-integration-proposed-x20:46
smoserrharper, you there ?20:53
rharperhere20:53
smoserhttps://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/166986020:53
smoserthe bond rename thing... you have the same nic there miultiple times in the config20:53
rharperoversite20:54
smoserhttp://paste.ubuntu.com/24217410/20:54
smoserok.20:54
rharperwait20:54
rangerpbhow do I get the ci tests to run again ?20:55
smosertox -e citest -- run -v -n zesty --deb=cloud-init_all.deb20:55
smoserthats the easiest thing.20:55
rharpersmoser: sorry, I'll upload a fix, the upper values should have been gone20:55
powersjrangerpb: are you trying to run integration tests or just the simple unit tests?20:55
smoserright ok.20:56
rangerpbintegration, the unit tests finish now and I updated my PR20:56
powersjrangerpb: awesome! then trying the command smoser printed to run the integration tests might be good too20:56
rangerpbthats just local though right ?20:56
powersjthe cloud-init_all.deb is produced if you build your working tree20:56
rharpersmoser: it appears that you could read the list of devices out if /sys/class/net/bonding_masters20:58
rharperwill need to create a second or third bond to see what that looks like with multiple, but that could provide a filter20:58
smoserrharper, i was justlooking and thinking maybe just ignore it if /sys/class/net/<devname>/bonding20:58
smoserif that existed20:59
rharperwell, the bond0.108 vlan also has the mac of the bond,20:59
rharperso that's a vlan, but it's mac is duplicate because of bond20:59
rharperit get's a bit stacked20:59
rharperand we can have a bridge over a bonded vlan20:59
rharperor vlan'ed bond20:59
rharperwhich was sort of why I was saying no-virt20:59
rharperbut I know the lxc case exists21:00
smosermaybe its simpler.21:02
smoserapply_network_config_names() already filters on 'physical'21:02
smoserso we do have a bit of that information present.21:02
smoserbut i guess it doesnt have the macs. hm.21:02
smosernah. i dont think that helps21:04
rharperthat's on *config*21:05
rharperinput21:05
rharpermy point was that when we "get_current_state"; the non-virt filter really does the right thing (except for LXC) which certainly could handle renames outside of cloud-init; frustrating ...21:07
smoseri got to run, i think the right hting to do is to just skip the bonds when collecting info for bymac in this case.21:15
smoseri wonder if it will even work though21:15
smoseri wonder if you can rename a part of a bond21:15
smoserseems unlikely21:15
smoseryeah, you cant.21:17
smoserbut the goal i guess is nto that, but rather to not attempt the rename.21:17
rharperyeah21:25
rharperI'll be running trunk cloud-init through curtin vmtests setup to do networkd/netplan testing21:26
rharperwill update here if I find anything21:26
rharperthanks for helping push this through21:26
=== daniel1 is now known as Odd_Bloke
=== rangerpb is now known as rangerpbzzzz

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