#cobbler-devel IRC channel
by Michael DeHaan
#cobbler was getting pretty busy, so I've decided to create a
#cobbler-devel on irc.freenode.net for topics that aren't about user
support & Q/A.
We'll use this to discuss 1.8, new developments, and scary technical bits.
It should make the scrollback a bit easier to read too.
--Michael
15 years, 1 month
Bug in collection_distro.py?
by James Cammarata
Ok, i'm a little confused as to a section of code in collection_distro.py.
Starting at line 58 (of the version in devel):
if obj is not None:
kernel = obj.kernel
if recursive:
kids = obj.get_children()
for k in kids:
self.config.api.remove_profile(k, recursive=recursive,
delete=with_delete, with_triggers=with_triggers)
if with_delete:
if with_triggers:
self._run_triggers(self.config.api, obj,
"/var/lib/cobbler/triggers/delete/distro/pre/*")
if with_sync:
lite_sync = action_litesync.BootLiteSync(self.config)
lite_sync.remove_single_profile(name)
del self.listing[name]
self.config.serialize_delete(self, obj)
Why is this code calling lite_sync.remove_single_profile(), shouldn't it be
calling remove_single_distro()?
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
15 years, 1 month
[PATCH] KOAN: /etc/xen/auto symlink option for xen deployments
by Adam Rosenwald
This proposed patch for koan allows one to create a symlink from
/etc/xen/<system> to /etc/xen/auto/<system>, a common post deployment
task for admins.
Example: koan -s <server> -y <system> ... [-x|--create-symlink]
The patch is based on the latest koan git commit
(e6db4239a5ad1596c5b9d87d5669f70694773198).
=====
app.py
=====
--- app.py 2009-03-18 23:59:58.000000000 +0000
+++ /home/arosenwald/koan/koan/app.py 2009-03-18 23:44:01.000000000 +0000
@@ -138,6 +138,10 @@
action="store_true",
dest="no_gfx",
help="disable Xen graphics (xenpv,xenfv)")
+ p.add_option("-x", "--create-symlink",
+ action="store_true",
+ dest="create_symlink",
+ help="create /etc/xen/auto symlinks (for autoboot)")
p.add_option("", "--add-reinstall-entry",
dest="add_reinstall_entry",
action="store_true",
@@ -180,6 +184,7 @@
k.use_kexec = options.use_kexec
k.should_poll = options.should_poll
k.embed_kickstart = options.embed_kickstart
+ k.create_symlink = options.create_symlink
if options.virt_name is not None:
k.virt_name = options.virt_name
@@ -1071,6 +1076,10 @@
else:
raise InfoException("internal error, bad virt state")
+ if self.create_symlink:
+ utils.create_symlink(virtname)
+ else:
+ raise InfoException("cannot create /etc/xen/auto/%s
symlink. please check permissions and ownership of /etc/xen/auto." %
virtname)
return results
#---------------------------------------------------
=====
utils.py
=====
--- utils.py 2009-03-18 23:59:58.000000000 +0000
+++ /home/arosenwald/koan/koan/utils.py 2009-03-18 23:59:39.000000000
+0000
@@ -377,6 +377,19 @@
return server
raise InfoException ("Could not find Cobbler.")
+def create_symlink(name):
+ """
+ Create an /etc/xen/auto/<name> symlink for use with "xendomains"-style
+ VM boot upon dom0 reboot.
+ """
+ src = "/etc/xen/%s" % name
+ dst = "/etc/xen/auto/%s" % name
+
+ # check that xen config file exists and create symlink
+ if os.path.exists(src) and os.access(os.path.dirname(dst), os.W_OK):
+ os.symlink(src, dst)
+ else:
+ raise InfoException("Could not create /etc/xen/auto/%s
symlink. Please check write permissions and ownership" % name)
class ServerProxy(xmlrpclib.ServerProxy):
15 years, 1 month
Re: Creating non-standard interfaces
by Robert Lazzurs
Thinking about this in terms of what is 'really' there...
The power control interface is just an entry of what address to connect to
for controlling the power for a system so it should not be in there and I
don't think we should be taking DHCP information from there, this seems
'unclean'.
However the DRAC and iLO cards are network interfaces on the systems from a
hardware point of view so either these should be treated as systems them
selfs or as network interfaces of the parent system. Now this is what I am
doing at the moment because I figured in the future cobbler could host
'images' for upgrading devices like these, switches or routers lets say.
This makes a lot of sense to me and fits in the current model, what do other
people think?
Take care.
On 17 Mar 2009, 9:44 PM, "Michael DeHaan" <mdehaan(a)redhat.com> wrote:
James Cammarata wrote: > On Tue, 17 Mar 2009 21:16:00 +0000, Robert Lazzurs
<rob(a)lazzurs.net> wrote:...
Let's perhaps think about the CLI for --ksmeta instead. Should
--in-place just be the default or do we need something different?
This may solve it without architectural or migrational problems.
--Michael
_______________________________________________ cobbler-devel mailing list
cobbler-devel@lists.fed...
15 years, 1 month
web interface error
by Tiago Bitarelli
Hail,
I installed compiled and installed cobbler from srcrpm version
1.6.0-1(I know its a test version). It was all working fine but I
added a system and the cobbler web "system list" option started giving
me an error as follows:
---
Mod_python error: "PythonHandler index"
Traceback (most recent call last):
File "/usr/lib/python2.4/site-packages/mod_python/apache.py", line
299, in HandlerDispatch
result = object(req)
File "/var/www/cobbler/web/index.py", line 130, in handler
content = func( **form )
File "/usr/lib/python2.4/site-packages/cobbler/webui/CobblerWeb.py",
line 404, in system_list
(page, results_per_page, pages) =
self.__compute_pagination(page,limit,"system")
File "/usr/lib/python2.4/site-packages/cobbler/webui/CobblerWeb.py",
line 376, in __compute_pagination
total_size = self.remote.get_size(collection_type)
File "/usr/lib/python2.4/xmlrpclib.py", line 1096, in __call__
return self.__send(self.__name, args)
File "/usr/lib/python2.4/xmlrpclib.py", line 1383, in __request
verbose=self.__verbose
File "/usr/lib/python2.4/xmlrpclib.py", line 1147, in request
return self._parse_response(h.getfile(), sock)
File "/usr/lib/python2.4/xmlrpclib.py", line 1286, in _parse_response
return u.close()
File "/usr/lib/python2.4/xmlrpclib.py", line 744, in close
raise Fault(**self._stack[0])
Fault:
---
If I remove all the systems though the command line(cobbler system
remove...) the page works OK(listing no system). But them once I add
another system it stops working again.
Follows a "cobbler report":
---
[root@lyon cobbler]# cobbler report
distro : RHEL5-i386
architecture : i386
breed : redhat
created : Sun Mar 8 21:23:28 2009
comment : rhel5.1
initrd :
/var/www/cobbler/ks_mirror/RHEL5/images/pxeboot/initrd.img
kernel : /var/www/cobbler/ks_mirror/RHEL5/images/pxeboot/vmlinuz
kernel options : {}
ks metadata : {'tree': 'http://@@http_server@@/cblr/links/RHEL5-i386'}
tree build time : Wed Oct 17 18:16:53 2007
modified : Sun Mar 8 21:27:27 2009
mgmt classes : []
os version : rhel5
owners : ['admin']
post kernel options : {}
redhat mgmt key : <<inherit>>
redhat mgmt server : <<inherit>>
template files : {}
distro : RHEL5-xen-i386
architecture : i386
breed : redhat
created : Sun Mar 8 21:23:28 2009
comment : rhel5.1
initrd : /var/www/cobbler/ks_mirror/RHEL5/images/xen/initrd.img
kernel : /var/www/cobbler/ks_mirror/RHEL5/images/xen/vmlinuz
kernel options : {}
ks metadata : {'tree':
'http://@@http_server@@/cblr/links/RHEL5-xen-i386'}
tree build time : Wed Oct 17 18:16:53 2007
modified : Sun Mar 8 21:27:27 2009
mgmt classes : []
os version : rhel5
owners : ['admin']
post kernel options : {}
redhat mgmt key : <<inherit>>
redhat mgmt server : <<inherit>>
template files : {}
profile : RHEL5-i386
distro : RHEL5-i386
comment :
created : Sun Mar 8 21:23:28 2009
dhcp tag : default
enable menu : True
kernel options : {}
kickstart : /var/lib/cobbler/kickstarts/cordoba-v1.ks
ks metadata : {}
mgmt classes : []
modified : Mon Mar 9 14:16:27 2009
name servers : []
name servers search : []
owners : ['admin']
post kernel options : {}
redhat mgmt key : <<inherit>>
redhat mgmt server : <<inherit>>
repos : []
server : <<inherit>>
template_files : {}
virt bridge : xenbr0
virt cpus : 1
virt file size : 5
virt path :
virt ram : 512
virt type : qemu
profile : RHEL5-xen-i386
distro : RHEL5-xen-i386
comment :
created : Sun Mar 8 21:23:28 2009
dhcp tag : default
enable menu : True
kernel options : {}
kickstart : /var/lib/cobbler/kickstarts/sample.ks
ks metadata : {}
mgmt classes : []
modified : Sun Mar 8 21:23:28 2009
name servers : []
name servers search : []
owners : ['admin']
post kernel options : {}
redhat mgmt key : <<inherit>>
redhat mgmt server : <<inherit>>
repos : []
server : <<inherit>>
template_files : {}
virt bridge : xenbr0
virt cpus : 1
virt file size : 5
virt path :
virt ram : 512
virt type : xenpv
profile : rescue-RHEL5-i386
distro : RHEL5-i386
comment :
created : Sun Mar 8 21:23:28 2009
dhcp tag : default
enable menu : True
kernel options : {'rescue': None}
kickstart : /var/lib/cobbler/kickstarts/sample.ks
ks metadata : {}
mgmt classes : []
modified : Sun Mar 8 21:23:28 2009
name servers : []
name servers search : []
owners : ['admin']
post kernel options : {}
redhat mgmt key : <<inherit>>
redhat mgmt server : <<inherit>>
repos : []
server : <<inherit>>
template_files : {}
virt bridge : xenbr0
virt cpus : 1
virt file size : 5
virt path :
virt ram : 512
virt type : qemu
system : leiria
profile : RHEL5-i386
comment :
created : Mon Mar 16 19:18:16 2009
gateway : 146.164.99.1
hostname : leira.lps.ufrj.br
image :
kernel options : {}
kernel options post : {}
kickstart : <<inherit>>
ks metadata : {}
mgmt classes : []
modified : Mon Mar 16 19:18:16 2009
name servers : ['146.164.99.10']
name servers search : ['lps.ufrj.br']
netboot enabled? : True
owners : ['root']
server : <<inherit>>
template files : {}
virt cpus : 1
virt file size : 0
virt path : <<inherit>>
virt ram : <<inherit>>
virt type : <<inherit>>
power type : apc_snmp
power address :
power user :
power password :
power id :
interface : eth0
mac address : 00:0E:A6:98:64:AE
bonding :
bonding_master :
bonding_opts :
is static? : True
ip address : 146.164.99.64
subnet : 255.255.255.0
static routes : []
dns name : leiria.lps.ufrj.br
dhcp tag :
virt bridge : xenbr0
---
is that any workaround on this?
cheers,
--
Tiago Bitarelli Gomes
15 years, 1 month
Re: Creating non-standard interfaces
by Robert Lazzurs
Sorry for the top posting, google mobile client.
So +1 for me however I would suggest if this is the way forward then we need
to be able to specify more than one management object as you may have say
apc power switches for power control but iLO for remote console.
Take care.
On 17 Mar 2009, 7:46 PM, "Jasper Capel" <capel(a)stone-it.com> wrote:
On 03/17/2009 08:42 PM, Michael DeHaan wrote: > Anyone else have comments?
I'm generally amenable ...
+1 on this one, I really don't feel comfortable about having to add
exceptions there, it took a lot of effort to get 'em to where they are
now. :)
-Jasper
_______________________________________________ cobbler-devel mailing list
cobbler-devel@lists.fedor...
15 years, 1 month
Sustain14 branch
by Michael DeHaan
I've created a git branch called "sustain14" for any potential bugfixes
we need to apply on 1.4.X.
The main reason for this is twofold -- Spacewalk users (which is only
QA'd against 1.4.X), and folks who don't want to yet upgrade to 1.6 to
save some place to pull patches from. I don't plan to do any releases
on this branch unless we have to.
I also don't expect anyone to submit their own patches to this branch,
I'll backport as needed.
So, basically you can mostly ignore this one in git, we'll delete it if
it turns out it isn't needed.
I recieved some new data on the "manage_isc is slow with bonded
interfaces" problem that was reported a while back and we may do some
profiling on that branch to see what's up.
Keeping testing 1.6 :)
--Michael
15 years, 1 month
Creating non-standard interfaces
by James Cammarata
Ok, so I was working on some snippets the other day for configuring our
Dell DRAC interfaces (similar to HP iLO, etc.) using ksmeta variables, when
it occurred to me that it would be a better idea to use the interfaces
capability of the system object to store this information. For example:
cobbler system edit --name=foo --interface=DRAC --ip=1.2.3.4...
In this way, we could use the built-in error checking, and not have to
worry about ks-meta accidently being blown away by an admin who doesn't
know about --in-place. Obviously, this presents an issue with the existing
snippets and koan's functionality, which would have to be taught to ignore
interfaces named after certain key words, or to add a configuration command
option to mark certain interfaces as "virtual", along the lines of bonded
interfaces.
We could then write an OOB network snippet to configure the hardware for
HP, IBM, Dell, or whatever other manufacturers that may have similar
setups.
Thoughts?
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
15 years, 1 month
RE: Window install with Cobbler 1.7
by Anu Ramachandra
Thanks for the response.
I did all the steps mentioned below. Still, when I select the windows profile from the pxe menu, nothing happens.
Looks like there's something missing even before it gets to any of this. What is the first step after the profile is selected from the pxe menu?
The server we are using has Fedora10 for x86_64.
Thanks,
Anu
-----Original Message-----
From: James Cammarata [mailto:jimi@sngx.net]
Sent: Monday, March 16, 2009 7:53 PM
To: Anu Ramachandra
Cc: cobbler mailing list
Subject: RE: Window install with Cobbler 1.7
Ok, here is what I had to do to get your profile to RIS:
1) The kickstart specified in the profile is a Red Hat kickstart:
/etc/cobbler/default.ks. Change this with the following command:
"cobbler profile edit --name=WindowsXP-i386
--kickstart=/var/lib/cobbler/kickstarts/winxp-default.sif"
And sync:
"cobbler sync"
To create all the correct files. Currently the default kickstart is used,
which is the default.ks on a new installation. If you want all new windows
profiles/systems to use the .sif file above, specify that in
/etc/cobbler/settings and re-sync.
2) Verify that either the directory holding the imported Windows files in
/var/www/cobbler/ks_mirror is named WindowsXP-i386, or you have created a
symlink to it in that same directory. For example, my profile is named
winxp-i386 and my imported folder is winxp, so my ks_mirror/ directory
looks like this:
# ll /var/www/cobbler/ks_mirror/
total 40
drwxr-xr-x 8 apache root 4096 Jun 18 2008 centos5.2-i386
drwxr-xr-x 2 apache root 4096 Mar 13 06:32 config
drwxr-xr-x 7 apache root 4096 Mar 13 06:38 F10-i386
lrwxrwxrwx 1 root root 5 Mar 16 19:45 WindowsXP-i386 -> winxp
dr-xr-xr-x 8 root root 4096 Mar 15 23:05 winxp
lrwxrwxrwx 1 root root 32 Mar 15 23:36 winxp-i386 ->
/var/www/cobbler/ks_mirror/winxp
Note that I created a symlink for your profile name too. This is noted in
my "pitfalls" section on the RIS wiki page, and could most likely be
avoided by changing the .SIF (kickstart) file to NOT use the full profile
name. Instead, it should figure out the directory named probably based on
the location of the kernel/initrd files (setupldr/startrom for windows).
3) Verify that you have bind-mounted the folder in ks_mirror (the real one,
not the symlinked one) to a directory in the TFTP root. For example, my
TFTP root is /tftpboot, and the profile is named WindowsXP-i386, so I
executed the following commands:
# mkdir /tftpboot/WindowsXP-i386
# mount --bind /var/www/cobbler/ks_mirror/winxp /tftpboot/WindowsXP-i386
After doing these three things, I was able to pxe a windows vm with no
issues.
On Mon, 16 Mar 2009 09:59:04 -0500, "Anu Ramachandra"
<anu(a)molecularimprints.com> wrote:
> Thanks for working on this.
>
> Attached are the files - first one is the output of 'cobbler profile
> report --name=WindowsXP-i386'
> The second file is /var/lib/cobbler/config/profiles.d/WindowsXP-i386.
>
> Thanks,
> Anu
>
>
> -----Original Message-----
> From: cobbler-bounces(a)lists.fedorahosted.org
> [mailto:cobbler-bounces@lists.fedorahosted.org] On Behalf Of James
> Cammarata
> Sent: Friday, March 13, 2009 7:11 AM
> To: cobbler mailing list
> Subject: Re: Window install with Cobbler 1.7
>
>
> On Thu, 12 Mar 2009 14:34:20 -0500, "Anu Ramachandra"
> <anu(a)molecularimprints.com> wrote:
>> Hello,
>>
>> I am setting up Windows install with cobbler 1.7. In the pxe menu,
> when
>> I select the Windows option, nothing happens.
>> Please suggest where I should start looking to debug this?
>>
>> 'cobbler distro report --name=WindowsXP-i386' returns -
>>
>> distro : WindowsXP-i386
>> architecture : i386
>> breed : windows
>> created : Tue Mar 10 14:55:10 2009
>> comment :
>> initrd :
>> /var/www/cobbler/ks_mirror/WindowsXP-i386/i386/setupldr.ex_
>> kernel :
>> /var/www/cobbler/ks_mirror/WindowsXP-i386/i386/startrom.n1_
>> kernel options : {}
>> ks metadata : {}
>> tree build time : Wed Dec 31 18:00:00 1969
>> modified : Tue Mar 10 14:55:10 2009
>> mgmt classes : []
>> os version :
>> owners : ['admin']
>> post kernel options : {}
>> redhat mgmt key : <<inherit>>
>> redhat mgmt server : <<inherit>>
>> template files : {}
>>
>> Thanks!
>> Anu
>>
>> _______________________________________________
>> cobbler mailing list
>> cobbler(a)lists.fedorahosted.org
>> https://fedorahosted.org/mailman/listinfo/cobbler
>
> If you'd like, I can try and help you with this, but like Michael said
> this
> is pretty much for developers only right now. It is not stable enough
> or
> robust enough for general usage, and I definitely would not recommend
> trying to use this for any production purposes.
>
> But, saying that, if you'd like to help debug this, I'd be more than
> happy
> to help you out off list. We have decided not to release this with 1.6
> yet, so it will remain available in the devel branch only.
>
> Execute the following as well:
>
> cobbler profile report --name=WindowsXP-i386
>
> And if you could send me the file
> /var/lib/cobbler/config/profiles.d/WindowsXP-i386 as an attachment, that
> would allow me to test the exact object you are using.
>
> --
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
>
> _______________________________________________
> cobbler mailing list
> cobbler(a)lists.fedorahosted.org
> https://fedorahosted.org/mailman/listinfo/cobbler
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
15 years, 1 month
[PATCH] correction for tftpd rules regex
by James Cammarata
Made a small change to pxegen.py to accommodate the fact that on some
versions of XP /pxelinux.0 is prepended to some file requests (known bug
for win2k). This has been pushed up to my github repo.
commit d3048893f20649e0e09b2e52699deb5703d000ff
Author: James Cammarata <jimi(a)sngx.net>
Date: Sat Mar 14 15:27:43 2009 -0500
Modifications to tftpd rules regex to accomodate for bugs in what
appears to be XP SP0 (prepending /pxelinux.0 to some file requests).
Also added additional comments above these rules in order to better
explain what they do.
Just to differentiate, this is the commit for the earlier bug I found:
commit 3c458da30d9051675efddf5afc40e28ac0de5963
Author: James Cammarata <jimi(a)sngx.net>
Date: Sat Mar 14 11:44:29 2009 -0500
Change to correct a stack dump caused by an incorrect key name for the
interfaces object on systems
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
15 years, 1 month