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

elurkkiHi. 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
elurkkiManaged to get it working with network-config file.12:26
smoserelurkki, what did you figure out ?13:09
smoserbasically, the 'network-interfaces' is a legacy input13: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
robjosmoser: Where is the variant set for the templating engine? For some reason I am getting "linux"19:05
rharperthe distro variant19:07
rharperfrom the sysinfo, one sec19:07
rharperrobjo: see cloudinit/util.py:system_info()19:08
rharperlooks like we'd need another elif linux_disk in <suse names>19:09
robjorharper: thanks, yes, but I think with complications due to build service .. investigating19:11
robjoOK, got that sorted out, but still failing with "KeyError: 'user'" from the templater, when processing the config template :(19:24
robjohttps://pastebin.com/hLrLKBU019:25
smoserman. it just hurts my eyes to look at pastebin.com19:25
smoserrobjo, you have no other changes ?19:27
robjoWell I am adding patches to try to get the templater to behave, so I added a variant for suse in the config template19:28
robjoI can push what I have to the build service if that would help19:28
smoseri think you dont have jinja19:29
smoserwhich clearly should fail in a more obvious way19:29
robjobingo19:31
robjoand 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
robjothanks19:32
smoserrobjo, did you see my response about python2 and argparse ?19:41
smoseri dont understand how you all hit this (nor do i understand the weird things i've seen on centos wrt argparse)19:41
robjoI did only skim your response since I am in the middle of getting the current version packaged19:42
robjobtw, setup.py still says 0.7.9, I was expecting 2017.1 ;)19:43
smoserwell, it wont say that until the release.19:44
smoserbut i think at this point we're one commit away.  basically updating that.19:44
robjoI should have a bunch of patches by the end of the week basically more integration work do you want bugs for those?19:47
smoserrobjo, yes pleas.e19:50
robjoOK19:50
robjothe 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
smoserrobjo, that isnt a test... it shouldnt be run20:08
smosertests start with test_20:08
robjoduh, the test triggering the issue is test_no_stages_errors20:11
smoserrobjo, wow. that test has probably been broken for a while.20:14
smoserit wont get run because the file doesnt start with test_20:14
robjoDuring package build I need to run with "python3 -m testtools.run"20:15
smoseroh20:15
smoserrigth20:15
smoserthose arent for nose20:15
smoserthose are c-i tests (continuous integration)20:16
robjoI guess I can just remove base.py20:16
smoserwhy ?20:16
smoseri'm sorry.20:16
smosermy first response was wrong20:16
smoserwhat is testtools.run ?20:17
smoserwe don't use testtools we use nose.20:17
smoserits possible that both could be made to have the same behavior, but what *does* work is nose.20:17
robjohttps://testtools.readthedocs.io/en/latest/20:18
smoserblackboxsw,   when we added cloudinit/ to the dirs that get tested, we did not add it in Makefile unittest320:19
smoserrobjo, thats not how we run our tests.20:20
smoserits not to say its not valid or useful, just not what is used.20:20
blackboxswsmoser: ahh right you are20:20
blackboxswit's under the makefile "unittest" target, ! unittest320:21
robjoI know, need to get the package build to resemble upstream testing, it's a time issue, as always....20:21
smoserrobjo, so what i'd suggest is you install nose and run 'make test'20:21
smoserwhat was it that is forcing you to run testtools.run ?20:22
robjoI'll try nose and see what falls over20:22
blackboxswsmoser: we also have cloudinit module in tox -e py3 but not py2720:22
blackboxswprobably need it added everywhere20:22
robjoI forgot why I am running testtools, bad notes in the spec file :(20:22
smoserblackboxsw, i guess.20:24
blackboxswhttp://paste.ubuntu.com/25582039/20:24
blackboxswrunning tests now20:24
blackboxswgreen for me: make unittest; tox.      red: make unittest320:27
smoserhm.20:30
smoserblackboxsw, well make sure youd' have all deps installed20:30
smosersince you're not using tox20:30
smoserbut i have to run. i'll be back in a few hours to check.20:30
blackboxswsmoser: yeah I have make ci-deps-ubuntu :)20:30
blackboxswbut it's a mock issue.20:30
blackboxswassert_called_once() DNE20:30
blackboxswcloudinit/net/tests/test_dhcp.py20:31
blackboxswneed to use assert_called_once_with()20:31
blackboxswmaking the change20:31
blackboxswor assertEqual(1, mock_obj.call_count)20:32
robjoWell better than before, meaning I remove fewer tests :) those will have to wait for another day20:33
blackboxswok tweaks to master work for me on ubuntu to include unit tests under cloudinit for make targets and tox envs20:34
blackboxswhttp://paste.ubuntu.com/25582096/20:34
blackboxswwill put up a trivial branch20:34
blackboxswhttps://code.launchpad.net/~chad.smith/cloud-init/+git/cloud-init/+merge/33109920:39
robjoCloud:Tools:Next cloud-init in OBS is building :)20:53
robjowill test in AWS tomorrow.....20:53
powersjwoohoo \o/21:07
blackboxswmsaikia: sorry for the delay review posted on your branch21:41
blackboxswjust merged just merged smoser/fix/makefile-not-find-bin21:58
smoserok. thanks.21:59
smoserblackboxsw, https://code.launchpad.net/~chad.smith/cloud-init/+git/cloud-init/+merge/33109921:59
smoseris that just an improvement on the test ?21:59
blackboxswsmoser: yep, it just usess mocked_obj.call_count instead of assert_called_once (which isn't defined on py3 unittests)22:00
smoserhmm.22:00
blackboxswand it adds a failure message of 'dhcp_discovery not called once' instead of 0 != 122:00
blackboxswif the assert were to fail22:01
blackboxswI'll check centos w/ that to see if that jives22:01
smoseryeah.22:01
smoseri think that it just did nothing22:01
smoserhm..22:02
smoserwonder how it worked22:02
smoserit is "new in version 3.6"22:02
smoserhttps://docs.python.org/3/library/unittest.mock.html22:02
blackboxswI thought we added it in tests/helpers too22:03
blackboxswfor earlier versions of unittest22:03
smoserwe added assert_not_called22:04
smoseryeah. i commented in there22:07
smoserwhen you ran not in tox you did not have python3-mock installed22:07
smoserso you got the builtin version of python3.5's mock22:08
smoserand that didnt have  that function22:08
smoseri think22:08
smoseranyway. i ack'd22:08
smoserplease merge that.22:08
smoserand i have to go afk again . thanks blackboxsw22:08
blackboxswcheers22:08
blackboxswwill do22:08
smoserrobjo, you have a link to a build ?22:08
blackboxswyeah I've got kid's soccer practice to head to in 30. I think I can beat them this time22:09
robjohttps://build.opensuse.org/project/show/Cloud:Tools:Next22:10
robjosmoser: ^^^^22:10
blackboxswexcellent robjo care if we add a link to that in the weekly cloud-init status (credited to you of course)?22:22
blackboxswexample 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
blackboxswtested on cent7 and cent622:30
blackboxswmerged22:42

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