RE: [et-mgmt-tools] Cobbler - Templating not working?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Well, I do have another question (now that you ask.)

The cobbler sync command did build the ks.cfg file in the
kickstarts_sys/MAC_ADDRESS/ dir, but the pxelinux.cfg/MAC_ADDRESS
file has the following ks option: 
ks=http://kickstart/cobbler/kickstarts/base_test/ks.cfg

I would have expected to see a ks url that looked more like:
ks=http://kickstart/cobbler/kickstarts_sys/MAC_ADDRESS/ks.cfg

Am I still missing something?

Thanks again for all your help.

--Tim

> -----Original Message-----
> From: Michael DeHaan [mailto:mdehaan@xxxxxxxxxx]
> Sent: Wednesday, October 25, 2006 12:43 PM
> To: Foreman, Tim
> Cc: 'et-mgmt-tools@xxxxxxxxxx'
> Subject: Re: [et-mgmt-tools] Cobbler - Templating not working?
> 
> 
> Foreman, Tim wrote:
> > Ah ha!
> >
> > I was looking in the kickstarts dir, not the kickstarts_sys dir!
> >
> > Thank you very much, it appears to be working fine now.
> >
> > --Tim
> >   
> Great.   Just to confirm -- cobbler & koan both are 
> relatively sane in 
> mercurial now, and I should be releasing this fix to Fedora 
> later today.
> 
> Appreciate the report!   If you have any other problems/questions (or 
> feature requests), let me know.  I'd be especially interested 
> if there's 
> something that's not especially clear in the manpages from 
> your point of 
> view (templating or otherwise).
> 
> --Michael.
> 
> >   
> >> -----Original Message-----
> >> From: Michael DeHaan [mailto:mdehaan@xxxxxxxxxx]
> >> Sent: Wednesday, October 25, 2006 11:44 AM
> >> To: Foreman, Tim
> >> Cc: 'et-mgmt-tools@xxxxxxxxxx'
> >> Subject: Re: [et-mgmt-tools] Cobbler - Templating not working?
> >>
> >>
> >> Foreman, Tim wrote:
> >>     
> >>> Hmm. I applied this patch and now it doesn't seem to
> >>> be replacing the TEMPLATE::env line at all.
> >>>
> >>> --Tim
> >>>
> >>>   
> >>>       
> >> Hmm, works for me.
> >>
> >> Just to confirm, did you apply this to the python file living in 
> >> /var/lib/python$version/site-packages or a source checkout?  
> >>
> >> If it's a source checkout, you'll need to do the make & rpm --Uvh 
> >> cobbler*.noarch.rpm --force bit to make those changes get 
> installed.  
> >> Also you'll have to re-run "cobbler sync" once this is done to 
> >> regenerate the kickstarts. 
> >>
> >> Furthermore, there are two locations where kickstarts get 
> thrown in 
> >> /var/www/cobbler -- this is probably what's causing the 
> confusion.  
> >> There's a kickstarts and a kickstarts_sys.   For profiles, 
> you'll see 
> >> the kickstart in "kickstarts", and since ksmeta is attached to the 
> >> system, not the profile, it will look unchanged in 
> "kickstarts".  It 
> >> should be replaced correctly under "kickstarts_sys".    
> The PXE setup 
> >> will set this all appropriately and will point to the right one.
> >>
> >> There is a possibility I still have something wrong though, 
> >> but I think 
> >> it looks right.   If you can check that and are still having 
> >> problems, 
> >> let me know, and we'll figure it out.
> >>
> >> Thanks,
> >>
> >> Michael
> >>     
> >>>> -----Original Message-----
> >>>> From: Michael DeHaan [mailto:mdehaan@xxxxxxxxxx]
> >>>> Sent: Wednesday, October 25, 2006 11:06 AM
> >>>> To: Foreman, Tim
> >>>> Cc: 'et-mgmt-tools@xxxxxxxxxx'
> >>>> Subject: Re: [et-mgmt-tools] Cobbler - Templating not working?
> >>>>
> >>>>
> >>>> Tim,
> >>>>
> >>>> Yes, you've found a bug.
> >>>>
> >>>> Here's the fix:
> >>>>
> >>>> diff -r 25f009106e21 cobbler/action_sync.py
> >>>> --- a/cobbler/action_sync.py    Wed Oct 25 11:36:47 2006 -0400
> >>>> +++ b/cobbler/action_sync.py    Wed Oct 25 12:02:44 2006 -0400
> >>>> @@ -323,7 +323,8 @@ class BootSync:
> >>>>          data = fd.read()
> >>>>          fd.close()
> >>>>          for x in metadata.keys():
> >>>> -            data = data.replace("TEMPLATE::%s" % x, metadata[x])
> >>>> +            if x != "":
> >>>> +               data = data.replace("TEMPLATE::%s" % x, 
> >>>>         
> >> metadata[x])
> >>     
> >>>>          fd = open(out_path, "w+")
> >>>>          fd.write(data)
> >>>>          fd.close()
> >>>>
> >>>>
> >>>> I've gone ahead and pushed this upstream (to the public 
> mercurial 
> >>>> repository) along with some other things I've been working on 
> >>>> (which may 
> >>>> be a bit unstable).   If you like, you can try pulling 
> from there 
> >>>> (though today it's probably not the stablest thing in 
> >>>> existance), or you 
> >>>> can just apply the patch yourself.
> >>>>
> >>>> Thanks,
> >>>>
> >>>> Michael
> >>>>
> >>>> Foreman, Tim wrote:
> >>>>     
> >>>>         
> >>>>> I have installed Cobbler and am trying to get the kickstart 
> >>>>>       
> >>>>>           
> >>>> templating
> >>>>     
> >>>>         
> >>>>> to work with no success.
> >>>>>
> >>>>> I have added a line to my kickstart template that look 
> like this:
> >>>>>
> >>>>> INSTALL_ENV=TEMPLATE::env
> >>>>>
> >>>>> Then I setup my distro like this:
> >>>>>
> >>>>> cobbler distro add --name=rhel4u4 \
> >>>>> --kernel=/var/www/html/kickstart/rhel4u4/i386/isolinux/vmlinuz \
> >>>>> 
> --initrd=/var/www/html/kickstart/rhel4u4/i386/isolinux/initrd.img
> >>>>>
> >>>>> I created a profile like this:
> >>>>>
> >>>>> cobbler profile add --name=base_test --distro=rhel4u4 \
> >>>>> --kickstart=/etc/cobbler/ks4_base.cfg
> >>>>>
> >>>>> And then I added a system like this:
> >>>>>
> >>>>> cobbler system add --name=00:15:60:A7:6E:56 
> --profile=base_test \
> >>>>> --ksmeta="env=mtc"
> >>>>>
> >>>>> After the cobbler sync command, the kickstart file that 
> is created
> >>>>> has the line:
> >>>>>
> >>>>> INSTALL_ENV=env
> >>>>>
> >>>>> Am I doing something wrong, or is the templating not working for
> >>>>> some reason?
> >>>>>
> >>>>> Thanks for any help.
> >>>>> --
> >>>>> Timothy W. Foreman ~ Security Administrator ~ tforeman@xxxxxxxxx
> >>>>> (651) 365-4181     ~ Internet Broadcasting  ~ www.ibsys.com
> >>>>> --
> >>>>> The Onion: Have you decided what you want to be when 
> you grow up?
> >>>>> Berkeley Breathed: Dad. The rest is frosting.
> >>>>>
> >>>>> _______________________________________________
> >>>>> et-mgmt-tools mailing list
> >>>>> et-mgmt-tools@xxxxxxxxxx
> >>>>> https://www.redhat.com/mailman/listinfo/et-mgmt-tools
> >>>>>   
> >>>>>       
> >>>>>           
> 


[Index of Archives]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux