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