yum upgrade to 1.2.6-1.el5
by Harry Hoffman
Just upgraded to the latest cobbler from epel-testing... the
post-install script fails :-(
Updating : cobbler ####################### [ 5/10]
profile CentOS-5.2-x86_64 not found, inheritance not possible
Stopping cobbler daemon: [ OK ]
Starting cobbler daemon: Traceback (most recent call last):
File "/usr/bin/cobblerd", line 32, in ?
api = bootapi.BootAPI()
File "/usr/lib/python2.4/site-packages/cobbler/api.py", line 90, in
__init__
self.deserialize()
File "/usr/lib/python2.4/site-packages/cobbler/api.py", line 448, in
deserialize
return self._config.deserialize()
File "/usr/lib/python2.4/site-packages/cobbler/config.py", line 186,
in deserialize
serializer.deserialize(self._profiles)
File "/usr/lib/python2.4/site-packages/cobbler/serializer.py", line
125, in deserialize
rc = storage_module.deserialize(obj,topological)
File
"/usr/lib/python2.4/site-packages/cobbler/modules/serializer_yaml.py",
line 136, in deserialize
obj.from_datastruct(datastruct)
File "/usr/lib/python2.4/site-packages/cobbler/collection.py", line
144, in from_datastruct
item = self.factory_produce(self.config,seed_data)
File
"/usr/lib/python2.4/site-packages/cobbler/collection_profiles.py", line
41, in factory_produce
return profile.Profile(config).from_datastruct(seed_data)
File "/usr/lib/python2.4/site-packages/cobbler/item_profile.py", line
87, in from_datastruct
self.set_parent(self.parent)
File "/usr/lib/python2.4/site-packages/cobbler/item_profile.py", line
131, in set_parent
raise CX(_("profile %s not found, inheritance not possible") %
parent_name)
cobbler.cexceptions.CX: 'profile CentOS-5.2-x86_64 not found,
inheritance not possible'
[FAILED]
error: %post(cobbler-1.2.6-1.el5.noarch) scriptlet failed, exit status 1
Any ideas?
Cheers,
Harry
14 years, 8 months
Re: ris-linux review pending
by Jeroen van Meeuwen
James Cammarata wrote:
> Do you know if all of the windows pxe boot files have to be in the root
> directory of the tftp server? I would like to create subdirectories like
> this:
>
> /tftpboot/ris/profiles/$profile_name/startrom.n12 -> /tftpboot/winxp.0
> /NTLDR -> /tftpboot/XPLDR
> /winnt.sif
> /winxp ->
> /var/www/cobbler/ks_mirror/winxp
>
> And then the pxeboot line would be:
>
> label winxp
> kernel ris/profiles/$profile_name/startrom.n12
>
> label xpsystem1
> kernel ris/systems/$system_name/startrom.n12
>
You can't. startrom will look for a file in the TFTP root; unless you
rewrite the location with tftpd.rules (or the like), it needs to be in
the TFTP root.
That said, when going down the rewrite road to have Windows pick up the
appropriate file(s), it needs to ask for different files to begin with
or the rewrite will cause it to pick up the same file after all.
That said, you can sed -i -e 's/winnt.sif/12345.sif/g' NTLDR to specify
an alternative to "winnt.sif". As such, you can have profiles based on
these three files:
startrom.n12 which points to NTDLR,
NTLDR which points to winnt.sif,
and winnt.sif
Note how the latter two contain 5 chars (excluding the .sif suffix), and
the name of startrom.n12 really doesn't matter.
You could create a:
xp321.0 from startrom.n12,
sed -i -e 's/NTLDR/xp321/g' xp321.0
xp321 from NTLDR,
sed -i -e 's/winnt.sif/xp321.sif/g' xp321
create a xp321.sif file
Note that in this case I use Windows _XP_ _32_-bit Profile #_1_ as the
five chars to use, but those are up to you.
bootfont.bin, ntdetwxp.x86 can just live in the TFTP root since they can
be shared and do not refer to other files.
Now, creating a Cobbler profile or system can grab the originals, copy
them anywhere, replace whatever they want to replace, and as such create
"a unique" unattended installation. With unique filenames per profile
however, you would not necessarily need to create a subdirectory in the
TFTP root however it gets messy fast, so creating one subdirectory
entirely managed by Cobbler probably makes the most sense, provided a
rewrite rule for TFTP.
I'm working on some more documentation about this and more different
Windows unattended installations over the network / using PXE on
http://www.kanarip.com/courses/ClassRoomManual-WindowsInstallationsOverTh...
> The problem will arise if Windows expects the winnt.sif file to be in the
> root of the tftp server, and not in the same directory as the startrom.n12
> file. We may be able to get around this by adding a rewrite rule for tftp
> (as part of the cobbler sync process the rules file would be regenerated
> and tftpd would be HUP'd), so that it hides the fact that things are not
> all in the tftp root.
>
re-writing "/winnt.sif" to anything else will always cause you to
eventually end up with the same file, just from a different location.
> Doing it this way, we will be able to have custom .sif's for each
> system/profile that is created. Otherwise, we will have to come up with
> some way to modify the binaries in a unique way for each system, which I
> really don't want.
Modifying binaries is all you can do when all you get is binaries.
For systems (and profiles), referring to one or the other startrom.n12
file would suffice to differentiate. The NTLDR and .sif used from that
point can be set with a simple sed command like the few in my examples.
This of course could also be done on-the-fly, possibly by Cobbler.
Note that for Windows XP, using the startrom.n12 from Windows 2003 is
basically your only option or it won't ever find txtsetup.sif although
the error message will be garbled beyond recognition.
The entire profile/system directory may be a link to
> another folder somewhere in /var/www/cobbler, just for cleanliness reasons.
>
in.tftpd does not handle links very well.
Kind regards,
Jeroen van Meeuwen
-kanarip
15 years, 2 months
ris-linux review pending
by Jeroen van Meeuwen
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
It would mean a great deal for me if someone would be able to pick up
the review of "ris-linux", currently pending at
https://bugzilla.redhat.com/show_bug.cgi?id=469052
This would enable us to make a step forward in the process of
integrating Cobbler and provisioning that-other-operating-system. I have
it up and running of course, but having it properly packaged means other
people get to play with it, too.
Kind regards,
Jeroen van Meeuwen
- -kanarip
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
iEYEARECAAYFAkk4KnAACgkQKN6f2pNCvwjeSwCgs2vFfBPTl7oMelgH60B4G+GK
meIAoM1zPaAKPenXAH1TpRPM/FWpb7X6
=f95A
-----END PGP SIGNATURE-----
15 years, 3 months
autodiscovery questions
by Vreman, Peter
I want to add an autodiscovery feature. I have some questions how to start:
- What kind of initrd shall be used?
o Use livecd-tools to build the initrd+kernel from Fedora/RHEL/CentOS?
* Minimum size is 150MB
* Easy to maintain and regenerate
o Create a small busy-box initrd+kernel
* Minimum size is 20MB
* Harder to understand
* Requires more indepth linux knowledge
- Which API to use?
o HTTP services?
o XMLRPC read/write API? (listens currently only on localhost)
- Instead of creating something new extend koan with a new --discover function?
Regards,
Peter
This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.
15 years, 3 months
[PATCH] Provides validation for the image file argument.
by Darryl L. Pierce
A file must have minimally a path and filename.
If a file contains authentication information then it must also have a
hostname.
Paths must be absolute.
If the file includes a protocol then that is dropped.
Signed-off-by: Darryl L. Pierce <dpierce(a)redhat.com>
---
cobbler/item_image.py | 29 +++++++++++++++++++++++++----
1 files changed, 25 insertions(+), 4 deletions(-)
diff --git a/cobbler/item_image.py b/cobbler/item_image.py
index 98e0255..481951d 100644
--- a/cobbler/item_image.py
+++ b/cobbler/item_image.py
@@ -113,11 +113,32 @@ class Image(item.Item):
def set_file(self,filename):
"""
Stores the image location. This should be accessible on all nodes
- that need to access it. Format: either /mnt/commonpath/foo.iso or
- nfs://host/path/foo.iso
+ that need to access it. Format: can be one of the following:
+ * username:password@hostname:/path/to/the/filename.ext
+ * username@hostname:/path/to/the/filename.ext
+ * hostname:/path/to/the/filename.ext
+ * /path/to/the/filename.ext
"""
- # FIXME: this should accept NFS paths or filesystem paths
- self.file = filename
+ uri = ""
+ auth = hostname = path = ""
+ # we'll discard the protocol if it's supplied, for legacy support
+ if filename.find("://") != -1:
+ ignored, uri = filename.split("://")
+ filename = uri
+ else:
+ uri = filename
+
+ if filename.find("@") != -1: auth, filename = filename.split("@")
+ if filename.find(":") != -1: hostname, filename = filename.split(":")
+ # raise an exception if we don't have a valid path
+ if filename[0] != '/': raise CX(_("file contains an invalid path"))
+ if filename.find("/") != -1: path, filename = filename.rsplit("/", 1)
+
+ if len(filename) == 0: raise CX(_("missing filename"))
+ if len(auth) > 0 and len(hostname) == 0:
+ raise CX(_("a hostname must be specified with authentication details"))
+
+ self.file = uri
return True
def set_os_version(self,os_version):
--
1.6.0.6
15 years, 3 months
including the parents' kickstart file
by Axel Thimm
Hi,
anaconda has an %include directive, but that only works for local
files. The usual trick is to %pre a wget and %include it later on. But
that doesn't work if the parent kickstart file is the one defining the
base parameters like which URL to install from etc.
Also %including a prerendered kickstart file isn't really cobbler
style, the variables could have changed and the included rendered file
would reflect the old settings of the parent profile.
As a workaround I'm doing the following on top of every kickstart file:
#if $getVar("ksparent","") != ""
#include $ksparent
#end if
But ksparent needs to be provided and I'm using the poor man's API as
ksparent=`cobbler profile dumpvars --name=Parent | grep "^ 'kickstart':" | sed -e"s| 'kickstart': '\(.*\)',$|\1|"`
...
cobbler profile add [...] --inherit=Parent --ksmeta="ksparent=$ksparent" [...]
It would be nice if ksparent could be set automatically by cobbler and
if a simple scriplet like
$ cat /var/lib/cobbler/snippets/include_parent
#if $getVar("ksparent","") != ""
#include $ksparent
#end if
would be referenced on all sample kickstart files as
$SNIPPET('include_parent')
Thanks!
--
Axel.Thimm at ATrpms.net
15 years, 3 months
issue with make devinstall
by Henry Kemp
I've just tried doing a 'git pull && make devinstall' and its failing
on copying 'webui_templates/system_netboot.tmpl' that's referenced in
setup.py but doesn't seem to exist in my git tree.
# git pull && make devinstall
[...snipped...]
copying webui_templates/empty.tmpl -> /usr/share/cobbler/webui_templates
copying webui_templates/blank.tmpl -> /usr/share/cobbler/webui_templates
copying webui_templates/enoaccess.tmpl -> /usr/share/cobbler/webui_templates
copying webui_templates/distro_list.tmpl ->
/usr/share/cobbler/webui_templates
copying webui_templates/distro_edit.tmpl ->
/usr/share/cobbler/webui_templates
copying webui_templates/profile_list.tmpl ->
/usr/share/cobbler/webui_templates
copying webui_templates/profile_edit.tmpl ->
/usr/share/cobbler/webui_templates
copying webui_templates/system_list.tmpl ->
/usr/share/cobbler/webui_templates
error: can't copy 'webui_templates/system_netboot.tmpl': doesn't exist
or not a regular file
make[1]: *** [install] Error 1
make[1]: Leaving directory `/root/cobbler'
make: *** [devinstall] Error 2
Thanks!
Henry
15 years, 3 months
cobbler import of a repo with only noarch packages in it
by Perry Myers
I'm trying to do a cobbler import of a directory structure that only has
noarch packages in it. I'm using the import to create a minimal pxe boot
environment without needing to mirror all of the packages (we just use
external repos for the packages)
However, when I try to do a cobbler import of a directory structure that
only contains noarch packages I get the following error:
> + cobbler import --name=Fedora-10 --arch=x86_64 --path=/var/www/cobbler/ks_mirror/Fedora-10-x86_64
> sending incremental file list
>
> sent 392 bytes received 16 bytes 816.00 bytes/sec
> total size is 134808812 speedup is 330413.75
> Given arch (x86_64) not found on imported tree /var/www/cobbler/ks_mirror/Fedora-10-x86_64/Packages
>
> - rsync -a '/var/www/cobbler/ks_mirror/Fedora-10-x86_64/' /var/www/cobbler/ks_mirror/Fedora-10-x86_64 --exclude-from=/etc/cobbler/rsync.exclude --progress
> ---------------- (adding distros)
> - found content (breed=redhat) at /var/www/cobbler/ks_mirror/Fedora-10-x86_64/images/pxeboot
I know in the past we were able to import a directory structure with only
noarch packages and still specify an arch (x86_64 or i386) and it didn't
fail like above. Is this a recent change or restriction? Should we just
add a single arch specific package to the directory structure to get
around this?
Thanks,
Perry
--
|=- Red Hat, Engineering, Emerging Technologies, Boston -=|
|=- Email: pmyers(a)redhat.com -=|
|=- Office: +1 412 474 3552 Mobile: +1 703 362 9622 -=|
|=- GnuPG: E65E4F3D 88F9 F1C9 C2F3 1303 01FE 817C C5D2 8B91 E65E 4F3D -=|
15 years, 3 months
Help with looping in 1.4
by D. Christopher Dale
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I am trying to auto generate my host file for a grid deployment.
The following works well if I actually put a number in the of the for
loop. I have tried quite a few variations on this theme but cannot seem
to identify a working solution. Any ideas?
b_grid=$grid
let b_grid_size=$grid_size
let b_final_oct=$first_grid_node_final_oct
let b_grid_size=$grid_size
b_pub_sub_net=$pub_sub_net
b_priv_sub_net=$priv_sub_net
#for $cur_node in $range( $b_grid_size )
let b_vip=$b_final_oct+20
awk -v pub_sub_net="$b_pub_sub_net" -v cur_oct="$b_final_oct" -v
grid="$b_grid" -v cur_node="$cur_node" 'BEGIN {printf("%s%s
%s%02s.%s.gesi %s%02s\n", pub_sub_net, cur_oct, grid, cur_node, grid,
grid, cur_node)}' >> /etc/hosts
awk -v pub_sub_net="$b_pub_sub_net" -v grid="$b_grid" -v vip="$b_vip"
- -v cur_node="$cur_node" 'BEGIN {printf("%s%s %s%02s-vip\n",
pub_sub_net, vip, grid, cur_node)}' >> /etc/hosts
awk -v priv_sub_net="$b_priv_sub_net" -v grid="$b_grid" -v
cur_oct="$b_final_oct" -v cur_node="$cur_node" 'BEGIN {printf("%s%s
%s%02s-priv\n", priv_sub_net, cur_oct, grid, cur_node)}' >> /etc/hosts
let b_final_oct+=1
#end for
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org
iEUEARECAAYFAklbfd4ACgkQsGBgRqdy/C3tkACYsM72jTHF0i6kte+BI9B2/I6X
OQCcCdEULdkfgwSB5uNmLNzjqX+Wh4U=
=E9+R
-----END PGP SIGNATURE-----
15 years, 3 months
Cobbler sync very slow, timing out with multiple interfaces
by Chris Weaver
I am working with the bonded interfaces option for 1.4. For one server it
works great, I can add two bonded interfaces and a couple of non-bonded
ones. Everything comes up rosy.
However cobbler sync is taking about 8 seconds when I have one interface,
and about 20 seconds with six. I add another system with another 6
interfaces, it takes 3 minutes and times out. If I delete an interface from
each system, sync takes around 2 minutes but at least it succeeds. It is
definitely related to dhcp since if I disable that in settings, sync comes
back right away.
This is the error I get (after 3 minutes):
ng00ud01# cobbler sync
join() is too long for a Python string
File "/usr/lib/python2.3/site-packages/cobbler/cobbler.py", line 83, in
main
rc = BootCLI().run(sys.argv)
File "/usr/lib/python2.3/site-packages/cobbler/cobbler.py", line 61, in
run
return self.loader.run(args)
File "/usr/lib/python2.3/site-packages/cobbler/commands.py", line 122, in
run
return fn.run()
File "/usr/lib/python2.3/site-packages/cobbler/modules/cli_misc.py", line
183, in run
return self.api.sync()
File "/usr/lib/python2.3/site-packages/cobbler/api.py", line 523, in sync
return sync.run()
File "/usr/lib/python2.3/site-packages/cobbler/action_sync.py", line 101,
in run
self.dhcp.write_dhcp_file()
File "/usr/lib/python2.3/site-packages/cobbler/modules/manage_isc.py",
line 262, in write_dhcp_file
self.templar.render(template_data, metadata, settings_file, None)
File "/usr/lib/python2.3/site-packages/cobbler/templar.py", line 133, in
render
data_out = data_out.replace("@@%s@@" % str(x),
str(search_table[str(x)]))
Any ideas?? TIA...
--
... Chris Weaver
15 years, 3 months