Cobbler 2.4.0 sample.seed not rendering kickstart_done snippet?
by Zack Perry
I am testing the 2.4.0 from epel-testing using two netbooks, one as the cobbler server running SL 6.3, the other is a test install machine. The distro is Ubuntu 12.04.1 server.
A while ago, I again used the /var/lib/cobbler/kickstarts/sample.seed to test out things, and used cobbler system getks --name=nb1 to check out the rendered preseed file.
Immediately, I noticed that $SNIPPET('kickstart_done') is not rendered, despite the fact that I have the kickstart defined in the profile, and the system report indicates the following:
Kickstart : <<inherit>>
The entire kickstart_done snippet seems to be ignored. Is this a known issue, or is there a hint for me to debug it?
On our production cobbler server (2.2.3), for RH alike systems, the rendering works fine.
Regards,
-- Zack
11 years, 5 months
Re: [cobbler] Cobbler 2.4.0, Ubuntu 12.04.1 64bit server == not using local repo?
by Zack Perry
I need to correct myself:
(1) PXE booting Ubuntu does need to use the {linux, initrd.gz} in netboot subdirectory. I finally dug out enough Ubuntu documentation on Ubuntu Web site to confirm what we have learned from trials and errors.
(2) Once said pair is used, the three magic variables, $http_server:$http_port and $install_source_directory, work as anticipated.
So, James, there is no need to waste your time to double check these. Apologies for the false alarm!
On the other hand, I still have a few other issues with my home lab setup (where dnsmasq acts as a proxy, not authoriative DHCP server), e.g.:
(a) d-i netcfg/get_hostname string $hostname doesn't take effect. Instead, the randomly assigned device name by 2Wire 3600HGV is used
(b) I am still struggling with the use of the last two snippets in the preseed file, i.e.
[...]
d-i preseed/late_command string chroot /target sh -c ' \
$SNIPPET('download_config_files_deb')
$SNIPPET('post_run_deb')
'; \
$SNIPPET('kickstart_done')
Despite what I set for the 'Template Files' and rendered seed file from cobbler system getks, none of the files got into the installed system.
I will simplfy it, do more tests after work, and see if I can find a clue...
Regards,
-- Zack
> That's very odd, these work fine for me when using the master branch
> which should not be that divergent from the release24 branch
> currently. I'm going to be merging the signature branch in with master
> and release24 soon, and that branch definitely seems to work great
> with Ubuntu, so I'll double check for this popping up at that time.
11 years, 5 months
Problems with writing systems through the XMLRPC API using perl XML::RPC or XMLRPC::Lite
by Jason Barlow
I'm trying to create a new system profile using perl through the XMLRPC API.
Things work great using python, but when I try to use either of the above perl interfaces, I'm not able to actually write any of the new objects I've created:
Reading items works a charm, and it looks like the calls themselves are succeeding, but the host never shows up in a:
#[root@spacewalk cobbler]# cobbler system list | grep test
#
I'm wondering what's going wrong here; am I not authenticating properly?
I've tried using both XML::RPC and XMLRPC::Lite, and get similar results, where reads work fine, but nothing actually 'sticks'
Here's the script that I'm using for XMLRPC::Lite
#!/usr/bin/perl
use strict;
use warnings;
use XMLRPC::Lite;
use Data::Dumper;
my $username = 'api-user';
my $password = 'sapi-user';
my $proto = 'http://';
my $servername = 'spacewak';
my $api = '/cobbler_api';
my $url = $proto . $servername . $api;
my $name = 'vacsld01test';
my $conn = XMLRPC::Lite->proxy('https://vacslp01spacewalk.cucbc.com/cobbler_api');
my $token = $conn->login($username, $password)->result();
my $object = $conn->new_system($token)->result();
$conn->modify_system($object, 'name', $name, $token)->result();
$conn->modify_system($object, 'hostname', $name, $token)->result();
$conn->save_system($object, $token)->result();
$conn->sync($token)->result();
/var/log/cobbler/cobbler.log has:
Thu Nov 8 16:03:46 2012 - INFO | authenticate; ['api-user', True]
Thu Nov 8 16:03:46 2012 - INFO | REMOTE new_item(system); user(api-user)
Thu Nov 8 16:03:46 2012 - DEBUG | authorize; ['api-user', 'new_system', None, None, True]
Thu Nov 8 16:03:46 2012 - DEBUG | REMOTE api-user authorization result: True; user(?)
Thu Nov 8 16:03:46 2012 - INFO | REMOTE modify_item(system); user(api-user); object_id(___NEW___system::o0X5NLQrLsh9rXGhtvbuts56aTY6zb4JfQ==); attribute(name)
Thu Nov 8 16:03:46 2012 - DEBUG | authorize; ['api-user', 'modify_system', <cobbler.item_system.System instance at 0x14350560>, 'name', True]
Thu Nov 8 16:03:46 2012 - DEBUG | REMOTE api-user authorization result: True; user(?)
Thu Nov 8 16:03:46 2012 - INFO | REMOTE modify_item(system); user(api-user); object_id(___NEW___system::o0X5NLQrLsh9rXGhtvbuts56aTY6zb4JfQ==); attribute(hostname)
Thu Nov 8 16:03:46 2012 - DEBUG | authorize; ['api-user', 'modify_system', <cobbler.item_system.System instance at 0x14350560>, 'hostname', True]
Thu Nov 8 16:03:46 2012 - DEBUG | REMOTE api-user authorization result: True; user(?)
Thu Nov 8 16:03:46 2012 - INFO | REMOTE save_item(system); user(api-user); object_id(___NEW___system::o0X5NLQrLsh9rXGhtvbuts56aTY6zb4JfQ==)
Thu Nov 8 16:03:46 2012 - DEBUG | authorize; ['api-user', 'save_system', <cobbler.item_system.System instance at 0x14350560>, None, True]
Thu Nov 8 16:03:46 2012 - DEBUG | REMOTE api-user authorization result: True; user(?)
Thu Nov 8 16:03:46 2012 - INFO | add_item(system); ['vacsld01test']
Thu Nov 8 16:03:46 2012 - DEBUG | get_items; ['system']
Thu Nov 8 16:03:46 2012 - INFO | REMOTE sync; user(api-user)
Thu Nov 8 16:03:46 2012 - DEBUG | authorize; ['api-user', 'sync', None, None, True]
Thu Nov 8 16:03:46 2012 - DEBUG | REMOTE api-user authorization result: True; user(?)
Thu Nov 8 16:03:46 2012 - INFO | sync
Thu Nov 8 16:03:46 2012 - INFO | running pre-sync triggers
Thu Nov 8 16:03:46 2012 - INFO | cleaning trees
I'm using:
cobbler2-2.0.11-4.el5 ( CentOS 5.8)
perl v5.10.1
XMLRPC::Lite 0.715
11 years, 5 months
Re: [cobbler] Cobbler 2.4.0, Ubuntu 12.04.1 64bit server == not using local repo?
by Zack Perry
Hi James,
I am guessing that my setup is a very unusual one. I am doing all my testing of the 2.4.0 from epel-testing in my home lab (at work we still run 2.2.3). My home has AT&T Uverse, with a 2Wire 3600HGV router. The router has a built-in DHCP server, which is really awfully limited :-(
But, attempting not to be disruptive to my family members, I choose to run dnsmasq 2.63rc3 in proxy mode (the key word is pxe-service. See dnsmasq's man page at http://www.thekelleys.org.uk/dnsmasq/docs/dnsmasq-man.html
The result seems to be that some "magic variables" even take on the values that they should be taking (I know so; as I have a habit of using cobbler system getks --name=... and cobbler system dumpvars --name=...).
I have been unable to set static IP address in /etc/network/interfaces and desired hostname in /etc/hostname and /etc/hosts so far. I am trying to fight this intransigence of the silly 2Wire DHCP server via the 'Template Files' attribute of the system object. I should know in about another hour or so. The netbooks that I used for testing are slow like snails :-( But they use very little power...
I will let the list of my outcome.
Regards,
-- Zack
=====================================================================
That's very odd, these work fine for me when using the master branch which should not be that divergent from the release24 branch currently. I'm going to be merging the signature branch in with master and release24 soon, and that branch definitely seems to work great with Ubuntu, so I'll double check for this popping up at that time.
11 years, 5 months
Installing cobbler in a old linux system
by Personal Técnico
Hello,
We are trying to install Cobbler (and Cobbler-Web) in a Linus system
that is running a SLES 10 SP1. We are tried with source and RPMs, but
there is several dependencies that not allow us install cobbler.
Anyone here has tried to install cobbler in similar conditions?
Thanks.
11 years, 5 months
Cobbler 2.4.0, Ubuntu 12.04.1 64bit server == not using local repo?
by Zack Perry
This weekend, I decided to try out the cobbler 2.4.0 from the epel-testing. I set it on in my "home lab", on an Acer Aspire One D257 netbook, which runs SL 6.3 64bit.
Going over the usual (1) import ubuntu-12.04.1-server-amd64.iso to create a distro and profile, add a repo, reposync, (2) add a system was pretty quick. Since my home has a DSL, so I upgraded dnsmasq from repoforge to 2.63rc6, and used its proxy mode.
Two issues immediately became obvious:
(1) Ubuntu 12.04.1 LTS default vmlinuz and initrd.gz always resulted prompting for CD/DVD :-(
As a quick get-around, I renamed the pair, and copied their counterpart from install/netboot/ubuntu-installer/amd64/.
The replacement pair got the PXE going, but despite what I specified in the preseed template, it always retrieve every package from the remote Ubuntu repositories :-(
I also tried to use the vmlinux and initrd.lz from Ubuntu 12.04.1 precise desktop daily build. That pair got into the busybox :-( So no go.
(2) Despite the fact that I set the desired interface to use during the installation as eth0, I still got prompted for selecting among two (eth0 and wlan0)
What I have in the /var/lib/cobbler/kickstart/ubuntu-server.seed:
[...]
# netcfg will choose an interface that has link if possible. This makes it
# skip displaying a list if there is more than one interface.
#d-i netcfg/choose_interface select auto
d-i netcfg/choose_interface select eth0
[...]
# You can choose to install restricted and universe software, or to install
# software from the backports repository.
# d-i apt-setup/restricted boolean true
# d-i apt-setup/universe boolean true
# d-i apt-setup/backports boolean true
# Uncomment this if you don't want to use a network mirror.
d-i apt-setup/use_mirror boolean false
# Select which update services to use; define the mirrors to be used.
# Values shown below are the normal defaults.
d-i apt-setup/services-select multiselect security
d-i apt-setup/security_host string security.ubuntu.com
d-i apt-setup/security_path string /ubuntu
# Additional repositories, local[0-9] available
# d-i apt-setup/local0/repository string \
# http://local.server/ubuntu precise main
# d-i apt-setup/local0/comment string local server
[...]
And here is the profile:
[root@cobbler kickstarts]# cobbler profile report --name=ubuntu-12.04.1-x86_64
Name : ubuntu-12.04.1-x86_64
TFTP Boot Files : {}
Comment :
DHCP Tag : default
Distribution : ubuntu-12.04.1-x86_64
Enable gPXE? : 0
Enable PXE Menu? : 1
Fetchable Files : {}
Kernel Options : {'priority': 'critical', 'locale': 'en_US'}
Kernel Options (Post Install) : {'reboot': 'efi'}
Kickstart : /var/lib/cobbler/kickstarts/ubuntu-server.seed
Kickstart Metadata : {'gateway': '192.168.1.254'}
Management Classes : []
Management Parameters : <<inherit>>
Name Servers : []
Name Servers Search Path : []
Owners : ['admin']
Parent Profile :
Proxy :
Red Hat Management Key : <<inherit>>
Red Hat Management Server : <<inherit>>
Repos : ['ubuntu-12.04.1-x86_64']
[...]
The Repos attribute seemed to be completely ignored!
Has anyone succeeded PXE booting Ubuntu 12.04? If so, were you successful in getting the installation to use your repos? I would be thankful to any hints.
Regards,
--Zack
11 years, 5 months
Spurious debugging outputs from koan in provisioning KVM guests
by Zack Perry
We have been always using a RHEL variant (e.g. CentOS or SL) as the host for KVM guests. I got a spare machine running Ubuntu 12.04LTS so a while ago I decided to use it as a host for a few "disposable" test guests today. Both cobbler and koan are at 2.2.2.
The following is what I got:
root@teapot:# koan --server=vc0 --virt --system=vc8 --virt-path=/dev/vg/vc8 -w
- looking for Cobbler at http://vc0:80/cobbler_api
- reading URL: http://192.168.123.3/cblr/svc/op/ks/system/vc8
install_tree: http://192.168.123.3/cblr/links/centos6-x86_64
/bin/sh: 1: rpm: not found .........................................(1)[...]
libvir: QEMU error : Domain not found: no domain with matching uuid 'd4e139b9-d2f9-6afc-aff8-7b6db7ace13b' .............................(2)
Sat, 10 Nov 2012 09:27:26 DEBUG Could not open "/etc/sysconfig/keyboard" [Errno 2] No such file or directory: '/etc/sysconfig/keyboard' ..........................................(3)
Sat, 10 Nov 2012 09:27:26 DEBUG Could not open "/etc/X11/xorg.conf": [Errno 2] No such file or directory: '/etc/X11/xorg.conf' ..........(4)
Sat, 10 Nov 2012 09:27:26 DEBUG Could not open "/etc/sysconfig/keyboard" [Errno 2] No such file or directory: '/etc/sysconfig/keyboard'...........................................(5)
Sat, 10 Nov 2012 09:27:26 DEBUG Could not open "/etc/X11/xorg.conf": [Errno 2] No such file or directory: '/etc/X11/xorg.conf'...........(6)
[...]
libvir: QEMU error : Domain not found: no domain with matching name 'vc8' ..............................................................(7)
Sat, 10 Nov 2012 09:27:29 DEBUG Started guest, connecting to console if requested
Sat, 10 Nov 2012 09:27:29 DEBUG XML fetched from libvirt object:
[...]
OK. So, the guest vc8 was built and started without a hitch. But IMHO the numbered statements above are confusing.
(1) Yes. Even Ubuntu repo provides the rpm utility, but why?
(2) If it's a refresh build, then obvious this entry wouldn't exist. So, the statement should be rephrased.
(3) For Debian/Ubuntu, the path is /etc/default/keyboard
(4) If the host is a server with nearly minimal install, why this file should exist? It shouldn't.
(5) & (6), please see above.
(7). Please see my comments for (2) above.
Comments from others in the list?
Regards,
-- Zack
11 years, 5 months
How to get virt-install's --cpu host into cobbler/koan?
by Zack Perry
With the virt-install command, there is this --cpu host option, quoted
"Expose the host CPUs configuration to the guest. This enables the
guest to take advantage of many of the host CPUs features (better
performance), but may cause issues if migrating the guest to a host
without an identical CPU."
The hardware in our office is quite uniform, so using the option is not an issue. We also must almost exclusively Linux (RHEL, Ubuntu).
But I want to use cobbler/koan to do guest provisioning. Nevertheless, having read cobbler --help/man page, and koan --help/man page, I still can't figure out how to set this option in cobbler so that koan can extract it for a KVM guest. Any hints/tips are appreciated.
I certainly can do a virsh dumpxml, undefine, edit, define sequence, even scripted. But that just smells so kludgy :-(
Regards,
-- Zack
11 years, 5 months
Problems in "cobber get-loaders" logic
by Eldred, Doug
There appear to be two problems in the Cobbler "get-loaders" logic, resulting in failure if you need to use a proxy server:
downloading http://dgoodwin.fedorapeople.org/loaders/grub-0.97-x86_64.efi to /var/lib/cobbler/loaders/grub-x86_64.efi
Exception occured: <class 'urlgrabber.grabber.URLGrabError'>
Exception value: [Errno 14] PYCURL ERROR 7 - "Failed to connect to 2610:28:3090:3001:5054:ff:fedb:7f5a: Network is unreachable"
Note the odd connect-to address, there COULD be a third problem here. But for sure:
(1) Around line 65 of action_dlcontent.py, if either an HTTP or an FTP proxy is in the environment, we'll try to reference an undefined "var" value
(2) The reason this does NOT cause a runtime Python error due to the missing "var" is that the environment is EXTREMELY tiny during execution of this code, and specifically doesn't contain any proxies:
os.environ: {'LANG': 'en_US.UTF-8', 'TERM': 'xterm', 'SHLVL': '2', 'PWD': '/', 'PATH': '/sbin:/usr/sbin:/bin:/usr/bin', '_': '/usr/bin/cobblerd'}
The terminal session calling "cobbler get-loaders" DOES have the proxies defined, both upper and lower case, and including HTTP, HTTPS, and FTP.
Regards,
Doug
----
MC Linux Infrastructure, 970-898-0411, Fort Collins 3UR8 (MS 57)
"Imagination is more important than knowledge." -- Albert Einstein
11 years, 5 months
odd repo mirror download path
by Edward Bailey
I just added a new repo mirror to our cobbler instance and after running
cobbler reposync I see that all the rpm packages are under a directory
called "repo name"/getPackage instead of under the normal directory defined
by the name of the repo. This is the first repo that has this extra
directory. Is this expected? Anyway to make it go away? All of our other
repos are presented as yum repositories with the same path structure and I
would like to avoid have this one repo path be different than the other
repos.
we are running cobbler-2.0.11-2.el5
Ed
11 years, 5 months