Triggers Documentation?
by Gary Algier
Hello,
I would like to write a cobbler trigger to do something every time I add a
system. I looked at the documentation at:
https://fedorahosted.org/cobbler/wiki/CobblerTriggers
but I think I am missing something.
A simple example is given in the form of a shell script and it shows $1 used
as the name of a newly added system. However, I see nothing defining the
arguments passed, nor the environment. I see that one can use the
CobblerApi, but when I follow the link it tells me not to use "BootApi" (is
BootApi == CobblerApi?) but to use "CobblerXmlrpc" instead. That seems to be
a client/server system. The trigger docs say not to use it.
A says use B. B says don't use B, use C. A says don't use C. ????
So, is there anything defining the trigger API?
Does one really need to use Python to do anything meaningful? I'm definitely
not a Python wiz.
It says that pre-triggers can prevent an add operation. How? Just exit(1)?
How do I report errors back to the user?
In case it would help to understand my situation, I would like to be able to
leave the networking empty and have a system add operation automatically
define eth0 using the hostname to look up the MAC via "getent ethers
hostname". I can easily write the code to do the lookup in sh/bash/ksh or
perl, but I need to be able to supply the information back to the cobbler
system after the lookup. I need to be able to fail on errors.
--
Gary Algier, WB2FWZ gaa at ulticom.com +1 856 787 2758
Ulticom Inc., 1020 Briggs Rd, Mt. Laurel, NJ 08054 Fax:+1 856 866 2033
Nielsen's First Law of Computer Manuals:
People don't read documentation voluntarily.
13 years, 1 month
pxelocal.template and $pxe_menu_items
by Pablo Iranzo Gómez
Hi
I would like to achieve something similar to pxedefault.template but with the custom options of pxelocal.template after a system has been provisoned.
The idea is to offer the full range of profiles to each system as an aditional option.
What I did was to put $pxe_menu_items stanza on the pxelocal.template as I did with pxedefault.template, but no matter what I do, it doesn't get rendered.
After looking at the code at pxegen.py, I can see the metadata["pxe_menu_items"] in "make_actual_pxe_menu" (which outputs pxelinux.cfg/default) but not on the function referencing pxelocal.template ("write_pxe_file"), so my guess is that this is not implemented.
¿any hint?
Thanks in advance
Pablo
--
Pablo Iranzo Gómez (Pablo.Iranzo(a)redhat.com)
Senior Global Profesional Services Consultant (RHCA, RHCSS, RHCDS, RHCVA, RHCE, RHCSP) #804006196923216
Phone: +34 645 01 01 49 (CET/CEST)
GnuPG KeyID: 0xFAD3CF0D
13 years, 1 month
Re: Ldap records
by marek.dohojda@thomsonreuters.com
What I did was to write my own cgi page. As the last step in install the cgi is called with all the parameters that I want, the cgi has all the logic I need to finish the install.
----- Original Message -----
From: cobbler-bounces(a)lists.fedorahosted.org <cobbler-bounces(a)lists.fedorahosted.org>
To: cobbler(a)lists.fedorahosted.org <cobbler(a)lists.fedorahosted.org>
Sent: Sat Mar 26 17:24:35 2011
Subject: Ldap records
I use puppet with ldap for config management and am about to rollout about 70 vms.
How can I invoke a bash script when a server is built to add the host into ldap?
How can I pass parameters to the script like management classes?
Thanks,
Dave Augustus
_______________________________________________
cobbler mailing list
cobbler(a)lists.fedorahosted.org
https://fedorahosted.org/mailman/listinfo/cobbler
13 years, 1 month
EPEL 6 repo failures
by Gary Algier
I am trying to add the EPEL 6 repo. I used these commands:
cobbler repo add --name=epel-6-x86_64 \
--mirror=http://download.fedora.redhat.com/pub/epel/6/x86_64/
cobbler reposync
and it fails on the reposync. Running the reposync manually just like cobbler
reposync does, I see:
yum.Errors.NoMoreMirrorsRepoError: failure:
repodata/6c1a4a2b29a529a44b5fb644759bd34d737776b838b7a311e915fefcdf12f571-primary.sqlite.bz2
from epel-6-x86_64: [Errno 256] No more mirrors to try.
Looking at the traffic with wireshark and doing a manual wget of the file,
sure enough it does not exist as:
/pub/epel/6/x86_64/repodata/repodata/6c1a4a2b...
It looks like there is an extra repodata.
Is there something wrong with the repo?
Or is it reposync?
Or is it me?
Is there an easy fix?
My version:
cobbler version
Cobbler 2.0.9
source: ?, ?
build time: Thu Dec 9 05:07:25 2010
--
Gary Algier, WB2FWZ gaa at ulticom.com +1 856 787 2758
Ulticom Inc., 1020 Briggs Rd, Mt. Laurel, NJ 08054 Fax:+1 856 866 2033
Nielsen's First Law of Computer Manuals:
People don't read documentation voluntarily.
13 years, 1 month
Ldap records
by Dave Augustus
I use puppet with ldap for config management and am about to rollout about 70 vms.
How can I invoke a bash script when a server is built to add the host into ldap?
How can I pass parameters to the script like management classes?
Thanks,
Dave Augustus
13 years, 1 month
template files
by Steven Goodliff
Hi,
I tried to specify a -template-files="" line to a profile that referenced a java ca cert file so that we could update all our servers with the koan update-files.
However cobbler/ cheetah tried to parse it and fails, so i added a #raw and #end raw but I still get the same error.
cobbler system edit --name=app01 --template-files="/var/www/cobbler/localmirror/software/cacertssjg=/usr/java/default/jre/lib/security/cacerts"
Traceback (most recent call last):
File "/usr/bin/cobbler", line 35, in ?
sys.exit(app.main())
File "/usr/lib/python2.4/site-packages/cobbler/cli.py", line 509, in main
rc = cli.run(sys.argv)
File "/usr/lib/python2.4/site-packages/cobbler/cli.py", line 195, in run
self.object_command(object_type, object_action)
File "/usr/lib/python2.4/site-packages/cobbler/cli.py", line 263, in object_command
self.remote.xapi_object_edit(object_type, options.name, object_action, utils.strip_none(vars(options), omit_none=True), self.token)
File "/usr/lib64/python2.4/xmlrpclib.py", line 1096, in __call__
return self.__send(self.__name, args)
File "/usr/lib64/python2.4/xmlrpclib.py", line 1383, in __request
verbose=self.__verbose
File "/usr/lib64/python2.4/xmlrpclib.py", line 1147, in request
return self._parse_response(h.getfile(), sock)
File "/usr/lib64/python2.4/xmlrpclib.py", line 1281, in _parse_response
p.feed(response)
File "/usr/lib64/python2.4/xmlrpclib.py", line 527, in feed
self._parser.Parse(data, 0)
xml.parsers.expat.ExpatError: not well-formed (invalid token): line 18, column 6
Is there any way to force cobbler cheetah to totally disable the parsing and just to serve the file as is ?
Thanks
Steve Goodliff
The information contained in this email is confidential and may also be subject to legal privilege. It is intended only for the recipient(s) named above. If you are not named above as a recipient, you must not read, copy, disclose, forward or otherwise use the information contained in this email. If you have received this e-mail in error, please notify the sender (whose contact details are above) immediately by reply e-mail and delete the message and any attachments without retaining any copies. Gaming Technologies Solutions Limited is a company registered in England and Wales with the company number 5425266, the registered office is 55 Baker Street, London, W1U 7EU Virtue Fusion (Alderney) Ltd is a company registered in Alderney with the company number 1628, the registered office is Kington Lodge, Le Grand Val, Alderney, GY9 3XD, British Channel Islands
The information contained in this email is confidential and may also be subject to legal privilege. It is intended only for the recipient(s) named above. If you are not named above as a recipient, you must not read, copy, disclose, forward or otherwise use the information contained in this email. If you have received this e-mail in error, please notify the sender (whose contact details are above) immediately by reply e-mail and delete the message and any attachments without retaining any copies. Gaming Technologies Solutions Limited is a company registered in England and Wales with the company number 5425266, the registered office is 55 Baker Street, London, W1U 7EU Virtue Fusion (Alderney) Ltd is a company registered in Alderney with the company number 1628, the registered office is Kington Lodge, Le Grand Val, Alderney, GY9 3XD, British Channel Islands
13 years, 1 month
Disbling some cobbler functions
by Arnau Bria
Hi all,
we'd like to use cobbler (cobbler_web) for repository management.
The host is shared with our simple install procedure, so, when we
restart cobblerd it puts some stuff in /tftboot and other plcaes.
I'm able to disable DNS/dhcpd part by editing settings file but, is
there any way for disabling "install" part of cobbler?
TIA,
Arnau
13 years, 1 month
Re: Install Most Recent Fedora 14 Packages vs. What Is On DVD
by Alan Crosswell
This doesn't work well as there are too many download sites that throw
HTTP 403's and 404's. However, I figured out (duh) to just add the
metalink repos into the kickstart file, bypassing cobbler. Not the best
but a good workaround. So, I use cobbler to identify my
locally-mirrored distros and repos but then just add repo --mirrorlists
with metalinks in the ks file, along with some ksmeta to make it less
arch-specific ($arch is defined. I had to use ksmeta to define $release):
...
# Use network installation
url --url=$tree
# get the repos for our locally mirrored stuff from cobbler
$yum_repo_stanza
# but since cobbler can't grok metalinks, do these right here (be tricky
with release & arch)
repo --name everything --mirrorlist
https://mirrors.fedoraproject.org/metalink?repo=fedora-$release&arch=$arch
repo --name updates --mirrorlist
https://mirrors.fedoraproject.org/metalink?repo=updates-released-f$releas...
...
I've submitted an RFE to support metalinks in cobbler:
https://fedorahosted.org/cobbler/ticket/652
/a
On 03/20/2011 10:16 PM, Alan Crosswell wrote:
> OK, so I can't use a metalink, but can use
> http://download.fedoraproject.org/pub/fedora/linux/releases/$release/$bas...
> which is what I was trying to do anyway. I did have an error popup a
> couple of times during installiton and had to select retry due to a
> complaint about a corrupted RPM -- so I guess one of the Fedora mirrors
> is messed up (the Anaconda log on tty3 shows HTTP 403 errors from
> mirror.cc.vt.edu). It would be nice if Anaconda would automatically
> retry a couple of times so I can get a totally hands-off install.... I
> think because Anaconda only thinks it's got the one mirror (1/1). Maybe
> I can just make two or three repos that are identical copies so Anaconda
> will think it has more repos to try....
>
> /a
> On 03/07/2011 01:56 AM, Christian Horn wrote:
>> On Sun, Mar 06, 2011 at 05:09:19PM -0500, Alan Crosswell wrote:
>>> Does cobbler support metalink URLs for repos like those found in
>>> /etc/yum.repos.d? Something like (with the variables expanded for the
>>> specific release and arch):
>>>
>>> https://mirrors.fedoraproject.org/metalink?repo=fedora-14&arch=i386
>>>
>>> Last time I tried this, I found I had to provide a specific mirror.
>> True, doesnt work.
>> Apparently to check availability of the mirror 'cobbler reposync' tries
>> to fetch 'repodata/repomd.xml'. For a url you have in mind like
>>
>> https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=$basearch
>>
>> the possible values of $basearch you want to use would have to be guessed
>> by reposync.. maybe the check could be disabled. When repos are not to
>> be mirrored locally fetching 'repodata/repomd.xml' serves no further
>> purpose than 'quick check' as i see it. Might be deeper magic there thou.
>>
>>
>> Christian
>>
13 years, 1 month
(possible) bad bug in sync function from cobbler_web
by Dave Augustus
Hello All,
I just ran into this today. I was creating a repo for internal use of
rpms that I have had to download from non-yum sources.
All of this is done via the web ui with cobbler.
Create a new repo.
Set the arch to i386, noarch or x86_64.
Set it to use rsync.
Don't set the Keep Update flag.
Leave the mirror field empty.
Give it a name like "disk-hog"
Sync it from the repo web page. It will fail and send you to the
Profiles page(this is also a bug).
Go to the repos page again and the Mirror field is set to "/".
Run createrepo from the command line "createrepo disk-hog".
It should start "rsyncing" the local drive to your repo tree. I stopped
mine as I knew there were only 2 rpms in the tree. Listing that repo
tree showed that the process had begun to rsync my entire drive,
starting at /.
I am glad I had not setup the "createrepo" cron yet!!!!!
When creating this, I just realized that my versions are matching. I
still want to post this to the list for information for others to find
and test.
#rpm -q cobbler
cobbler-2.0.5-1.el5
# rpm -q cobbler-web
cobbler-web-2.0.9-1.el5
Have a great day!
Dave
13 years, 1 month
Using Cobbler DHCP server for static entries
by Daniel Kertby
Hi,
I've been investigating how to setup Cobbler to use the local DHCP server to
setup static entries but
without success.
when executing 'cobbler system add ...' I want Cobbler to use the
--ip-adress= and mac-address= variables to
setup the DHCP server to have the static mapping. I cannot find any good
documentation and my trials have failed.
Anyone?
Regards,
Daniel
13 years, 1 month