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

smoserrharper, blackboxsw well, it will have *some* per message hit on ubuntu00:21
smoserbut on the order of 5/3 of what it was.  thats roughly the ratio of difference for a 'import' of an already imported library compared to bool(variable is None)00:22
smosernow in the missing library case, python will probably go statting a bunch of possible locations again.00:22
smoserand there could be a larger hit00:22
smoserbut in reality, if you hit that code it wont go doing it again (because it raises a nonimplementederror)00:22
smoserrharper, or blackboxsw around ?00:59
smoseri have a fix for trunk's current busted tests00:59
smoseror powersj00:59
smoserhttp://paste.ubuntu.com/25435503/00:59
smoserfailure is seen at https://jenkins.ubuntu.com/server/job/cloud-init-ci/236/console01:00
powersjsmoser: still there?01:12
powersjseems you already fixed it01:15
* powersj disappears again01:15
smoseryeah. shoudl be good now. and uploading to artful01:21
smoser   e5bbf884..f713c6e9  HEAD -> ubuntu/devel01:22
smoser * [new tag]           ubuntu/0.7.9-259-g7e76c57b-0ubuntu1 -> ubuntu/0.7.9-259-g7e76c57b-0ubuntu101:22
smoserand uploaded.  cloud-init_0.7.9-259-g7e76c57b-0ubuntu1_source.changes01:22
Odd_BlokeIt would be nice if ds-identify/cloud-id emitted something that would end up in the nova console log; it would make working out why an instance hasn't come up a little easier.10:41
blackboxswsmoser: if you run "make deb" on your drop-ubuntu-init-switch branch does it also generate a deb for you that doesn't contain etc/init files14:37
smoserdoesnt ?14:39
smoseri'm confused14:39
smoserblackboxsw, https://code.launchpad.net/~smoser/cloud-init/+git/cloud-init/+merge/329946 is updated now.16:39
smoserchanged the default 'init-system' for bddeb.16:40
powersjLong running tests on CI system: https://paste.ubuntu.com/25439503/16:49
blackboxswahh sure enough that's the issue I was seeing, or rather, what was still producing upstart scripts in etc/init  in my debs16:49
blackboxsw+116:49
blackboxswpowersj: ahh that's in progress16:50
blackboxswgood find16:50
powersjblackboxsw: as in there an MP to review yet?16:50
blackboxswit's the fact that httppretty in those tests isn't mocking the min datasource version16:50
powersjah ok I do recall you talking about this16:50
blackboxswso it's reaching out to the internet and timing out16:50
powersjI didn't know that it resulted in long running tests as well16:50
powersjyeah16:51
blackboxswok, larsks branch is up which would fix that. but it has a needs fixing comment16:51
blackboxswsmoser: approved https://code.launchpad.net/~smoser/cloud-init/+git/cloud-init/+merge/32994616:55
blackboxswthanks for the fix16:55
blackboxswpowersj: https://code.launchpad.net/~larsks/cloud-init/+git/cloud-init/+merge/329660 is the 'fix' but needs a tweak before it lands.16:55
powersjyeah was looking at it - his CI run resulted in much more normal times too16:56
blackboxswlarsks: do you know if you'll have cycles on the branch  https://code.launchpad.net/~larsks/cloud-init/+git/cloud-init/+merge/329660 ?16:57
blackboxswif not, I think we might patch that branch and try to get that landed as the breakage (the unit tests timing out when hitting the unmocked metadata min_version) is now something we are seeing in our CI too16:59
blackboxswthanks for this powersj  https://bugs.launchpad.net/cloud-init/+bug/171411717:04
ubot5Ubuntu bug 1714117 in cloud-init "tox: long CI times" [Undecided,Confirmed]17:04
blackboxswlooking over the larsks branch, I think I'd like to limit a bit of the mocking that is being done as well as the tests in his branch are also mocking out all of the min_metadata_version urls for all metadata when we only really need to mock instance-id.17:06
blackboxswso I'll probably tweak the branch a bit and try to only mock the necessary minimum content w/ httpretty17:06
blackboxswpowersj: I like your nosetests params, I'd like to capture that in tox.ini too (maybe just a comment about the additional params so we can check for costly unit tests easily in the future17:10
powersjblackboxsw: nosetests --with-timer --timer-ok 1 --timer-warning 517:12
powersjthat uses the nose-timer plugin17:13
smoserbut you'd have to pip install nose-timeer17:13
smoseri think17:13
powersjyes17:13
stanguturiI just updated my 'merge request'. CI build failed https://jenkins.ubuntu.com/server/job/cloud-init-ci/241/ The failure is something related to the infrastructure and not at all related to my change.17:53
stanguturiHow to rebuild the failed jenkins build?17:53
powersjstanguturi: yep, looks like we had issue getting to a mirror. I can re-kick shortly17:54
blackboxswhi sankar. good to see you again17:55
stanguturiThanks Josh, Chad18:00
powersjstanguturi: CI is running again, if it fails again let me know.18:00
blackboxswas long as unit tests succeed there, I'll land that branch today stanguturi18:01
stanguturiGreat. Thanks Chad18:02
blackboxswpowersj: larsks I've got it on the CI unit test fixes/proper mocks19:28
powersjsweet19:28
blackboxswhttps://code.launchpad.net/~chad.smith/cloud-init/+git/cloud-init/+ref/bug/ec2-tests-unmocked-metadata for the win. I'll put it up for review19:29
blackboxswit also uses httpretty.HTTPretty.allow_net_connect = False   which raises a MockError if we try to reach out to anything on the internet not mocked19:29
rharpernice19:33
blackboxswhttps://code.launchpad.net/~chad.smith/cloud-init/+git/cloud-init/+merge/330040 is done powersj. it should help19:44
powersjblackboxsw: style will fail, but I +1 with comment19:51
blackboxswpowersj: my wife tells me that a lot19:52
powersjalso there are still two long-ish running tests that we should fix in another bug19:52
* blackboxsw fails style19:52
powersjhttps://paste.ubuntu.com/25440455/19:52
powersjLOL19:52
blackboxswpowersj: actually it looks like a httpretty problem too.19:53
rharperpowersj: is that faster?  what was the the previous time, I thought you said 20 minutes or something crazy19:53
blackboxswI'll try to grab those too in this branch19:53
blackboxsws/httpretty/unmocked httpretty urls19:53
powersjthese ran 20 seconds for each enviornment so ~1min and 40 seconds total versus 20 minutes ;)19:53
rharperheh19:54
powersjif we fix those other two tests we can speed things up enough people might run tox before pushing ;)19:55
rharperwha? I always run tox; doesn't take that long19:55
* powersj points at blackboxsw 19:55
rharperheh19:56
rharpertox -e flake819:56
rharperyeah19:56
blackboxswrharper: if I  time tox -e py27 tests/unittests/test_datasource/test_ec2.py -- -s  it takes 0m6.011s now, without the changeset 0m20.199s19:58
rharperblackboxsw: that's a nice win19:58
blackboxswalso certain environments seem to timeout faster.. as larsks saw the tests take ~20 mins when he runs in centos env I think19:58
blackboxswI'm making a change for the two openstack tests now19:59
powersjsweet20:05
blackboxswhmm so, powersj I think we need to worry about those two in a separate bug, it's spending most of it's time I believe in a unittest callback  which does pattern matching and processing on every metadata file request. instead of completely mocking each url under the metadata service, so I think it's just a costly way to setup the mock (with a callback each time)20:16
powersjyeah no need to pile on20:16
powersjseparate is preferred anyway20:16
satheris there a way to enforce exeuction of only one module from the user-data.txt file?21:24
satherlike, if a specific module is present, only execute that module and do not execute any others?21:25
blackboxswbah powersj https://jenkins.ubuntu.com/server/job/cloud-init-ci/242/console we hit issues with scratch on the builder I think.21:41
blackboxswE: 10mount: mount: special device /home/jenkins/ubuntu/scratch does not exist21:41
blackboxswE: xenial-amd64-c24fe5b1-313c-4f25-b2e1-58283e767c03: Chroot setup failed: stage=setup-start21:41
blackboxswChroot setup failed21:41
blackboxswE: Error creating chroot session: skipping cloud-init21:41
powersjShoot21:42
powersjI know what the issue is I can fix shortly21:43
rharpersather: in general no; however if you want to customize which modules get run; you can modify /etc/cloud/cloud.cfg which has a list of which modules will run at the different stages.  It's likely if you only run one stage that the instance generally won't be configured properly but maybe in a custom image that's not an issue21:52
rharpersather: also, one can run single modules via cloud-init single --file=user-data.txt --force always --name cc_modulename; in case you just need to re-run one module21:52
blackboxswthx rharper I had a doorbell, I think we need the "--frequency always" as in:    sudo cloud-init single --file=user-data.txt --force ---frequency always --name cc_modulename21:54
rharperblackboxsw: yeah21:54
rharperhonestly, I think the frequency should be defaulted to always if we run in single mode21:54
rharperthat's not a typical path, why make users do that21:54
satherrharper: thanks for the info. I'm just trying to settle a security concern where we have a custom module, and only want that to run via cloud-init with a specific datasource...21:56
rharpersather: interesting;  modules run independent of datasources in general21:57
rharperbut the module is called with the cloud object which has a datasource in it; the module could check the datasource type (or attribute) and exit out if not the datasource you want21:58
blackboxswrharper: any way for us to close https://code.launchpad.net/~wesley-wiedenmeier/cloud-init/+git/cloud-init/+merge/317589. I don't seem to have perms to mark that branch as merged21:58
rharperblackboxsw: is it merged? if it's merged or superceeded, we usually "reject" and add comment about what we really did21:58
rharperI'll update that21:59
rharpercomment that we're merged (via different branch) so marking it rejected (sorry for the harsh language)21:59
satherI was actually hoping for a logic like this21:59
blackboxswI think the docstr are Reject, the actual feature name has already been mergedd21:59
satherif specific-datasource; then run only this custom_module21:59
blackboxswthanks rharper21:59
satherthe specific-datasource is something someone did in-house21:59
satherto allow for usb to be read by cloud-init22:00
satherbut we now just opened up our box to run any code if someone plugs a usb into it22:00
sather:\22:00
rharperheh22:01
rharpersounds like the custom module could use some tightening up22:01
satherI guess I was wondering if it's possible to do22:02
blackboxswhrm, so in-house modules should be pluggable (as cloudinit/stages calls find_module on anything installed in cloudinit/config/cc_*py. Right it seems that module could be coded to reject other datasources from inspecting cloud.datasource22:02
rharperin general the cloud.cfg controls the list of modules that run by default;  It sounds like you could use a custom datasource which could be derived from say config-drive, which checked various usb devices/features before running22:02
satherif custom_module present in cloud-config; don't execute any other modules ;p22:02
rharperand the module itself can check that your specific derivative datasource was run before attempting to handle things.22:02
sathercloud-config passed from userdata22:03
rharperwell, generally there doesn't seem to be a way to disable the other modules dynamically that I can think of;  but maybe smoser would know if I'm forgetting a way to do that22:03
satherrharper: thakns for the help22:05
blackboxswrharper:  so to be certain, even if a custom module is loaded on an instance w/ cloud-init installed, that custom module doesn't get run even though it's discovered if it isn't listed in /etc/cloud/cloud.cfg right.22:05
blackboxswso the goal is to prevent direct injection of custom modules in cloud-init without express intent as defined in /etc/cloud/cloud.cfg right22:05
blackboxswthough I *think* that custom module could be run via "cloud-init single" even if it's not listed22:06
blackboxswjust validated w/ cc_ntp22:07
rharpersather: sure, let us know if you get stuck or something else isn't working and we'll do our best to help you along the way22:08
blackboxswrharper: ok validated that a module name that isn't present in /etc/cloud/cloud.cfg can *not* be run even on commandline w/ --force22:09
rharperblackboxsw: hrm;  I know the design allowed for user-date to write out modules to be run via user-data; so I may be missing something22:09
blackboxsw2017-08-31 22:08:27,056 - cc_ntp.py[DEBUG]: Skipping module named cc_ntp, not present or disabled by cfg22:09
blackboxswrharper: yeah I thought so too. poking around22:09
blackboxsw"honestly, I think the frequency should be defaulted to always if we run in single mode"  :  +1 on that22:11
powersjnew cloud-id bug: LP: #171435822:34
ubot5Launchpad bug 1714358 in cloud-init "ds-identify does not find CloudStack datasource" [Undecided,New] https://launchpad.net/bugs/171435822:34
powersjblackboxsw: here is a bug for the OpenStack tests that are lengthy https://bugs.launchpad.net/cloud-init/+bug/171437623:23
ubot5Ubuntu bug 1714376 in cloud-init "unittests: OpenStack DS escape or timeout" [Undecided,New]23:23

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