Preliminary ESXi support
by James Cammarata
Here's my patch for preliminary ESXi pxe boot support. There's still a lot
that needs to be cleaned up/added to this (for instance, the append line
stuff in pxegen is kind of messy, and possibly incomplete), but overall
it's good to go. One major thing, the copying of all the extra .vgz files
that ESXi uses, needs to be done as a post-sync trigger - or if someone can
confirm the fetch-files stuff works (I may have missed a response to the
earlier email I sent regarding that) it could be built in there when the
distro is generated.
I don't have access to github from work, so it's a text patch for now.
When I get home later, I can upload this to my github account so it'll be
easier to merge and test.
Thoughts, comments, and critiques are welcome as always!
Thanks,
James Cammarata.
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
13 years, 6 months
"Damaged repomd.xml file"
by Jacob Hunt
I have been running cobbler for sometime and I recently started to get the
following when I attempt a reposync.
Here is my configuration:
RHEL 5u5 i686
cobbler-web-2.0.5-1.el5
cobbler-2.0.5-1.el5
Any hints would be greatly apperciated.
cobbler reposync --only=sig-x86
task started: 2010-09-29_153639_reposync
task started (id=Reposync, time=Wed Sep 29 15:36:39 2010)
hello, reposync
run, reposync, run!
creating: /var/www/cobbler/repo_mirror/sig-x86/.origin/sig-x86.repo
running: /usr/bin/reposync -l -m -d
--config=/var/www/cobbler/repo_mirror/sig-x86/.origin/sig-x86.repo
--repoid=sig-x86 --download_path=/var/www/cobbler/repo_mirror -a i686
951 B 00:00
Unable to fetch comps.xml
[sig-x86: 1 of 8 ] Downloading SIGFullStatus-1.0.0-1.noarch.rpm
[sig-x86: 2 of 8 ] Downloading rhgb-0.16.4-9.i386.rpm
[sig-x86: 3 of 8 ] Downloading sig_fxload_rhel5-1.0.1-1.i686.rpm
[sig-x86: 4 of 8 ] Downloading sig_fxload_rhel5-1.0.0-1.i686.rpm
[sig-x86: 5 of 8 ] Downloading
sig_host_configuration_mgr_rhel5-2.4.1-1.i686.rpm
[sig-x86: 6 of 8 ] Downloading
sig_host_installer_rhel5-1.3.1-1.i686.rpm
[sig-x86: 7 of 8 ] Downloading
sig_host_installer_rhel5-1.1.0-1.i686.rpm
[sig-x86: 8 of 8 ] Downloading
sig_swdist_scripts_rhel5-5.4.0-1.i686.rpm
returned: 0
running: /usr/bin/wget -q /repo/sig-x86/repodata/repomd.xml -O
/var/www/cobbler/repo_mirror/sig-x86/.origin/repomd.xml
returned: 1
Exception occured: yum.Errors.RepoMDError
Exception value: Damaged repomd.xml file
Exception Info:
File "/usr/lib/python2.4/site-packages/cobbler/action_reposync.py", line
119, in run
self.sync(repo)
File "/usr/lib/python2.4/site-packages/cobbler/action_reposync.py", line
150, in sync
return self.yum_sync(repo)
File "/usr/lib/python2.4/site-packages/cobbler/action_reposync.py", line
410, in yum_sync
os.path.walk(dest_path, self.createrepo_walker, repo)
File "/usr/lib/python2.4/posixpath.py", line 290, in walk
func(arg, top, names)
File "/usr/lib/python2.4/site-packages/cobbler/action_reposync.py", line
173, in createrepo_walker
rmd = yum.repoMDObject.RepoMD('', "%s/.origin/repomd.xml" % (dirname))
File "/usr/lib/python2.4/site-packages/yum/repoMDObject.py", line 121, in
__init__
raise RepoMDError, "Damaged repomd.xml file"
reposync failed, tries left: 0
reposync failed, retry limit reached, skipping
running: chown -R root:apache /var/www/cobbler/repo_mirror/sig-x86
returned: 0
running: chmod -R 755 /var/www/cobbler/repo_mirror/sig-x86
returned: 0
Exception occured: cobbler.cexceptions.CX
Exception value: 'overall reposync failed, at least one repo failed to
synchronize'
Exception Info:
File "/usr/lib/python2.4/site-packages/cobbler/utils.py", line 123, in die
raise CX(msg)
Exception occured: cobbler.cexceptions.CX
Exception value: 'overall reposync failed, at least one repo failed to
synchronize'
Exception Info:
File "/usr/lib/python2.4/site-packages/cobbler/remote.py", line 95, in run
rc = self._run(self)
File "/usr/lib/python2.4/site-packages/cobbler/remote.py", line 239, in
runner
3), name=name, nofail=True, logger=self.logger)
File "/usr/lib/python2.4/site-packages/cobbler/api.py", line 636, in
reposync
return reposync.run(name)
File "/usr/lib/python2.4/site-packages/cobbler/action_reposync.py", line
135, in run
utils.die(self.logger,"overall reposync failed, at least one repo failed
to synchronize")
File "/usr/lib/python2.4/site-packages/cobbler/utils.py", line 131, in
die
raise CX(msg)
!!! TASK FAILED !!!
13 years, 7 months
[PATCH] Overriding the port for http_server on a per-host basis
by Georgi Georgiev
I posted the mail below to the user mailing list, but I thought I'd send
you the patch for our workaround, to see what you have to say.
To summarize the email, for some hosts we need to override the "server"
to include a port in the string (like 10.68.1.128:10080) and the latest
stable branch is not working for us since commit
236ad1ca9f30012cadf9f55b8acf8b23cc5de673 introduced a
socket.gethostbyname_ex(server).
The following changes since commit 913884606eb813f7b4132db9f08540c81caa676d:
The clean_link_cache method was calling subprocess_call without a logger (2010-07-14 12:19:47 -0400)
are available in the git repository at:
http://github.com/chutzimir/cobbler.git host-port-override/stable
Georgi Georgiev (1):
Do not die when there is a port in the http_server value
cobbler/pxegen.py | 28 +++++++++++++++++++++-------
1 files changed, 21 insertions(+), 7 deletions(-)
The following changes since commit 982b6f55a94a8bcaee8e1e44c02b0e629cf22224:
Fix cobbler check tftp typo. (2010-08-18 16:46:57 -0300)
are available in the git repository at:
http://github.com/chutzimir/cobbler.git host-port-override/master
Georgi Georgiev (1):
Do not die when there is a port in the http_server value
cobbler/pxegen.py | 28 +++++++++++++++++++++-------
1 files changed, 21 insertions(+), 7 deletions(-)
Quoting Georgi Georgiev at 27/09/2010-21:36:53(+0900):
> For a couple of hosts behind a couple of firewalls, we have to override
> both the server and the port that the kickstart should download the RPMs
> from. As these are virtual machines, with 2.0.4 it is quite easy to
> override the "server" value to something like "10.68.1.128:10080" and an
> ssh tunnel at 10.68.1.128 does the rest of the work. This works well,
> because it generates a kickstart string like:
>
> url --url=http://10.68.1.128:10080/cblr/links/Fedora-13-x86_64
>
> The reason this works is that the http_port is ignored (we use the
> default 80) and so the override string fits just fine as a workaround.
>
> However, commit 236ad1ca9f30012cadf9f55b8acf8b23cc5de673 (it is in
> 2.0.5) broke this workaround with the following error halfway through
> "cobbler sync":
>
> Mon Sep 27 17:25:22 2010 - INFO | Exception occured: socket.gaierror
> Mon Sep 27 17:25:22 2010 - INFO | Exception value: (-2, 'Name or service not known')
> Mon Sep 27 17:25:22 2010 - INFO | Exception Info:
> File "/usr/lib/python2.4/site-packages/cobbler/remote.py", line 95, in run
> rc = self._run(self)
> File "/usr/lib/python2.4/site-packages/cobbler/remote.py", line 184, in runner
> return self.remote.api.sync(self.options.get("verbose",False),logger=self.logger)
> File "/usr/lib/python2.4/site-packages/cobbler/api.py", line 610, in sync
> return sync.run()
> File "/usr/lib/python2.4/site-packages/cobbler/action_sync.py", line 122, in run
> self.pxegen.write_all_system_files(x)
> File "/usr/lib/python2.4/site-packages/cobbler/pxegen.py", line 294, in write_all_system_files
> self.write_pxe_file(f2,system,profile,distro,working_arch)
> File "/usr/lib/python2.4/site-packages/cobbler/pxegen.py", line 565, in write_pxe_file
> ipaddress = socket.gethostbyname_ex(blended["http_server"])[2][0]
>
> Obviously, since our "server" includes a port, gethostbyname_ex is
> failing to resolve "10.68.1.128:10080".
>
> I don't mind making the commits myself (both for master and stable) but
> I would like to know what the preferred solution would be. I can think
> of two approaches:
>
> a) Introduce a server_port setting for systems (to complement the
> current "server" override) and we can then set that to 10080.
> b) fix the calls to gethostbyname_ex so they only replace the hostname
> with an IP, and leave anything after a trailing ":" intact
>
> Thoughts?
--
( Georgi Georgiev ( If it happens once, it's a bug. If it (
) Sysadmin Head ) happens twice, it's a feature. If it )
( -SBI Japannext- ( happens more than twice, it's a design (
) ------------------- ) philosophy. )
13 years, 7 months
Cobbler Snippet Exception
by Stan Chan
I have a cobbler instance that is throwing out exceptions trying to output a
system kickstart that includes a single snippet. Anyone have any ideas why
this would occur? The cheetah lib installed is 2.4.3.
# *** 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.6/site-packages/cobbler/templar.py", line
121, in render
# data_out = t.respond()
#
# File "cheetah_DynamicallyCompiledCheetahTemplate_1285571699_18_51035.py",
line 225, in respond
#
# File "cheetah_DynamicallyCompiledCheetahTemplate_1285571699_18_51035.py",
line 77, in __errorCatcher2
#
# File "<string>", line 1, in <module>
#
13 years, 7 months
unable to remove an image from the cobbler repo
by Tom Kleiberg
Hello all,
I am trying to install Western Digital HD tools as a PXE option. I managed to get the iso DOS iso bootable by manually modifying the pxelinux.cfg of one particular host. Essentially is boils down to the following:
label linux
kernel memdisk keeppxe
append initrd=mage2/diag504fcd.iso iso raw
Now i wanted to add this as an image to cobbler. However, this does not seem to work and moreover, I can no longer remove the image from cobbler. When I try to remove the image, I get the following error (see text below). Any idea's on how I can remove the faulty images from cobbler and how to get the DOS PXE working? I am especially interested in how to get the (mandatory) kernel options in place.
many thanks
tom
[naslab@panoramix cobbler]$ cobbler image report --name=diag504fcd
Name : diag504fcd
Architecture : i386
Breed : other
Comment :
File : /tftpboot/images2/diag504fcd.iso
Image Type : memdisk
Kickstart :
Virt NICs : 1
OS Version : other
Owners : ['admin']
Virt Auto Boot : 0
Virt Bridge : xenbr0
Virt CPUs : 1
Virt File Size (GB) : 5
Virt Path :
Virt RAM (MB) : 512
Virt Type : xenpv
[naslab@panoramix cobbler]$ cobbler image remove --name=diag504fcd
### ERROR ###
Unexpected remote error, check the server side logs for further info
exceptions.AttributeError:System instance has no attribute 'lower'
[naslab@panoramix cobbler]$ sudo tail -n40 /var/log/cobbler/cobbler.log
return self.remove_item("system", ref, recursive=recursive, delete=delete, with_triggers=with_triggers, logger=logger)
File "/usr/lib/python2.4/site-packages/cobbler/api.py", line 323, in remove_item
ref = self.get_item(what, ref)
File "/usr/lib/python2.4/site-packages/cobbler/api.py", line 245, in get_item
return self._config.get_items(what).get(name)
File "/usr/lib/python2.4/site-packages/cobbler/collection.py", line 66, in get
return self.listing.get(name.lower(), None)
Tue Sep 28 15:35:00 2010 - DEBUG | REMOTE CLI Authorized; user(?)
Tue Sep 28 15:35:00 2010 - DEBUG | get_item; ['image', 'diag504fcd']
Tue Sep 28 15:35:00 2010 - INFO | REMOTE remove_item (image, recursive=True); user(<DIRECT>); name(diag504fcd)
Tue Sep 28 15:35:00 2010 - DEBUG | REMOTE CLI Authorized; user(?)
Tue Sep 28 15:35:00 2010 - DEBUG | get_item; ['image', 'diag504fcd']
Tue Sep 28 15:35:00 2010 - INFO | remove_item(image); ['diag504fcd']
Tue Sep 28 15:35:00 2010 - DEBUG | get_items; ['image']
Tue Sep 28 15:35:00 2010 - DEBUG | get_item; ['system', <cobbler.item_system.System instance at 0x9195e6c>]
Tue Sep 28 15:35:00 2010 - INFO | Exception occured: exceptions.AttributeError
Tue Sep 28 15:35:00 2010 - INFO | Exception value: System instance has no attribute 'lower'
Tue Sep 28 15:35:00 2010 - INFO | Exception Info:
File "/usr/lib/python2.4/site-packages/cobbler/remote.py", line 1738, in _dispatch
return method_handle(*params)
File "/usr/lib/python2.4/site-packages/cobbler/remote.py", line 848, in xapi_object_edit
self.remove_item(object_type, object_name, token, recursive=True)
File "/usr/lib/python2.4/site-packages/cobbler/remote.py", line 650, in remove_item
return self.api.remove_item(what,name,delete=True,with_triggers=True,recursive=recursive)
File "/usr/lib/python2.4/site-packages/cobbler/api.py", line 327, in remove_item
return self.get_items(what).remove(ref.name, recursive=recursive, with_delete=delete, with_triggers=with_triggers, logger=logger)
File "/usr/lib/python2.4/site-packages/cobbler/collection_images.py", line 59, in remove
self.config.api.remove_system(k, recursive=True, logger=logger)
File "/usr/lib/python2.4/site-packages/cobbler/api.py", line 336, in remove_system
return self.remove_item("system", ref, recursive=recursive, delete=delete, with_triggers=with_triggers, logger=logger)
File "/usr/lib/python2.4/site-packages/cobbler/api.py", line 323, in remove_item
ref = self.get_item(what, ref)
File "/usr/lib/python2.4/site-packages/cobbler/api.py", line 245, in get_item
return self._config.get_items(what).get(name)
File "/usr/lib/python2.4/site-packages/cobbler/collection.py", line 66, in get
return self.listing.get(name.lower(), None)
Tue Sep 28 15:35:17 2010 - INFO | REMOTE get_item(image,diag504fcd); user(?)
Tue Sep 28 15:35:17 2010 - DEBUG | get_item; ['image', 'diag504fcd']
13 years, 7 months
[PATCH] add more valid debian/ubuntu code name
by Kevin Cai
* add debian "squeeze" and ubuntu "karmic", "lucid", "maverick", "natty"
into VALID_OS_VERSION
Change-Id: Ida3bbae2130544af2b7e0c8e56a878c2282c383b
Signed-off-by: Kevin Cai <kevinc(a)mozy.com>
---
cobbler/codes.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/cobbler/codes.py b/cobbler/codes.py
index 3fab5d4..ff2b1c5 100644
--- a/cobbler/codes.py
+++ b/cobbler/codes.py
@@ -43,8 +43,8 @@ VALID_OS_BREEDS = [
VALID_OS_VERSIONS = {
"redhat" : [ "rhel2.1", "rhel3", "rhel4", "rhel5", "rhel6", "fedora5", "fedora6", "fedora7", "fedora8", "fedora9", "fedora10", "fedora11", "fedora12", "fedora13", "fedora14", "generic24", "generic26", "virtio26", "other" ],
"suse" : [ "sles10", "generic24", "generic26", "virtio26", "other" ],
- "debian" : [ "etch", "lenny", "generic24", "generic26", "other" ],
- "ubuntu" : [ "dapper", "hardy", "intrepid", "jaunty" ],
+ "debian" : [ "etch", "lenny", "squeeze", "generic24", "generic26", "other" ],
+ "ubuntu" : [ "dapper", "hardy", "intrepid", "jaunty", "karmic", "lucid", "maverick", "natty" ],
"generic" : [ "generic24", "generic26", "other" ],
"windows" : [ "winxp", "win2k", "win2k3", "vista", "other" ],
"unix" : [ "solaris9", "solaris10", "freebsd6", "openbsd4", "other" ],
--
1.7.2.1
13 years, 7 months
importing CentOS5.5 DVD, error with Xen Kernel distro
by Jamie Duncan
Hi all,
I Just installed Cobbler 2.0 from EPEL (used 1.6 for ages). imported a
CentOS 5.5 x86_64 DVD. When using the normal kernel, it works perfectly.
When using the xen kernel from the DVD, it says it errors: "Could not find
kernel image: /images/CentOS-5.5-xen-x86_64/vmlinuz". But all of the paths
are on the servers and check out.
I've verified the md5sums of the DVD iso and it checks out (mounted the iso
as a loopback).
I've tried removing and reimporting the dvd with multiple names.
The "normal" kernel work just fine. This is only the xen kernel that won't
work.
Can anyone provide some insight?
--
Jamie Duncan
*www.5amsolutions.com* | Software for Life(TM)
p. 866.526.6042 x755
f. 888.577.8855
m. 804.571.0458
13 years, 7 months
Patch kickgen - $yum_repo_stanza using "breed" for distro
by Michael Hoffman
Cobbler Developers,
I'm trying to get some code into cobbler to allow a suse breed to work with
repo stanza. I have made the $yum_repo_stanza work with suse.
With this patch the $yum_repo_stanza will be properly expanded in autoyast
(suse's kickstart equivalent). This will add all of the necessary
repository information for all of the selected repositories a particular
profile/system has selected.
I am not familiar with debian breed and seed files so was unable to complete
the syntax for this distro. Hopefully some one else more familiar with
debian can help contribute to my patch.
This is also my first time creating any type of patch using git, so if there
is a mistake or I have not created the patch correctly please let me know so
that I can properly contribute the code.
I am continuing to try and adapt cobbler to suse breed and hope to be
contributing more to cobbler to allow it to work with other breeds.
Thanks,
--
--
Michael C. Hoffman
13 years, 7 months
Fetchable files question
by James Cammarata
Is this working yet? I don't seem to see any documentation on how it's
supposed to work.
I'm looking at adding ESXi support for importing, and it requires 5 extra
files to be downloaded during the PXE stage from tftp. I was originally
going to configure a post-sync trigger to do this, and then I found this
field, which seems to be similar to the template files stuff but I don't
see it working. Also, in a distro it's a list, but in a profile it's a
hash - is that intentional?
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
13 years, 7 months