Bug 304211 - SNIPPET::a_b_c matches on file a_b (because it exists), causing an error on the remote install machine
Summary: SNIPPET::a_b_c matches on file a_b (because it exists), causing an error on t...
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: cobbler
Version: 7
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Michael DeHaan
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-09-24 22:30 UTC by Jon Hermansen
Modified: 2008-05-14 15:11 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-05-14 14:42:49 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Jon Hermansen 2007-09-24 22:30:48 UTC
Description of problem:
I have two kickstart templates, one for FC6 and above, one for FC5 and below. I
have changed the SNIPPET lines in each kickstart template to provide for
different partitioning schemes (since RHEL4 uses diskdump, and RHEL5 uses kdump
and doesn't need a dedicated partition to dump to).

I used the original partition_select as a template, but forked it off to two
similar filenames, each with their own respective partitioning configuration.
Since the filenames were so similar, my SNIPPET lines matched on the original
snippet and not my customized snippets.

Version-Release number of selected component (if applicable):
[jherm@jherm-fedora ~]$ rpm -qa | grep -i cobbler
revisor-cobbler-2.0.4.1-2.fc7
cobbler-0.6.1-2.fc7
[jherm@jherm-fedora ~]$ rpm -qa | grep -i cheetah
python-cheetah-2.0-0.5.rc8.fc7
[jherm@jherm-fedora ~]$ rpm -qa | grep -i koan
koan-0.6.1-2.fc7

================================================================================

How reproducible:
Everytime

Steps to Reproduce:
1. Copy /var/lib/cobbler/snippets/partition_select to
/var/lib/cobbler/snippets/partition_select_fc6 and make some modification to it
so you can tell it is not included when you sync cobbler.
2. In kickstart_fc6.ks, reference your customized snippet.
3. View the unexpected result in /var/www/cobbler/kickstarts/blahblah/blah.ks
  
Actual results:
In the case of "SNIPPET::a_b_c", cobbler/cheetah matches on file a_b

Expected results:
The variable name does not end until a space (or some other delimiter), and the
true file we want to use is read in.

Additional info:

Comment 1 Jon Hermansen 2007-09-24 22:32:54 UTC
After writing this bug I realize it may also be a bug in Cheetah. I didn't look
at the code. Please reply to my e-mail if you need me to change any information
related to this bug.

Comment 2 Michael DeHaan 2007-10-30 19:33:36 UTC
Thanks, and very sorry for the late response.  This apparently got lost by my
mail filter.  This is a bug in Cobbler, not Cheetah.

As a workaround though, you can just use Cheetah's built-in include function and
specify the full path to the file.  

http://cheetahtemplate.org/docs/users_guide_html/users_guide.html#SECTION000860000000000000000

I may look at making the "SNIPPET" parts automatically get replaced by Cheetah
include directives in the future.   Another alternative would be to just sort
the snippet names so the longest names get replaced first.




Comment 3 Bug Zapper 2008-05-14 14:29:02 UTC
This message is a reminder that Fedora 7 is nearing the end of life. Approximately 30 (thirty) days from now Fedora will stop maintaining and issuing updates for Fedora 7. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as WONTFIX if it remains open with a Fedora 'version' of '7'.

Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version prior to Fedora 7's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that we may not be able to fix it before Fedora 7 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora please change the 'version' of this bug. If you are unable to change the version, please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete. If possible, it is recommended that you try the newest available Fedora distribution to see if your bug still exists.

Please read the Release Notes for the newest Fedora distribution to make sure it will meet your needs:
http://docs.fedoraproject.org/release-notes/

The process we are following is described here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 4 Michael DeHaan 2008-05-14 14:42:49 UTC
This one got lost in bugzilla.  My apologies.  

I'll reopen this here in Trac and verify that it is no longer a problem, and if
it's still there, I'll fix this for the next release.

https://fedorahosted.org/cobbler/ticket/138

Comment 5 Michael DeHaan 2008-05-14 15:11:47 UTC
Ok, I looked over 0.9.X/1.0's code (the devel branch in git) and that uses a
different system for replacing snippets and does not have this problem.

So this is fixed upstream and will be included in the 1.0 release.

Thanks!


Note You need to log in before you can comment on or make changes to this bug.