[00:28] smoser: pushed WIP branch. started adding unit tests https://code.launchpad.net/~chad.smith/cloud-init/+git/cloud-init/+ref/fix-ds-identify-vmware-ovf [00:28] ->dinner [01:21] hey folks, any idea about this pylint error? Cell variable section_name defined in loop [01:25] dojordan: more context ? [01:27] for section_name in ('PlatformSettingsSection', 'PlatformSettings', 'PreprovisionedVm'): [01:27] sections = find_child(section, lambda n: n.localName == section_name) [01:27] do you use section_name outside the loop ? [01:27] nope [01:30] ah think i may have found it [01:31] i was using sections outside the loop [01:32] maybe chttps://stackoverflow.com/questions/25314547/cell-var-from-loop-warning-from-pylint [01:32] some context there. [01:32] if you run with '--output-format=parseable' you get the code nubmer (W0640) [01:33] haha i was on that page. but good idea [01:34] the answer there is probably as good as i would be able to give you and it'd take me a minute to fully grock it too [01:34] :) [11:38] hey all [11:43] question: i want to disable datasources completely: i've set ```datasource_list: ['None']``` but when an instance comes up it still takes a _very_ long time looking for metadata (e.g.: ``` Calling 'http://172.16.8.254/latest/meta-data/instance-id```) [12:51] Hi, how can I add peerdns=no to the ifcfg configuration file? [13:18] smoser: remember we talked about datasources in foreman. there is a rpm ruby gem userdata for foreman [13:19] smoser: its nocloud datasource [13:19] smoser: but only for userdata [13:20] smoser: i couldnt test it yet completly because i have problems with my templates [13:27] Shouldn't this create an user account including the provided password and public key? https://pastebin.com/J7J6cZ9X [13:31] It doesn't create any user... [15:30] smoser: Thanks! Have it working now. Any clue how to have peerdns=no in the ifcfg-eth0 file? [15:32] sinanp: probably not able to. [15:33] Ah ok :) Thanks [16:02] And another problem :) Shouldn't "disable_root: 1" disable root login over SSH? It doesn't disable it... [16:41] sinanp: it disables it with the keys that you gave. === shardy is now known as shardy_afk [18:34] rharper: i didnt realize that we were *not* running pylint for python2 and python3 [18:34] we do that in curtin [18:34] hm.. [18:35] right, we have a py27-pylint and py3-pylint in curtin [18:35] vs. just 'pylint' in cloud-init [18:35] I thought it was only python3 based due to the default env; but I didn't verify [18:36] do you want me to fix up top to use py27-/py3 pylints ? [18:36] with the exception of no py27 on cloud-tests ? [18:36] ipm not even sure. [18:36] and what do you want to do about tools ? [18:36] which it woudl pick. [18:36] i'll fix tools it cant be that hard. [18:36] i'm just tsarted looking at your branch. [18:36] i'll see. [18:37] ok [18:37] one was optparse [18:37] I didn't really want to rewrite that to argparse; seemed hardly worth it, not knowing how often that tool is used [18:37] the other one about a missing default parametter to the mime-type finder wasn't very obvious where we need to set a default value [18:47] harlowja: tools/hacking.py ... [18:47] why does that exist ? [18:47] sup dawg [18:47] let me see [18:49] i think it was before time [18:49] hm.. [18:49] before https://pypi.python.org/pypi/hacking came to existence [18:49] https://pypi.python.org/pypi/hacking was born [18:49] so that file can die [18:49] lol [18:49] right [18:49] and we have hacking in our flake8 [18:49] so we get it. [18:49] thanks [18:51] yup [18:51] kill its [19:22] rharper: https://code.launchpad.net/~smoser/cloud-init/+git/cloud-init/+ref/fix/cloud-test-add-pylint-and-fix [19:22] whoa [19:23] what's the trailing slash do ? [19:23] i dont know. :) [19:23] hehe [19:23] i thikn it would then go searching for modules in that directory [19:23] freaky [19:23] versus treating that as a module [19:23] try it though i'm pretty sure you can reproduce [19:27] I'm sure I can, just kinda boggles my mind [19:29] well, anyway, with those changes tip-pylint works also [19:29] andd tools/ is clean [19:29] or 'tools'' rather [19:30] hehe [19:30] pulling your branch now [19:30] and drop the metadata bit [19:30] i did not intend to get that to you [19:30] it was in my working dir ithink [19:30] oh, did you drop that already ? [19:30] in your branch ? or do I still need to ? [19:31] powersj was asking about that [19:31] yeah it was in your diff yesterday [19:31] https://code.launchpad.net/~smoser/cloud-init/+git/cloud-init/+merge/334780 [19:31] that was how i found out that integration tests were busted [19:31] i was going to run integration test on m y changes [19:31] and found it broken [19:32] and t hen wentn off to try to get pylint going [19:32] and then handed that off to you [19:32] what a chain of events :) [19:32] so i'd say drop that commit [19:32] right, I just meant did you drop that delta out of the pylint branch in the thing you just proposed to merge into my pylint branch ? [19:32] and we can pull it in separately. [19:32] just git rebase -i master [19:32] and delete it [19:32] then after your merge we'llg rab mine [19:32] well, it's not a separate commit [19:33] so I was going to find out which bits were unneeded and diff them out in a another commit and squash during rebase [19:33] oh its not ? [19:33] it's the "what bits do I need to drop" that I'm asking for [19:33] :-( [19:33] I don't know [19:33] that's what I've been asking [19:33] I'm generally not aware of which files were the "metadata" changes that powersj and smoser are speaking of [19:33] well, its in that mp there. probably will patch -R off if you wanted to [19:34] ok [19:34] that works [19:34] * rharper patch -Rs [19:34] git show 612f9896330e | patch -p1 -R [19:34] one hunk failed [19:34] i'll get it [19:36] http://paste.ubuntu.com/26134634/ [19:36] I did: git diff -r master [19:36] and then I can patch -p1 -R and it applies cleanly to revert those changes [19:36] look sane ? [19:39] nice blog post bbsw: https://twitter.com/davidpbritton/status/938160996136271872 [19:39] i think so [19:39] k, pushing again to my branch [19:39] I commited the revert and squashed into my first commit [19:40] ok [19:40] https://code.launchpad.net/~raharper/cloud-init/+git/cloud-init/+merge/334868 [19:40] that looks better [19:42] mention removal of tools/hacking.py (obsolete) [19:42] and then i thikn happy [19:42] assuming c-i is [19:43] man, really don';t like cloud-images not having apt sources update data in them [19:43] smoser: did we file a bug on that? [19:43] apt install foo breaks until you apt update first [19:43] on daily images , no less [19:44] you noticed that ? [19:44] ? [19:44] I just launched daily bionic, sudo apt install tree [19:44] fails, I have to apt update first [19:44] well, youc ant really do anythign about bionic [19:44] development release is basiclaly guaranteed to have out of date apt [19:44] ok, on arful [19:44] on xenial [19:44] on zesty [19:44] it's the new thing [19:45] same in lxd images too [19:45] i think that released iamges should have the frozen release pocket up to date in the image. [19:45] launch a new one, lxc launch ubuntu-daily:xenial x1 [19:45] pretty sure it was broken there too [19:48] smoser: I didn't squash your three commits; I'll do that and add their changes to the commit message, wait for ci and then push to master [19:50] Tridactyl (Vimperator/Pentadactyl's successor). [19:51] smoser: surely you've tried this in ff57+; i really wanted to switch to ff, but the input-box editor is missing (using wasavi on chrome for that now) [19:51] oh ther is one. [19:51] i use it. [19:51] let me find [19:51] i have tridactlyl installed not really using it though [19:53] https://github.com/jlebon/textern [19:53] and 'xvim' is the editor i invoke [19:53] https://gist.github.com/smoser/1ee3f2b223717625c5f4 [19:53] ie, my editor configured is ['xvim', 'block'] [19:56] nice [19:56] does that get your input box editing ? [19:56] text area, i hit 'ctrl-I' [19:57] nice! [19:57] like i did before and gnome-terminal window pop up [19:57] I couldn't get textern to work when I tried it a few weeks ago [19:57] but I used gvim [19:57] so maybe xvim will do the trick [19:57] yeah i dont liek gvim [19:57] gvim will work fine [19:57] huh, not for my system, probably a win manager thingy [19:57] i just dont like the mouse i think always messed me up [19:57] on paste and things. [19:57] got some xmonad here [19:58] oh. i dont know. it does work for me. i dont remembered every thing i did. i just followed the doc it had [20:06] rharper: so it looks like, on xenial the images have these [20:08] oh man [20:08] looks like haste is dead [20:08] http://paste.ubuntu.com/26134814/ [20:08] so in /var/lib/apt/lists/ on xenial daily we have lists present for [20:09] xenial-updates mmain restricted [20:09] xenial main restricted [20:09] security main restricted [20:09] no universe or multiverse or backports [20:09] which are all going to be pulled when you type 'apt-get update' [20:10] i've had discussions with rbasak about this before [20:10] and i think the right thing to do would be to include only the "frozen" data [20:10] ie, [20:10] xenial main restricted universe multiverse [20:11] removing those files from the iamge just causes the user to have to download them and get the exact same thing as they could have been given in the image. [20:11] for xenial-updates and security, it somewhat makes sense to have those out of date [20:12] er... somewhat makes sense to not have those at all [20:12] as they're basically guaranteed to be out of date. [20:12] i think what we have now is probably just happenstance or regression [20:12] but one could probably argue that its best to have nothing in there [20:12] which will force a user to 'apt-get update' [20:13] because if they had only the 'frozen' bits, then they could 'apt-get install foo' and get a vulnerable 'foo' [20:13] but that comes at a big cost [20:14] on mirrors and data download and cpu decompression that. [20:35] yeah [20:36] well, it feels different, for better or for worse [20:36] it may well have changed. [20:36] i didnt check that [20:36] daily images, for example are unlikely to get a security vulnerable one if they included up-to-date cached files [20:36] and it feels wrong to me to have 'main' and 'universe' there but no multiverse or backports [20:36] I think that's my gripe, if I'm already downloading a daily [20:36] it shouldn't be out of date [20:36] if the user is just going to get them on first 'apt-get update' [20:36] (and gets them by default on an install) [20:36] so. [20:37] your tests failed in centos6 [20:37] the unittest there is to old to have assertRaisesRegex [20:37] how does tox not find that ? [20:37] oh, have to run tox *in* centos6 [20:37] that's py26, right ? [20:38] yeah. and with system packages. yeah. [20:38] urg [20:38] i think easiest thing tpo do is just use the 'ignore' comment [20:38] no pip unittest magic ? [20:38] yeah [20:38] oh. acutally [20:39] oh. [20:40] i think that unittest is builtin to python [20:40] so we're using the one from python2.6 installed there. [20:41] right, was wondering if we could somehow upgrade it; but I suspect not as easily as # pylint: disable=FOO [20:44] well, helpers could patch smpething in [20:44] oh. actually... [20:48] http://paste.ubuntu.com/26134987/ [20:48] rharper: ^ [20:48] try that [20:48] oh, heh [20:48] what happens is that pylint will mark that line as using depricated method [20:49] then we hae to mark #pylint: disabled=W1505 there [20:49] now, we have two call sites [20:49] we could add that and the disable, and then we'd be free to always use Regex [20:49] thoughts? [20:50] ? [20:50] cant we just monkey patch it like that and use the new name ? [20:51] we can, but we'll still get the warning, now on cloudinit/tests/helpers.py [20:51] but I think that's better to do it in one place [20:51] sure. but then its one place to coment and it has a text coment saying why [20:51] prolly should move the parse_and_read() method to helpers too [20:51] yes [20:51] I'll do that as well for the ConfigParser [20:52] ok. i got to go afk for a bit. biab [20:52] k [21:00] @blackboxsw, can you take a look? I responded to the comments which i didn't fix, the rest are fixed [21:00] https://code.launchpad.net/~dojordan/cloud-init/+git/cloud-init/+merge/334341 [21:20] rharper: http://paste.ubuntu.com/26135182/ [21:20] i think that atually works. i had '2' in the wrong place :) [21:22] ah [21:22] yeah, was just debugging that [21:23] i think pylint wont even complain. [21:24] so, how does pylint get executed in py27 ? [21:24] on curtin we have those py27-pylint and p3-pylint targets which set base-python = ... [21:24] it doesnt [21:24] hrm [21:25] do we not care then ? [21:25] we can absolutely follow like curtin did/does [21:25] and have explicit ones [21:25] the thing i dont like about it is that... slow [21:25] yeah [21:25] well, in cloud-init we run .pylintrc with jobs=4 [21:25] so it does run in parallel [21:25] still slow [21:25] which is pretty nice [21:25] yes [21:27] i'm not opposed to it. [21:27] but i dont think we *have* to do it right now [21:27] i like to give future smoser some reason to think past smoser was an idiot [21:30] tox -e pylint on diglett takes 1m28 seconds [21:30] bso adding another of those just seems costly. [21:30] without tools/ and tests/ it was only 30s ish [21:32] what's the total tox run ? [21:33] boo [21:41] 2m26 [21:41] 1m30 of that to tox [21:42] er.. to pyklint [21:42] man, can't win; [21:43] with the centos fix, tox -e pylint fails [21:43] i think just for now do pylint on python3 only. [21:43] ? [21:43] even though unittest2.TestCase has both attributes [21:43] if I comment out your patch [21:43] it passes [21:45] smoser: well, we can demote pylint to something like tip-pylint [21:45] present, but not always run ? [21:45] I think we don't lint on package build anyhow, right ? [21:45] do we tox on package build ? [21:45] or just unittest [21:47] well we want to run pylint . i am fine with 1x that cost [21:47] not 2x [21:47] and yeah, we can add a py2-pylint that only runs on manual [21:47] but i dont think we really need to. [21:47] I still can't figure out why it's failing with your cent6 fix [21:47] it doesn't make any sense; the fix-up path isn't taken at all [21:48] https://github.com/PyCQA/pylint/issues/1653 [22:00] :q! [22:00] (whoops) [22:01] smoser: so I'd like to drop the cent6 2.6 pylint fix unless you can figure out how to fix that; and just skip running pylint on the package builds; [22:01] oh. its not actually pylint that complained [22:01] it was a unit test complaining [22:01] right? [22:02] ah, lemme see [22:03] yeah [22:03] self.assertRaisesRegex(util.ProcessExecutionError [22:03] /test_util.py", line 698, in test_subp_warn_missing_shebang [22:03] self.assertRaisesRegex(util.ProcessExecutionError [22:03] the fix you had will work but pylint blows up on it [22:04] and I can't figure it out [22:04] so, I guess we leave it as Regexp and mark them disables [22:04] what a pita [22:12] http://paste.ubuntu.com/26135444/ [22:12] rharper: ignore the basepython thing in that patch [22:12] and that runs for me (make unittest) in centos6 [22:13] wow [22:13] how did you figure that one out? [22:13] it was juts comp;laining that the thing was an integer [22:13] but I don't like not using assertRaises* [22:13] it still uses it. [22:13] just the context_manager.exception.code [22:13] is wht differs [22:13] oh, my failure is on ubuntu [22:14] with that the older assertRaisesRegexp fix [22:14] tox -e pylint on my ubuntu system fails [22:14] saying we're using deprecated methods [22:14] Regex [22:14] which 1) isn't deprecated 2) hasn't been patched [22:15] I hadn't yet run under centos again [22:15] https://docs.python.org/3/library/unittest.html#unittest.TestCase.assertRaisesRegex [22:15] was still trying to get a clean tox run on ubuntu first and added your older unittest2 fix for centos to test in a bit but; it won't pass pylint for me [22:15] it may not be deprecated, but it deffinintely not renamed [22:15] https://github.com/PyCQA/pylint/issues/1653 [22:18] that is odd. [22:19] ugh [22:19] yeah [22:19] exactly [22:23] rharper: http://paste.ubuntu.com/26135510/ [22:24] that i thikn is happy everywhre [22:24] stupid [22:24] that is on top of 5335e1632ddabdbad9ffb011720929ae4cd8ebe3 [22:27] oh boy [22:27] hten i realize that Makefile (that runs 'nosetests' only runs on tests/ not on cloudinit) [22:27] gah [22:28] man, what a rat hole [22:28] misplaced 2 again [22:28] wow, what is that tricky bit ? [22:28] http://paste.ubuntu.com/26135531/ [22:29] how does that help ? [22:29] that worked in 'tox ' [22:29] I fail to see what tox found the first time [22:29] so the "fix" is just as mystical to me too [22:29] and it works in 'make unittest' in centos6 [22:29] the '_tricky' part there is complete crap [22:29] k [22:29] yeah [22:30] what i think is happening is that pylint is looking for Regexp to go complaining [22:30] and realiaes that the thing we're calling is == that other thing [22:30] yeah [22:30] but then now its not strictly equal [22:30] lemme get both those in my branch now [22:30] right [22:30] all problems solved by anbother level of indirection :) [22:31] oh. i was wrong. 'make unittest' *does* run with cloudinit [22:31] so thats good. [22:31] i thikn we're set here. [22:31] you get that, push it, and maybe we'll be happy! [22:31] maybe [22:31] and on that note, /me is out [22:33] ok [22:33] thanks