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, 7 months
[Prototype] System operations from system list
by Vreman, Peter
I have extended the prototype i'm working on for the system editing. Attached is a new patch that implements the following things:
Buttons above the system list
Support Add/Rename/Delete operations from the system list
Support changing netboot/profile on multiple systems
Support power control on multiple systems (requires remote power_api patch)
Comments are welcome.
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
cobbler_server environment snippet
by Vreman, Peter
Might it be a good idea to include by default a snippet that sets the COBBLER_SERVER environment?
Below is the snippet post_cobbler_env that I'm now using:
echo "export COBBLER_SERVER=@@server@@" > /etc/profile.d/cobbler.sh
echo "setenv COBBLER_SERVER @@server@@" > /etc/profile.d/cobbler.csh
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
Not Updating DHCP
by Christopher Johnston
Unclear on why cobbler is not updating dhcpd.conf, I have omapi management
disabled and the stock dhcp.template modified slightly to support a private
subnet in one of my labs. Cobbler check looks ok, cobbler sync obviously
fails to restart dhcpd because the file never gets written out. Does my
template look correct (its the stock template)
dhcpd_bin: /usr/sbin/dhcpd
dhcpd_conf: /etc/dhcpd.conf
manage_dhcp: 1
omapi_enabled: 0
omapi_port: 647
restart_dhcp: 1
# ******************************************************************
# Cobbler managed dhcpd.conf file
#
# generated from cobbler dhcp.conf template ($date)
# Do NOT make changes to /etc/dhcpd.conf. Instead, make your changes
# in /etc/cobbler/dhcp.template, as /etc/dhcpd.conf will be
# overwritten.
#
# ******************************************************************
ddns-update-style interim;
allow booting;
allow bootp;
#if $omapi_enabled
omapi-port $omapi_port;
#end if
ignore client-updates;
set vendorclass = option vendor-class-identifier;
subnet 192.168.125.0 netmask 255.255.255.0 {
option domain-name-servers 192.168.125.32;
option subnet-mask 255.255.255.0;
filename "/pxelinux.0";
default-lease-time 21600;
max-lease-time 43200;
next-server $next_server;
}
#for dhcp_tag in $dhcp_tags.keys():
## group could be subnet if your dhcp tags line up with your subnets
## or really any valid dhcpd.conf construct ... if you only use the
## default dhcp tag in cobbler, the group block can be deleted for a
## flat configuration
# group for Cobbler DHCP tag: $dhcp_tag
group {
#for mac in $dhcp_tags[$dhcp_tag].keys():
#set iface = $dhcp_tags[$dhcp_tag][$mac]
host $iface.name {
hardware ethernet $mac;
#if $iface.ip_address:
fixed-address $iface.ip_address;
#end if
#if $iface.subnet:
option subnet-mask $iface.subnet;
#end if
#if $iface.gateway:
option routers $iface.gateway;
#end if
#if $iface.system.netboot_enabled:
filename "$iface.filename";
## Cobbler defaults to $next_server, but some users
## like to use $iface.system.server for proxied setups
next-server $next_server;
## next-server $iface.system.server;
#end if
}
#end for
}
#end for
15 years, 3 months
[PATCH] add support to try to connect to 443 if available
by Justin Sherrill
---
koan/app.py | 13 ++++++++++---
1 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/koan/app.py b/koan/app.py
index f5f982f..e2b8e12 100755
--- a/koan/app.py
+++ b/koan/app.py
@@ -297,9 +297,16 @@ class Koan:
if uses_avahi:
print "- connecting to: %s" % server
try:
- # first try port 80
- self.xmlrpc_server = ServerProxy(url)
- self.xmlrpc_server.get_profiles()
+ try:
+ #first try port 443
+ url = "https://%s:443/cobbler_api" % (server)
+ self.xmlrpc_server = ServerProxy(url)
+ self.xmlrpc_server.get_profiles()
+ except:
+ #then try port 80
+ url = "http://%s:80/cobbler_api" % (server)
+ self.xmlrpc_server = ServerProxy(url)
+ self.xmlrpc_server.get_profiles()
except:
# now try specified port in case Apache proxying
# is not configured
--
1.6.0.3
15 years, 3 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, 4 months
System Record Duplicates
by Christopher Johnston
Should this be allowed? Seems like this is not the appropriate behaviour
given I could have multiple interfaces on a host, no?
[root@init2 dhcpd]# cobbler system edit --name=foo --interface=eth0
--hostname=foo
[root@init2 dhcpd]# cobbler system edit --name=foo --interface=eth1
--hostname=foo
[root@init2 dhcpd]# cobbler system edit --name=foo --interface=eth2
--hostname=foo
[root@init2 dhcpd]# cobbler sync
[root@init2 dhcpd]#
[root@init2 dhcpd]# cobbler system edit --name=foo --interface=eth0
--hostname=foo --ip=1.2.3.4 --subnet=255.255.255.0
[root@init2 dhcpd]# cobbler system edit --name=foo --interface=eth1
--hostname=foo --ip=1.2.3.4 --subnet=255.255.255.0
[root@init2 dhcpd]# cobbler system edit --name=foo --interface=eth2
--hostname=foo --ip=1.2.3.4 --subnet=255.255.255.0
[root@init2 dhcpd]# cobbler sync
[root@init2 dhcpd]# cobbler system report --name=foo
system : foo
profile : Legacy-Image-v1.0
comment :
created : Wed Nov 26 05:13:46 2008
image :
kernel options : {}
kernel options post : {}
kickstart : <<inherit>>
ks metadata : {}
mgmt classes : []
modified : Wed Nov 26 05:18:03 2008
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
bonding :
bonding_master :
bonding_opts :
dhcp tag :
gateway :
hostname : foo
ip address : 1.2.3.4
is static? : False
mac address : 00:00:00:12:34:56
subnet : 255.255.255.0
virt bridge :
interface : eth1
bonding :
bonding_master :
bonding_opts :
dhcp tag :
gateway :
hostname : foo
ip address : 1.2.3.4
is static? : False
mac address : 00:00:00:12:34:56
subnet : 255.255.255.0
virt bridge :
interface : eth2
bonding :
bonding_master :
bonding_opts :
dhcp tag :
gateway :
hostname : foo
ip address : 1.2.3.4
is static? : False
mac address : 00:00:00:12:34:56
subnet : 255.255.255.0
virt bridge :
[root@init2 dhcpd]# grep duplicate /etc/cobbler/settings
# if 1, cobbler will allow insertions of system records that duplicate
allow_duplicate_hostnames: 0
# if 1, cobbler will allow insertions of system records that duplicate
allow_duplicate_ips: 0
# if 1, cobbler will allow insertions of system records that duplicate
allow_duplicate_macs: 0
Also a copy of a system record seems to be allowed, but not forcing me to
change any of the unique data in the record such as ip, hostname or mac
address. See below.
system : foo
profile : Legacy-Image-v1.0
comment :
created : Wed Nov 26 05:13:46 2008
image :
kernel options : {}
kernel options post : {}
kickstart : <<inherit>>
ks metadata : {}
mgmt classes : []
modified : Wed Nov 26 05:18:03 2008
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
bonding :
bonding_master :
bonding_opts :
dhcp tag :
gateway :
hostname : foo
ip address : 1.2.3.4
is static? : False
mac address : 00:00:00:12:34:56
subnet : 255.255.255.0
virt bridge :
interface : eth1
bonding :
bonding_master :
bonding_opts :
dhcp tag :
gateway :
hostname : foo
ip address : 1.2.3.4
is static? : False
mac address : 00:00:00:12:34:56
subnet : 255.255.255.0
virt bridge :
interface : eth2
bonding :
bonding_master :
bonding_opts :
dhcp tag :
gateway :
hostname : foo
ip address : 1.2.3.4
is static? : False
mac address : 00:00:00:12:34:56
subnet : 255.255.255.0
virt bridge :
system : foo1
profile : Legacy-Image-v1.0
comment :
created : Wed Nov 26 05:13:46 2008
image :
kernel options : {}
kernel options post : {}
kickstart : <<inherit>>
ks metadata : {}
mgmt classes : []
modified : Wed Nov 26 05:22:00 2008
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
bonding :
bonding_master :
bonding_opts :
dhcp tag :
gateway :
hostname : foo
ip address : 1.2.3.4
is static? : False
mac address : 00:00:00:12:34:56
subnet : 255.255.255.0
virt bridge :
interface : eth1
bonding :
bonding_master :
bonding_opts :
dhcp tag :
gateway :
hostname : foo
ip address : 1.2.3.4
is static? : False
mac address : 00:00:00:12:34:56
subnet : 255.255.255.0
virt bridge :
interface : eth2
bonding :
bonding_master :
bonding_opts :
dhcp tag :
gateway :
hostname : foo
ip address : 1.2.3.4
is static? : False
mac address : 00:00:00:12:34:56
subnet : 255.255.255.0
virt bridge :
15 years, 4 months
Permission of log files
by Chris O'Regan
I've noticed that the permissions of the syslog files created by
cobblerd are 0666 (read/write everyone). I tried to correct this by
setting a stricter umask in the init script (0027) but that has not made
a difference.
While this might have something to do with the way cobblerd is run on my
server (I managed to get it running as a non-root user in a chroot jail)
and I am perfectly happy to debug this on my own, I just want to know
beforehand if the permissions are being set this way deliberately by
cobblerd, and where this can be modified. If it is expecting a correct
umask to be set someplace else, I will poke around my chroot.
Thanks,
Chris
15 years, 4 months
How to get buildiso to have custom ops
by Stephen John Smoogen
A good many of our systems work only via serial console. I would like
ot have the buildiso to have the option of booting serial, but not
sure if there is enough need to add that to the code or just hack the
iso myself after its built.
--
Stephen J Smoogen. -- BSD/GNU/Linux
How far that little candle throws his beams! So shines a good deed
in a naughty world. = Shakespeare. "The Merchant of Venice"
15 years, 4 months