And then run the failing test case like:
tox-venv py27 nosetests --nocapture -v tests/unittests/test_handler/test_handl
er_apt_source_v3.py:TestAptSourceConfig.test_apt_v3_disable_suites
This is pretty straight forward usage of cheetah, the CTemplate is just
from Cheetah.Template import Template as CTemplate
I've also tried calling CTemplate with None in either or both positions and you end up with a different stack trace than above. All of this on both trusty and xenial i386.
I just re-built this at /jenkins. ubuntu. com/server/ job/cloud- init-ci/ 366/
https:/
and the i386 ran fine. obviously it wasn't a problem with Dimitri's code that triggered it.
It feels like a bug in cheetah or python. :(.
I've put the following diff in place: templater. py b/cloudinit/ templater. py templater. py templater. py content, params): template( text):
diff --git a/cloudinit/
index b3ea64e..c24265a 100644
--- a/cloudinit/
+++ b/cloudinit/
@@ -76,6 +76,8 @@ def basic_render(
def detect_
def cheetah_ render( content, params): [%r]).respond( )" % [params] ).respond( )
+ print("Calling CTemplate(%r, searchList=
+ (content, params))
return CTemplate(content, searchList=
def jinja_render( content, params):
And then run the failing test case like: /test_handler/ test_handl source_ v3.py:TestAptSo urceConfig. test_apt_ v3_disable_ suites
tox-venv py27 nosetests --nocapture -v tests/unittests
er_apt_
It shows: '$RELEASE' , searchList= [{'RELEASE' : 'xenial' }]).respond( ) '$RELEASE- updates' , searchList= [{'RELEASE' : 'xenial' }]).respond( ) '$RELEASE- updates' , searchList= [{'RELEASE' : 'xenial' }]).respond( ) '$RELEASE- security' , searchList= [{'RELEASE' : 'xenial' }]).respond( ) '$RELEASE- updates' , searchList= [{'RELEASE' : 'xenial' }]).respond( ) '$RELEASE- security' , searchList= [{'RELEASE' : 'xenial' }]).respond( ) '$RELEASE- updates' , searchList= [{'RELEASE' : 'xenial' }]).respond( ) '$RELEASE- security' , searchList= [{'RELEASE' : 'xenial' }]).respond( ) [{'RELEASE' : 'xenial' }]).respond( ) [{'RELEASE' : 'xenial' }]).respond( ) '$RELEASE- updates' , searchList= [{'RELEASE' : 'xenial' }]).respond( ) '$RELEASE- updates' , searchList= [{'RELEASE' : 'xenial' }]).respond( ) '$RELEASE- security' , searchList= [{'RELEASE' : 'xenial' }]).respond( )
test_disable_suites - disable_suites with many configurations ... Calling CTemplate(
Calling CTemplate(
Calling CTemplate(
Calling CTemplate(
Calling CTemplate(
Calling CTemplate(
Calling CTemplate(
Calling CTemplate(
Calling CTemplate('foobar', searchList=
Calling CTemplate('foobar', searchList=
Calling CTemplate(
Calling CTemplate(
Calling CTemplate(
This is pretty straight forward usage of cheetah, the CTemplate is just
from Cheetah.Template import Template as CTemplate
I've also tried calling CTemplate with None in either or both positions and you end up with a different stack trace than above. All of this on both trusty and xenial i386.
I was running in lxc where as c-i runs in a vm.