Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"cobbler sync" error on centos 7.2 cobbler 2.6.11 #1738

Closed
benblunt opened this issue Dec 28, 2016 · 3 comments
Closed

"cobbler sync" error on centos 7.2 cobbler 2.6.11 #1738

benblunt opened this issue Dec 28, 2016 · 3 comments

Comments

@benblunt
Copy link

generating /etc/dhcp/dhcpd.conf
Exception occured: <type 'exceptions.UnicodeDecodeError'>
Exception value: 'ascii' codec can't decode byte 0xc2 in position 870: ordinal not in range(128)
Exception Info:
File "/usr/lib/python2.7/site-packages/cobbler/remote.py", line 87, in run
rc = self._run(self)
File "/usr/lib/python2.7/site-packages/cobbler/remote.py", line 186, in runner
return self.remote.api.sync(self.options.get("verbose",False),logger=self.logger)
File "/usr/lib/python2.7/site-packages/cobbler/api.py", line 779, in sync
return sync.run()
File "/usr/lib/python2.7/site-packages/cobbler/action_sync.py", line 132, in run
self.write_dhcp()
File "/usr/lib/python2.7/site-packages/cobbler/action_sync.py", line 218, in write_dhcp
self.dhcp.write_dhcp_file()
File "/usr/lib/python2.7/site-packages/cobbler/modules/manage_isc.py", line 193, in write_dhcp_file
self.templar.render(template_data, metadata, self.settings_file, None)
File "/usr/lib/python2.7/site-packages/cobbler/templar.py", line 116, in render
data_out = self.render_cheetah(raw_data, search_table, subject)
File "/usr/lib/python2.7/site-packages/cobbler/templar.py", line 201, in render_cheetah
t = Template(source=raw_data, searchList=[search_table], compilerSettings={'useStackFrame':False})
File "DynamicallyCompiledCheetahTemplate.py", line 58, in init
File "_etc_cobbler_cheetah_macros.py", line 58, in init
File "/usr/lib64/python2.7/site-packages/Cheetah/Template.py", line 1259, in init
self._compile(source, file, compilerSettings=compilerSettings)
File "/usr/lib64/python2.7/site-packages/Cheetah/Template.py", line 1553, in _compile
keepRefToGeneratedCode=True)
File "/usr/lib/python2.7/site-packages/cobbler/template_api.py", line 127, in compile
return Cheetah.Template.Template.compile(*args, **kwargs)
File "/usr/lib64/python2.7/site-packages/Cheetah/Template.py", line 740, in compile
settings=(compilerSettings or {}))
File "/usr/lib64/python2.7/site-packages/Cheetah/Compiler.py", line 1575, in init
source = unicode(source)

!!! TASK FAILED !!!

@Zine79210
Copy link

Zine79210 commented Jan 14, 2017

Hello,
seems like the problem come from the encoding of the 870th caracters from your dhcpd.conf...
Verify that your dhcpd.conf is ascii encoded (no accent) and try again.
I had the same issue with kickstart templates, and i got the job done replacing accent caracters.

Hope it will help you.
Regards.

@jmaas
Copy link
Member

jmaas commented Feb 16, 2017

Is this still an issue? Did @Zine79210 suggestion help?

@jmaas
Copy link
Member

jmaas commented Feb 18, 2017

Closing this issue, please let me know if the problem persists and you are able to supply the relevant artefacts so that we can reproduce.

@jmaas jmaas closed this as completed Feb 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants