Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.

Bug 1643860

Summary: Kickstart generation is broken
Product: [Fedora] Fedora Reporter: Vadim Raskhozhev <iamdexpl>
Component: cobblerAssignee: Orion Poplawski <orion>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 28CC: athmanem, jimi, kwizart, orion, scott, vanmeeuwen+fedora
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: cobbler-2.8.4-5.fc28 cobbler-2.8.4-5.fc29 cobbler-2.8.4-4.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-12-05 01:56:53 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Vadim Raskhozhev 2018-10-29 08:59:03 UTC
Description of problem:
an attempt to generate a kickstart file results in the following message on stderr:
# This kickstart had errors that prevented it from being rendered correctly.
# The cobbler.log should have information relating to this failure.
, accompanied with an exception mesage in /var/log/cobbler/cobbler.log:
Mon Oct 29 11:47:18 2018 - INFO | REMOTE generate_kickstart; user(?)
Mon Oct 29 11:47:18 2018 - INFO | generate_kickstart
Mon Oct 29 11:47:18 2018 - 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.
#
# 
# SNIPPET() takes exactly 2 arguments (1 given)
#   File "/usr/lib/python2.7/site-packages/cobbler/templar.py", line 208, in render_cheetah
#     data_out = t.respond()
# 
#   File "cheetah_DynamicallyCompiledCheetahTemplate_1540802838_59_18547.py", line 269, in respond
# 
#   File "cheetah_DynamicallyCompiledCheetahTemplate_1540802838_59_18547.py", line 85, in __errorCatcher3
# 
#   File "<string>", line 1, in <module>
# 

Mon Oct 29 11:47:18 2018 - INFO | Exception occured: <class 'cobbler.cexceptions.CX'>
Mon Oct 29 11:47:18 2018 - INFO | Exception value: 'Error templating file, check cobbler.log for more details'
Mon Oct 29 11:47:18 2018 - INFO | Exception Info:
  File "/usr/lib/python2.7/site-packages/cobbler/remote.py", line 1050, in generate_kickstart
    return self.api.generate_kickstart(profile,system)
   File "/usr/lib/python2.7/site-packages/cobbler/api.py", line 680, in generate_kickstart
    return self.kickgen.generate_kickstart_for_profile(profile)
   File "/usr/lib/python2.7/site-packages/cobbler/kickgen.py", line 295, in generate_kickstart_for_profile
    return self.generate_kickstart(profile=g)
   File "/usr/lib/python2.7/site-packages/cobbler/kickgen.py", line 277, in generate_kickstart
    data = self.templar.render(raw_data, meta, None, obj)
   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 215, in render_cheetah
    raise CX("Error templating file, check cobbler.log for more details")


Version-Release number of selected component (if applicable): cobbler-2.8.3-2.fc28.x86_64


How reproducible: always


Steps to Reproduce:
livecd-iso-to-pxeboot CentOS-7-x86_64-LiveGNOME-1708.iso # CentOS ISO here is just for example; error occures on any distro in fact
cobbler distro add --name c74-live --kernel /home/dexpl/tftpboot/vmlinuz0 --initrd /home/dexpl/tftpboot/initrd0.img --kopts 'rootflags=loop root=live:/CentOS-7-x86_64-LiveGNOME-1708.iso rootfstype=auto ro rd.live.image'
cobbler profile add --{name,distro}=c74-live --kickstart /var/lib/cobbler/kickstarts/sample_end.ks --ksmeta 'tree=http://vault.centos.org/7.4.1708/os/x86_64/' # again, sample_end.ks is just for example
cobbler profile getks --name c74-live

Actual results:
an exception mentioned above

Expected results:
a kickstart

Additional info:
1. there's an upstream bug report with a patch which does fix the problem;
2. there's exactly the same problem (and resolution) with EPEL cobbler. Should I create a separate bug report for it?

Comment 1 Vadim Raskhozhev 2018-10-29 09:00:20 UTC
Oops, "External Trackers" were supposed to link at https://github.com/cobbler/cobbler/issues/1918, but something went wrong

Comment 2 Fedora Update System 2018-11-25 18:26:21 UTC
cobbler-2.8.4-2.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-288d5d5b39

Comment 3 Fedora Update System 2018-11-25 18:26:36 UTC
cobbler-2.8.4-2.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2018-43d282dea0

Comment 4 Fedora Update System 2018-11-25 18:26:49 UTC
cobbler-2.8.4-2.fc29 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2018-accec8551d

Comment 5 Fedora Update System 2018-11-26 00:54:12 UTC
cobbler-2.8.4-2.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2018-43d282dea0

Comment 6 Fedora Update System 2018-11-26 01:04:46 UTC
cobbler-2.8.4-2.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-288d5d5b39

Comment 7 Fedora Update System 2018-11-26 02:46:07 UTC
cobbler-2.8.4-2.fc29 has been pushed to the Fedora 29 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-accec8551d

Comment 8 Fedora Update System 2018-11-26 18:57:08 UTC
cobbler-2.8.4-4.fc29 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2018-b93c3a9568

Comment 9 Fedora Update System 2018-11-26 18:57:25 UTC
cobbler-2.8.4-4.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2018-a4f72b6533

Comment 10 Fedora Update System 2018-11-26 18:57:40 UTC
cobbler-2.8.4-4.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-8b57cfb4be

Comment 11 Fedora Update System 2018-11-26 21:10:06 UTC
cobbler-2.8.4-5.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-1d2a79fe1c

Comment 12 Fedora Update System 2018-11-26 21:10:23 UTC
cobbler-2.8.4-5.fc29 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2018-22c609e92a

Comment 13 Fedora Update System 2018-11-27 02:44:02 UTC
cobbler-2.8.4-4.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2018-a4f72b6533

Comment 14 Fedora Update System 2018-11-27 04:28:05 UTC
cobbler-2.8.4-5.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-1d2a79fe1c

Comment 15 Fedora Update System 2018-11-27 05:14:46 UTC
cobbler-2.8.4-5.fc29 has been pushed to the Fedora 29 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-22c609e92a

Comment 16 Fedora Update System 2018-12-05 01:56:53 UTC
cobbler-2.8.4-5.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.

Comment 17 Fedora Update System 2018-12-05 02:35:20 UTC
cobbler-2.8.4-5.fc29 has been pushed to the Fedora 29 stable repository. If problems still persist, please make note of it in this bug report.

Comment 18 Fedora Update System 2018-12-12 00:38:48 UTC
cobbler-2.8.4-4.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report.