elurkki | Hi. Having problem with 0.7.9 where NoCloud (meta-data) files network-interfaces: | gateway won't be set when defined. address and netmask seems to be working. The system is using sysconfig.py as a renderer in my CentOS 7.4 and seems that gateway parameter is not reached in that renderer. Would there be some way in meta-data to by pass this problem in CentOS 7.4 case? Thanks a lot! | 05:44 |
---|---|---|
elurkki | Managed to get it working with network-config file. | 12:26 |
smoser | elurkki, what did you figure out ? | 13:09 |
smoser | basically, the 'network-interfaces' is a legacy input | 13:10 |
smoser | /etc/network/interfaces format is a poor and incomplete mechanism for defining network configuration. the network-config is the right way. | 13:10 |
robjo | smoser: Where is the variant set for the templating engine? For some reason I am getting "linux" | 19:05 |
rharper | the distro variant | 19:07 |
rharper | from the sysinfo, one sec | 19:07 |
rharper | robjo: see cloudinit/util.py:system_info() | 19:08 |
rharper | looks like we'd need another elif linux_disk in <suse names> | 19:09 |
robjo | rharper: thanks, yes, but I think with complications due to build service .. investigating | 19:11 |
robjo | OK, got that sorted out, but still failing with "KeyError: 'user'" from the templater, when processing the config template :( | 19:24 |
robjo | https://pastebin.com/hLrLKBU0 | 19:25 |
smoser | man. it just hurts my eyes to look at pastebin.com | 19:25 |
smoser | robjo, you have no other changes ? | 19:27 |
robjo | Well I am adding patches to try to get the templater to behave, so I added a variant for suse in the config template | 19:28 |
robjo | I can push what I have to the build service if that would help | 19:28 |
smoser | i think you dont have jinja | 19:29 |
smoser | which clearly should fail in a more obvious way | 19:29 |
robjo | bingo | 19:31 |
robjo | and yes, when I set up the py3 build I have a BuildRequires for python3-Jinja2, but clearly I neglected this for the python2 build :( | 19:32 |
robjo | thanks | 19:32 |
smoser | robjo, did you see my response about python2 and argparse ? | 19:41 |
smoser | i dont understand how you all hit this (nor do i understand the weird things i've seen on centos wrt argparse) | 19:41 |
robjo | I did only skim your response since I am in the middle of getting the current version packaged | 19:42 |
robjo | btw, setup.py still says 0.7.9, I was expecting 2017.1 ;) | 19:43 |
smoser | well, it wont say that until the release. | 19:44 |
smoser | but i think at this point we're one commit away. basically updating that. | 19:44 |
robjo | I should have a bunch of patches by the end of the week basically more integration work do you want bugs for those? | 19:47 |
smoser | robjo, yes pleas.e | 19:50 |
robjo | OK | 19:50 |
robjo | the get_data_file() test is failing in base.py , self.data is None, but I cannot find where self.data is supposed to be set?? | 20:05 |
smoser | robjo, that isnt a test... it shouldnt be run | 20:08 |
smoser | tests start with test_ | 20:08 |
robjo | duh, the test triggering the issue is test_no_stages_errors | 20:11 |
smoser | robjo, wow. that test has probably been broken for a while. | 20:14 |
smoser | it wont get run because the file doesnt start with test_ | 20:14 |
robjo | During package build I need to run with "python3 -m testtools.run" | 20:15 |
smoser | oh | 20:15 |
smoser | rigth | 20:15 |
smoser | those arent for nose | 20:15 |
smoser | those are c-i tests (continuous integration) | 20:16 |
robjo | I guess I can just remove base.py | 20:16 |
smoser | why ? | 20:16 |
smoser | i'm sorry. | 20:16 |
smoser | my first response was wrong | 20:16 |
smoser | what is testtools.run ? | 20:17 |
smoser | we don't use testtools we use nose. | 20:17 |
smoser | its possible that both could be made to have the same behavior, but what *does* work is nose. | 20:17 |
robjo | https://testtools.readthedocs.io/en/latest/ | 20:18 |
smoser | blackboxsw, when we added cloudinit/ to the dirs that get tested, we did not add it in Makefile unittest3 | 20:19 |
smoser | robjo, thats not how we run our tests. | 20:20 |
smoser | its not to say its not valid or useful, just not what is used. | 20:20 |
blackboxsw | smoser: ahh right you are | 20:20 |
blackboxsw | it's under the makefile "unittest" target, ! unittest3 | 20:21 |
robjo | I know, need to get the package build to resemble upstream testing, it's a time issue, as always.... | 20:21 |
smoser | robjo, so what i'd suggest is you install nose and run 'make test' | 20:21 |
smoser | what was it that is forcing you to run testtools.run ? | 20:22 |
robjo | I'll try nose and see what falls over | 20:22 |
blackboxsw | smoser: we also have cloudinit module in tox -e py3 but not py27 | 20:22 |
blackboxsw | probably need it added everywhere | 20:22 |
robjo | I forgot why I am running testtools, bad notes in the spec file :( | 20:22 |
smoser | blackboxsw, i guess. | 20:24 |
blackboxsw | http://paste.ubuntu.com/25582039/ | 20:24 |
blackboxsw | running tests now | 20:24 |
blackboxsw | green for me: make unittest; tox. red: make unittest3 | 20:27 |
smoser | hm. | 20:30 |
smoser | blackboxsw, well make sure youd' have all deps installed | 20:30 |
smoser | since you're not using tox | 20:30 |
smoser | but i have to run. i'll be back in a few hours to check. | 20:30 |
blackboxsw | smoser: yeah I have make ci-deps-ubuntu :) | 20:30 |
blackboxsw | but it's a mock issue. | 20:30 |
blackboxsw | assert_called_once() DNE | 20:30 |
blackboxsw | cloudinit/net/tests/test_dhcp.py | 20:31 |
blackboxsw | need to use assert_called_once_with() | 20:31 |
blackboxsw | making the change | 20:31 |
blackboxsw | or assertEqual(1, mock_obj.call_count) | 20:32 |
robjo | Well better than before, meaning I remove fewer tests :) those will have to wait for another day | 20:33 |
blackboxsw | ok tweaks to master work for me on ubuntu to include unit tests under cloudinit for make targets and tox envs | 20:34 |
blackboxsw | http://paste.ubuntu.com/25582096/ | 20:34 |
blackboxsw | will put up a trivial branch | 20:34 |
blackboxsw | https://code.launchpad.net/~chad.smith/cloud-init/+git/cloud-init/+merge/331099 | 20:39 |
robjo | Cloud:Tools:Next cloud-init in OBS is building :) | 20:53 |
robjo | will test in AWS tomorrow..... | 20:53 |
powersj | woohoo \o/ | 21:07 |
blackboxsw | msaikia: sorry for the delay review posted on your branch | 21:41 |
blackboxsw | just merged just merged smoser/fix/makefile-not-find-bin | 21:58 |
smoser | ok. thanks. | 21:59 |
smoser | blackboxsw, https://code.launchpad.net/~chad.smith/cloud-init/+git/cloud-init/+merge/331099 | 21:59 |
smoser | is that just an improvement on the test ? | 21:59 |
blackboxsw | smoser: yep, it just usess mocked_obj.call_count instead of assert_called_once (which isn't defined on py3 unittests) | 22:00 |
smoser | hmm. | 22:00 |
blackboxsw | and it adds a failure message of 'dhcp_discovery not called once' instead of 0 != 1 | 22:00 |
blackboxsw | if the assert were to fail | 22:01 |
blackboxsw | I'll check centos w/ that to see if that jives | 22:01 |
smoser | yeah. | 22:01 |
smoser | i think that it just did nothing | 22:01 |
smoser | hm.. | 22:02 |
smoser | wonder how it worked | 22:02 |
smoser | it is "new in version 3.6" | 22:02 |
smoser | https://docs.python.org/3/library/unittest.mock.html | 22:02 |
blackboxsw | I thought we added it in tests/helpers too | 22:03 |
blackboxsw | for earlier versions of unittest | 22:03 |
smoser | we added assert_not_called | 22:04 |
smoser | yeah. i commented in there | 22:07 |
smoser | when you ran not in tox you did not have python3-mock installed | 22:07 |
smoser | so you got the builtin version of python3.5's mock | 22:08 |
smoser | and that didnt have that function | 22:08 |
smoser | i think | 22:08 |
smoser | anyway. i ack'd | 22:08 |
smoser | please merge that. | 22:08 |
smoser | and i have to go afk again . thanks blackboxsw | 22:08 |
blackboxsw | cheers | 22:08 |
blackboxsw | will do | 22:08 |
smoser | robjo, you have a link to a build ? | 22:08 |
blackboxsw | yeah I've got kid's soccer practice to head to in 30. I think I can beat them this time | 22:09 |
robjo | https://build.opensuse.org/project/show/Cloud:Tools:Next | 22:10 |
robjo | smoser: ^^^^ | 22:10 |
blackboxsw | excellent robjo care if we add a link to that in the weekly cloud-init status (credited to you of course)? | 22:22 |
blackboxsw | example of the syndicated content https://insights.ubuntu.com/2017/09/19/ubuntu-server-development-summary-19-sep-2017/ for weekly status is here < | 22:27 |
blackboxsw | tested on cent7 and cent6 | 22:30 |
blackboxsw | merged | 22:42 |
Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!