[Patch] WebUI distro delete is always recursive
by Vreman, Peter
The distro delete is currently always recursive. The result is that all profiles and systems with the distro are always deleted.
Attached patch fixes the recursive check and made image/profile/distro delete operations consistent.
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, 5 months
RHEL 5.3/Cobbler breaking.
by Ashley Penney
I just wanted to drop a quick mail to the list to see if anyone else
has tried testing cobbler on RHEL 5.3beta, and what your experiences
were? For me it completely broke and won't allow me to fetch
kickstart files via the web interface (giving a mod_python) error.
Has anyone encountered the same thing?
Thanks,
15 years, 5 months
libvirt power management support using /usr/bin/virsh
by James Laska
Greetings,
The following changes provide power management over libvirt managed guests. The template will support xen and qemu guests, both local and remote. The --power-pass field is not supported for /usr/bin/virsh operations. Cobbler users wishing to enable password-less power management of remotely managed libvirt guests should setup ssh keys between the two systems.
So far I've tested locally managed qemu systems:
# cobbler system edit --name vguest1 --power-type virsh --power-id vguest1
# cobbler system poweron --name vguest1
cobbler power configuration is:
type : virsh
address:
user :
id : vguest1
- /usr/bin/virsh --connect qemu:///system start vguest1
Domain vguest1 started
# cobbler system poweroff --name vguest1
cobbler power configuration is:
type : virsh
address:
user :
id : vguest1
- /usr/bin/virsh --connect qemu:///system destroy vguest1
Domain vguest1 destroyed
As well as remotely managed qemu systems:
# cobbler system edit --name vguest2 --power-type virsh --power-id vguest2 --power-address qemu+ssh:dell-t5400.test.redhat.com
# cobbler system poweron --name vguest2
cobbler power configuration is:
type : virsh
address: qemu+ssh:dell-t5400.test.redhat.com
user :
id : vguest2
- /usr/bin/virsh --connect qemu+ssh://dell-t5400.test.redhat.com/system start vguest2
root(a)dell-t5400.test.redhat.com's password:
Domain vguest2 started
# cobbler system poweroff --name vguest2
cobbler power configuration is:
type : virsh
address: qemu+ssh:dell-t5400.test.redhat.com
user :
id : vguest2
- /usr/bin/virsh --connect qemu+ssh://dell-t5400.test.redhat.com/system destroy vguest2
root(a)dell-t5400.test.redhat.com's password:
Domain vguest2 destroyed
Questions/comments appreciated.
Thanks,
James
15 years, 5 months
cobbler/koan+F10 Network Manager
by Ronald J. Yacketta
Hello all!
Let me preface the following with : Not sure if this is a cobbler / koan
issue or a F10 issue
Imported F10 into cobbler and created a f10.ks (copy of my f9.ks with a
repo location change), everything looks fine from the cobbler side
[cobbler]# cobbler profile report --name=f9-i386
profile : f9-i386
distro : f9-i386
dhcp tag : default
kernel options : {}
post kernel options : {'console': ['ttyS1,57600', 'tty1']}
kickstart : /etc/cobbler/fc9.ks
ks metadata : {}
owners : ['admin']
repos : []
server : <<inherit>>
virt bridge : br9
virt cpus : 1
virt file size : 7
virt path : /mnt/os1
virt ram : 1024
virt type : qemu
[cobbler]# cobbler profile report --name=f10-i386
profile : f10-i386
distro : f10-i386
dhcp tag : default
kernel options : {}
post kernel options : {}
kickstart : /etc/cobbler/f10.ks
ks metadata : {}
owners : ['admin']
repos : []
server : <<inherit>>
virt bridge : br9
virt cpus : 1
virt file size : 7
virt path : /mnt/os1
virt ram : 1024
virt type : qemu
I can kick of a koan for the f9-i386 cobbler profile and everything runs
as expected, when I the f10-i386 profile the install hangs setting up
eth0 via NM (Netowkr Manager) which errors out and gives a retry button.
Clicking the retry button kicks F10 in the arse, eth0 is configured, a
DHCPREQUEST is fired off and everything goes smooth from there.
Went as far as doing a virt-install and compared the auto generated
anaconda.ks to my f10.ks and found no diff with the network setup.
Any thoughts?
-Ron
15 years, 5 months
[PATCH] Gracefully handle missing kernel/initrd during 'cobbler sync'
by James Laska
---
cobbler/pxegen.py | 22 ++++++++++++++++++++--
1 files changed, 20 insertions(+), 2 deletions(-)
diff --git a/cobbler/pxegen.py b/cobbler/pxegen.py
index 4ea9dee..6d9f864 100644
--- a/cobbler/pxegen.py
+++ b/cobbler/pxegen.py
@@ -108,15 +108,33 @@ class PXEGen:
NOTE: this has to be done for both tftp and http methods
"""
# copy is a 4-letter word but tftpboot runs chroot, thus it's required.
+ errors = list()
for d in self.distros:
- self.copy_single_distro_files(d)
+ try:
+ self.copy_single_distro_files(d)
+ except CX, e:
+ errors.append(e)
+ print e.value
+
+ # FIXME: using logging module so this ends up in cobbler.log?
+ if len(errors) > 0:
+ raise CX(_("Error(s) encountered while copying distro files"))
def copy_images(self):
"""
Like copy_distros except for images.
"""
+ errors = list()
for i in self.images:
- self.copy_single_image_files(i)
+ try:
+ self.copy_single_image_files(i)
+ except CX, e:
+ errors.append(e)
+ print e.value
+
+ # FIXME: using logging module so this ends up in cobbler.log?
+ if len(errors) > 0:
+ raise CX(_("Error(s) encountered while copying image files"))
def copy_single_distro_files(self, d):
for dirtree in [self.bootloc, self.settings.webdir]:
--
1.6.0.4
15 years, 5 months
default kernel options
by Vreman, Peter
I've been playing with making an unattended installer for the HP Proliant Firmware CD.
I'm adding a distro with the following kernel options:
"rw root=/dev/ram0 loglevel=3 ramdisk_size=320000 init=/bin/init ide=nodma ide=noraid pnpbios=off media=usb CDVOLUME=HPFWUP$nodotver"
But the generated PXE configuration adds a lot of additional options that are kickstart specific:
"append initrd=/images/HP_Firmware_8.30/initrd-8.30.img ksdevice=bootif lang= CDVOLUME=HPFWUP830 loglevel=3 text pnpbios=off syslog=10.227.128.209:25150 init=/bin/init rw kssendmac media=usb ramdisk_size=320000 ide=nodma ide=noraid root=/dev/ram0 IMAGENAME=bcsia74 auto=true url=http://10.227.128.209/cblr/svc/op/ks/system/bcsia74"
Is it possible to remove the redhat specific kernel options from the global settings file and and make the ksdevice, kssendmac, etc. kernel options only for the distro with the redhat breed?
Is it possible to add a livecd distro breed that can be used for booting any firmware or other livecd?
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, 5 months
External kickstart files
by Chris O'Regan
I am trying to create a system entry that uses an external kickstart
file however the pxe file that is created is has "ks" referring to the
cobbler service, that is:
ks=http://.../cblr/svc/op/ks/system/mysystem
If I go to this url, it returns:
# kickstart is sourced externally: http://.../path/to/mysystem.ks
Is there any way I can have cobbler put the url to the external
kickstart in the pxe file instead?
This is v1.2.8.
Thanks,
Chris
15 years, 5 months
Cobbler 1.3.2 (dev) kickstart generation not working
by Jeff Schroeder
This is also ticket 313 in trac:
Ok so I've pulled the latest HEAD (commit
9e9392db3a96b037ac2a632c9e3b41c5c220a7d5),
built an rpm for cobbler 1.3.2, and installed it on a RHEL 5.2 server.
[jschroeder@init2 ~]$ cobbler system report --name cobblertest01.mtt
system : cobblertest01.mtt
profile : Fedora9-x86_64
comment :
created : Thu Jan 1 00:00:00 1970
gateway :
hostname : cobblertest01.mtt
image :
kernel options : {'console': 'ttyS0,115200'}
kernel options post : {}
kickstart : <<inherit>>
ks metadata : {}
mgmt classes : []
modified : Thu Jan 1 00:00:00 1970
name servers : <<inherit>>
netboot enabled? : True
owners : ['admin']
server : <<inherit>>
template files : {}
virt cpus : <<inherit>>
virt file size : <<inherit>>
virt path : <<inherit>>
virt ram : <<inherit>>
virt type : <<inherit>>
power type : ipmitool
power address :
power user :
power password :
power id :
interface : eth0
mac address : 00:21:5A:D3:DC:EE
bonding :
bonding_master :
bonding_opts :
is static? : False
ip address : 192.168.125.114
subnet : 255.255.255.0
static routes : []
dns name : cobblertest01.int.mtt
dhcp tag :
virt bridge :
interface : eth1
mac address : 00:21:5a:d3:dc:ef
bonding :
bonding_master :
bonding_opts :
is static? : False
ip address : 10.125.200.114
subnet : 255.255.255.0
static routes : []
dns name : cobblertest01.mtt
dhcp tag :
virt bridge :
interface : intf0
mac address :
bonding :
bonding_master :
bonding_opts :
is static? : False
ip address :
subnet :
static routes : []
dns name : cobblertest01.mtt
dhcp tag :
virt bridge :
[jschroeder@init2 ~]$ egrep -v '^$|^#' /etc/cobbler/settings
---
allow_duplicate_hostnames: 0
allow_duplicate_ips: 0
allow_duplicate_macs: 0
bind_bin: /usr/sbin/named
cheetah_import_whitelist:
- "random"
- "re"
- "time"
default_kickstart: /etc/cobbler/default.ks
default_name_servers: []
default_virt_bridge: xenbr0
default_virt_type: xenpv
default_virt_file_size: 5
default_virt_ram: 512
default_ownership:
- "admin"
enable_menu: 1
dhcpd_bin: /usr/sbin/dhcpd
dhcpd_conf: /etc/dhcpd.conf
dnsmasq_bin: /usr/sbin/dnsmasq
dnsmasq_conf: /etc/dnsmasq.conf
func_auto_setup: 0
func_master: overlord.example.org
httpd_bin: /usr/sbin/httpd
http_port: 80
kernel_options:
ksdevice: eth0
lang: ' '
text: ~
noipv6: ~
selinux: 0
ldap_server: "ldap.example.com"
ldap_base_dn: "DC=example,DC=com"
ldap_port: 389
ldap_tls: 1
ldap_anonymous_bind: 1
ldap_search_bind_dn: ''
ldap_search_passwd: ''
ldap_search_prefix: 'uid='
manage_dhcp: 1
manage_dns: 0
manage_forward_zones: []
manage_reverse_zones: []
mgmt_classes: []
mgmt_parameters:
from_cobbler: 1
named_conf: /etc/named.conf
next_server: 10.125.200.30
omapi_enabled: 0
omapi_port: 647
omshell_bin: /usr/bin/omshell
power_management_default_type: 'ipmitool'
power_template_dir: "/etc/cobbler/power"
pxe_just_once: 0
pxe_template_dir: "/etc/cobbler/pxe"
restart_dns: 1
restart_dhcp: 1
register_new_installs: 0
run_install_triggers: 1
server: 10.125.200.30
snippetsdir: /var/lib/cobbler/snippets
spacewalk_url: http://localhost/rpc/api
syslog_port: 25150
tftpd_bin: /usr/sbin/in.tftpd
tftpd_conf: /etc/xinetd.d/tftp
webdir: /var/www/cobbler
xmlrpc_port: 25151
xmlrpc_rw_enabled: 1
xmlrpc_rw_port: 25152
yum_post_install_mirror: 0
yumreposync_flags: "-l"
yumdownloader_flags: "--resolve"
========== From /var/log/cobbler.log
2008-12-01 17:02:36,787 - api - sync
2008-12-01 17:04:39,583 - api - cobblerd started
2008-12-01 17:04:39,597 - api - XMLRPC running on 25151
2008-12-01 17:04:39,599 - api - syslog running on 25150
2008-12-01 17:06:06,645 - api - serialize
2008-12-01 17:06:09,533 - api - sync
2008-12-01 17:09:01,649 - api - serialize
2008-12-01 17:09:11,281 - api - cobblerd started
2008-12-01 17:09:11,292 - api - syslog running on 25150
2008-12-01 17:09:11,298 - api - XMLRPC running on 25151
2008-12-01 17:10:36,336 - api - generate_kickstart; user(?)
2008-12-01 17:10:36,336 - api - generate_kickstart
2008-12-01 17:10:36,362 - api - Exception occured: exceptions.IOError
2008-12-01 17:10:36,362 - api - Exception value: [Errno 9] Bad file descriptor
2008-12-01 17:10:36,363 - api - Exception Info:
File "/usr/lib/python2.4/site-packages/cobbler/remote.py", line 635,
in _dispatch
return method_handle(*params)
File "/usr/lib/python2.4/site-packages/cobbler/remote.py", line
207, in generate_kickstart
return self.api.generate_kickstart(profile,system)
File "/usr/lib/python2.4/site-packages/cobbler/api.py", line 423,
in generate_kickstart
return self.kickgen.generate_kickstart_for_system(system)
File "/usr/lib/python2.4/site-packages/cobbler/kickgen.py", line
253, in generate_kickstart_for_system
traceback.print_exc()
File "/usr/lib64/python2.4/traceback.py", line 212, in print_exc
print_exception(etype, value, tb, limit, file)
File "/usr/lib64/python2.4/traceback.py", line 124, in print_exception
_print(file, 'Traceback (most recent call last):')
File "/usr/lib64/python2.4/traceback.py", line 13, in _print
file.write(str+terminator)
2008-12-01 17:11:58,629 - api - sync
2008-12-01 17:12:11,003 - api - sync
2008-12-01 17:14:04,476 - api - sync
2008-12-01 17:14:13,723 - api - sync
======================
--
Jeff Schroeder
Don't drink and derive, alcohol and analysis don't mix.
http://www.digitalprognosis.com
15 years, 5 months