Tim French wrote:
It seems that the cobbler kickstart templates are not working.
RH 5.2 2.6.18-92.1.10.el5 #1 SMP
cobbler-1.2.4-1
python-setuptools-0.6c7-1.el5
python-cheetah-2.0.1-1.el5
ls -ltra /var/lib/cobbler/kickstarts/RHEL5.2_server-i386/sample.ks
-rw-r--r-- 1 root root 1187 Sep 25 10:15
/var/lib/cobbler/kickstarts/RHEL5.2_server-i386/sample.ks
I can force the ks file in /var/www/cobbler/
But I have to create new directories and they are removed when I
cobbler sync
cobbler profile edit --name=RHEL5.2_server-i386
--kickstart="/var/lib/cobbler/kickstarts/RHEL5.2_server-i386/sample.ks"
No problem, this is easy to straighten out.
Yes, the code /is/ working but you have some re-configuration to do.
It seems you might have upgraded your cobbler server recently and were
not aware of the changes we made in 1.0, which came out around June.
There was a good amount of information on the mailing list about that
then, though if you just upgraded yes this will be new to you. For
convience I'll post the basics here though you can find more on the
Cobbler Wiki, particularly
https://fedorahosted.org/cobbler/wiki/ModPythonDetails. For users who
just crossed the 1.0 major upgrade boundary, take careful note of files
in /etc/httpd/conf.d -- you'll probably see some .rpmnew files that will
keep systems from kickstarting if you don't move the Apache configs over.
So, what's going on? Since 1.0, cobbler no longer renders kickstart
templates statically, but instead renders them on demand using
mod_python. This is a vastly better system as it means the need for
"cobbler sync" is greatly minimized and things can be updated in real time.
For a historical, The argument to cobbler profile edit, since the first
release of Cobbler, should never be the path of a kickstart file in
/var/www/cobbler, but a template somewhere else on the filesystem.
Cobbler itself owns /var/www/cobbler, and that space is not for user data.
The idea is that cobbler then uses the information stored in the various
distribution, profile, and system objects in cobbler to generate a
kickstart file based on that template. Should you /not/ want to use
templates of course, you can do things like "cobbler profile edit
--name=foo --kickstart=http://someserver/blah.ks" and that still works
-- but templating, the default use, is much more powerful and can
automate a lot of things that go into your kickstarts. A file templating
itself shouldn't have ever worked in previous versions of Cobbler, nor
should you store files of your own in /var/www/cobbler as cobbler owns
that directory. Naturally it will clean it out every time by design, as
that directory is for files supporting that installation. If you ever
want to host your own content, put it in something like /var/www/mystuff.
Anyhow, what you want to do is edit your profile back so it is using a
kickstart template.
cobbler profile edit --name=foo --kickstart=/etc/cobbler/sample.ks
And if you want to look at what that profile will be served up as, it's
simple:
cobbler profile getks --name=foo
That will show the same results as if you visited the magic URL that we
use to serve kickstarts to that system.
Also be mindful of the .rpmnew files I mentioned (see also that
/var/lib/cobbler/settings has been replaced with /etc/cobbler), and then
restart your httpd and cobblerd.
This was a major release of Cobbler and upgrades between subsequent
releases are much more seamless.
--Michael
Timothy French <tim.french(a)utah.edu>
Office of Information Technology, University of Utah
Key fingerprint = 838C F04D AAC8 6D9C 7ED7 2629 925E BF3E 1FD1 826C
This is a bit kludgy, so you might want to rethink why you want to do it.
_______________________________________________
cobbler mailing list
cobbler(a)lists.fedorahosted.org
https://fedorahosted.org/mailman/listinfo/cobbler