`cobbler system getks` fails after update to Satellite 5.6

Solution Verified - Updated -

Environment

  • Red Hat Satellite 5.6 upgraded from Satellite v 5.4.1
  • Red Hat Enterprise Linux 6

Issue

  • After updating to Satellite 5.6 on RHEL6 cobbler cannot render kickstart files when cobbler system records have been generated directly via command line.
  • Consequently systems added this way cannot be (re)installed
  • Re-installation broken after satellite update
  • After upgrading satellite from version 5.4.1 to 5.6 re-installation of systems based on the old cobbler system records (by toggling the netboot-enabled flag) doesn't work any more, generating the kickstart file fails
  • For newly created cobbler system records kickstart file creation works well
  • Re-installation of servers is part of our disaster recovery concept as well as for release management. Creating all cobbler records from scratch is a time consuming and error-prone task.
  • Is there a way to fix/patch the existing system records?
  • cobbler system getks --name=system returns with error:
# *** ERROR ***
#
# There is a templating error preventing this file from rendering correctly. 
#
# This is most likely not due to a bug in Cobbler and is something you can fix.
#
# Look at the message below to see what things are causing problems.  
#
# (1) Does the template file reference a $variable that is not defined?
# (2) is there a formatting error in a Cheetah directive?
# (3) Should dollar signs ($) be escaped that are not being escaped?
#
# Try fixing the problem and then investigate to see if this message goes
# away or changes.
#
# 
# 'ipv6_address'
#   File "/usr/lib/python2.6/site-packages/cobbler/templar.py", line 126, in render
#     data_out = t.respond()
# 
#   File "cheetah_DynamicallyCompiledCheetahTemplate_1420369693_24_11581.py", line 429, in respond
# 
#   File "cheetah_DynamicallyCompiledCheetahTemplate_1420369693_24_11581.py", line 151, in __errorCatcher13
# 
#   File "<string>", line 1, in <module>
# 
#   File "/usr/lib/python2.6/site-packages/cobbler/template_api.py", line 333, in SNIPPET
#     result = BuiltinTemplate.SNIPPET(self, file)
# 
#   File "DynamicallyCompiledCheetahTemplate.py", line 85, in SNIPPET
# 
#   File "/usr/lib64/python2.6/site-packages/Cheetah/Template.py", line 1601, in _handleCheetahInclude
#     self._CHEETAH__cheetahIncludes[_includeID].respond(trans)
# 
#   File "cheetah_DynamicallyCompiledCheetahTemplate_1420369693_49_14523.py", line 115, in respond
# 

Resolution

  • For every system added via cobbler command line as described run the following for every interface:
# cobbler system edit --name=SYSTEM-NAME --interface=NIC \
--ipv6-address="" --ipv6-default-gateway="" --ipv6-mtu="" \
--ipv6-secondaries="" --ipv6-static-routes="" --mtu=""

Note: this must also be done for bonding interfaces

Root Cause

  • currently unknown, filed internal bz #1178515

Diagnostic Steps

  • On Satellite 5.4.1 system has been added as follows:
# cobbler system add --name=test54-2 --hostname=test54-2.example.com --ksmeta="veritaskey=some-lic-key" --netboot-enabled=1 --profile=test-rhel6-1:1:ORGA
# cobbler system edit --name=test54-2 --interface=eth0 --mac-address=de:ad:be:ef:21:21 --ip-address=1.2.2.112 --subnet=255.255.255.0 --static=1
# cobbler system edit --name=test54-2 --interface=eth1 --mac-address=de:ad:be:ef:21:23 --ip-address=1.2.3.112 --subnet=255.255.255.0 --static=1
  • cobbler system getks --name=test542 returns full output of kickstart profile

  • Check IPv6 configuration:

# cobbler system dumpvars --name=test54-2 | grep -i ipv6
#

Note: there is no IPv6 configuration present at this time

  • Update Satellite to 5.6 as documented

  • After updating to Satellite 5.6 run cobbler system getks --name=test542 and the following error is shown:

# *** ERROR ***
#
# There is a templating error preventing this file from rendering correctly. 
#
# This is most likely not due to a bug in Cobbler and is something you can fix.
#
# Look at the message below to see what things are causing problems.  
#
# (1) Does the template file reference a $variable that is not defined?
# (2) is there a formatting error in a Cheetah directive?
# (3) Should dollar signs ($) be escaped that are not being escaped?
#
# Try fixing the problem and then investigate to see if this message goes
# away or changes.
#
# 
# 'ipv6_address'
#   File "/usr/lib/python2.6/site-packages/cobbler/templar.py", line 126, in render
#     data_out = t.respond()
# 
#   File "cheetah_DynamicallyCompiledCheetahTemplate_1420369693_24_11581.py", line 429, in respond
# 
#   File "cheetah_DynamicallyCompiledCheetahTemplate_1420369693_24_11581.py", line 151, in __errorCatcher13
# 
#   File "<string>", line 1, in <module>
# 
#   File "/usr/lib/python2.6/site-packages/cobbler/template_api.py", line 333, in SNIPPET
#     result = BuiltinTemplate.SNIPPET(self, file)
# 
#   File "DynamicallyCompiledCheetahTemplate.py", line 85, in SNIPPET
# 
#   File "/usr/lib64/python2.6/site-packages/Cheetah/Template.py", line 1601, in _handleCheetahInclude
#     self._CHEETAH__cheetahIncludes[_includeID].respond(trans)
# 
#   File "cheetah_DynamicallyCompiledCheetahTemplate_1420369693_49_14523.py", line 115, in respond
# 
  • Running cobbler system dumpvars --name=test54-2 | grep -i ipv6 returns:
# cobbler system dumpvars --name=test54-2 | grep -i ipv6
ipv6_autoconfiguration : False
ipv6_default_device : 
  • Component
  • pxe

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments