cobbler replicate issues
by Ronald J. Yacketta
Trying to replicate from cobbler 2.0.3.1 to cobbler 2.0.11 and keep
running into the following:
cobbler replicate --master=_MASTER_SERVER_ --distros=* --profiles=*
--systems=* --sync-all
...
Updating Objects Newer On Remote
Linking Distro f14-i386
Exception occured: exceptions.NameError
Exception value: global name 'base' is not defined
Exception Info:
File "/usr/lib/python2.4/site-packages/cobbler/remote.py", line 95,
in run
rc = self._run(self)
File "/usr/lib/python2.4/site-packages/cobbler/remote.py", line 210,
in runner
self.logger
File "/usr/lib/python2.4/site-packages/cobbler/api.py", line 782, in
replicate
sync_all = sync_all
File "/usr/lib/python2.4/site-packages/cobbler/action_replicate.py",
line 342, in run
self.link_distros()
File "/usr/lib/python2.4/site-packages/cobbler/action_replicate.py",
line 193, in link_distros
print _("- symlink creation failed: %(base)s, %(dest)s") % { "base"
: base, "dest" : dest_link }
!!! TASK FAILED !!!
distro report on the 2.0.3.1 shows
cobbler distro report --name=f14-i386
Name : f14-i386
Architecture : i386
Breed : redhat
Comment :
Initrd : /mnt/iso/f14/images/pxeboot/initrd.img
Kernel : /mnt/iso/f14/images/pxeboot/vmlinuz
Kernel Options : {}
Kernel Options (Post Install) : {}
Kickstart Metadata : {}
Management Classes : []
OS Version : fedora14
Owners : ['admin']
Red Hat Management Key : <<inherit>>
Red Hat Management Server : <<inherit>>
Template Files : {}
I had to modify codes.py to add fedora14 and fedora15 and restart cobbler
Thoughts?
-Ron
12 years, 6 months
Setting up new Cobbler server from existing one
by petermity
If I have an existing Cobbler server all set up, is there an easy
way to copy all of the distros, profiles, and other Cobbler
aspects from it to a freshly created unit?
Could I just copy /etc/cobbler, /var/www/cobbler, and
/var/lib/cobbler to the new machine and then do cobbler sync?
12 years, 8 months
Allow multiple snippets directories
by petermity
Please allow multiple directories to be listed for "snippetsdir".
I like keeping my snippet files separate from the default Cobbler
ones.
Initially I added a symlink from the default snippets directory
to my snippets. But then I have to specify the directory path
for each snippet, and the hierarchy search method for per_profile
etc. doesn't work under that directory.
Then I changed the settings to point to my snippets directory
instead of the default, and copied Cobbler's default snippets to
my directory. Now I don't need to specify a path to snippets,
and the hierarchy works. But then everything is mixed up, and if
Cobbler's snippets change in a later release, it's easy to forget
to update them.
That's why it would be nice to be able to use a PATH or LIB style
method to allow multiple directories to be specified for
snippets. Then they don't need to be mixed up, yet the hierarchy
search could work in all directories.
12 years, 8 months
How to clear "cobbler status"?
by petermity
The "cobbler status" command is handy to see when builds are
running/finished. However, the display can be cluttered by units
that finished building (or hung/failed) days/weeks ago, even if
the Cobbler server is rebooted. Is there a way to start fresh?
Related: is there a wget command or some other method to tell
Cobbler that a failure occurred in the %post section? Something
analogous to the $kickstart_done, maybe a $kickstart_failed?
12 years, 8 months
list-harddrives macro
by Greg Chavez
With great success, I've used variations on the partition_select
snippet to create some very intelligent partitioning for different
profiles. However, I occasionally come across a scenario whereby my
Dell servers end up with the partitions reversed. For example, most of
our PERC RAID cards are setup like this:
Virtual Disk #0: 2 73G drives, RAID 0 (OS disk)
Virtual Disk #1: 6 300G drives, RAID 5 (data disk)
Generally, VD-0 gets read by anaconda as sda, and VD-1 as sdb. And in
fact, even on the messed up servers this works:
Disk /dev/sda: 72.7 GB, 72746008576 bytes
Disk /dev/sdb: 1497.2 GB, 1497198755840 bytes
But somehow, despite this snippet code (my simplest scenario):
=============================
set \$(list-harddrives)
let numd=\$#/2
d1=\$1
d2=\$3
cat << EOF > /tmp/partinfo
part /boot --fstype ext3 --size 200 --ondisk=\$d1 --asprimary
part swap --recommended --ondisk=\$d1 --asprimary
part pv.root --size=1024 --grow --ondisk=\$d1
part pv.srv --size=1024 --grow --ondisk=\$d2
volgroup vg00 pv.root
volgroup vg01 pv.srv
logvol / --fstype ext3 --size=1024 --vgname=vg00 --name=root --grow
logvol /srv --fstype ext3 --size=1024 --vgname=vg01 --name=srv --grow
EOF
=============================
The pv.root gets assigned to volume group 00, and pv.srv gets assigned
to volume group 01 and I get this:
[root@io-kvm-16 ~]# pvs
PV VG Fmt Attr PSize PFree
/dev/sda2 vg01 lvm2 a- 67.53g 0
/dev/sdb2 vg00 lvm2 a- 1.34t 0
AND
[root@io-kvm-16 ~]# df -h / /srv
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg00-root
1.4T 1.8G 1.3T 1% /
/dev/mapper/vg01-srv 67G 180M 63G 1% /srv
Argh! My suspicion is that the list-harddrives macros is spitting out
the devices names in reverse, such that $d1 gets sdb and $d2 gets sda.
Does anybody know where the list-harddrives macro comes from? Is it
an anaconda thing? How does it work? I realize that this is not
really a Cobbler issue, but maybe some of you who use this snippet
know more about my situation in general and this macro in particular?
Any help you guys can give me would be much appreciated, even if it's
just pointing me to another mailing list.
--
--Greg Chavez
--
12 years, 8 months
Directories for Advanced Snippets ?
by Dan White
In the wiki at <https://fedorahosted.org/cobbler/wiki/
KickstartSnippets> it talks about a tree of snippets --
/var/lib/cobbler/snippets/per_system/$snippet_name/$system_name
/var/lib/cobbler/snippets/per_profile/$snippet_name/$profile_name
/var/lib/cobbler/snippets/per_distro/$snippet_name/$distro_name
/var/lib/cobbler/snippets/$snippet_name
Does something in cobbler generate that tree for you or do you have to
build it by hand ?
12 years, 8 months
Trouble Adding Distros: Internal Error Unknown Distro Name
by Pete Eby
Howdy,
Though I've installed Cobbler several times in different environments,
usually with little issue, I've run into a snag which I'm having
trouble working out.
I'm running cobbler-2.0.11-2.el6.noarch and (cobbler-web) from EPEL on
RHEL 6.1 and I can't seem to be able to add a distro.
When I run:
cobbler distro add --breed=redhat --name=CentOS-5.6-32bit
--kernel=/var/lib/tftpboot/distros/CentOS5.6-32bit/vmlinuz
initrd=/var/lib/tftpboot/distros/CentOS5.6-32bit/initrd.img
No error is sent to std out, but then when I do a cobbler distro list,
no results are returned.
Looking at the log I see:
Tue Jul 26 09:22:50 2011 - INFO | REMOTE new_item(distro); user(<DIRECT>)
raise CX("internal error, unknown %s name %s" % (what,name))
File "/usr/lib/python2.6/site-packages/cobbler/remote.py", line
633, in get_item_handle
handle = self.get_item_handle(object_type, object_name)
File "/usr/lib/python2.6/site-packages/cobbler/remote.py", line 798,
in xapi_object_edit
Tue Jul 26 09:22:50 2011 - INFO | Exception Info:
Tue Jul 26 09:22:50 2011 - INFO | Exception value: 'internal error,
unknown distro name CentOS-5.6-32bit'
Tue Jul 26 09:22:50 2011 - INFO | Exception occured: <class
'cobbler.cexceptions.CX'>
Tue Jul 26 09:22:50 2011 - DEBUG | get_item; ['distro', 'CentOS-5.6-32bit']
Tue Jul 26 09:22:50 2011 - DEBUG | REMOTE CLI Authorized; user(?)
I've tried some variations, but get the above in all cases.
Any suggestion would by much appreciated.
Thank you,
Pete
12 years, 8 months
A small bug, I think, in adding yum repositories
by Dan White
I made a set of local yum repositories according to <https://access.redhat.com/kb/docs/DOC-35962>
As an example,
reposync --gpgcheck -l -n --repoid=rhel-x86_64-server-5 --download_path=/var/www/localRepo/rhel-x86_64-server-5
createrepo /var/www/localRepo/rhel-x86_64-server-5
and create an appropriate /etc/yum.repos.d/local.repo, naming my repo "local-rhel-x86_64-server-5"
OK, so now I want to roll this into cobbler.
So I say:
cobbler repo add --name=local-rhel-x86_64-server-5 --mirror=http://my.server.org/localRepo/rhel-x86_64-server-5 --mirror-locally=false --keep-updated=false
And then when I say:
cobbler reposync
I get this:
running /usr/bin/wget -q http://my.server.org/localRepo/rhel-x86_64-server-5/repodata/repomd.xml -O /var/www/cobbler/repo_mirror/local-rhel-x86_64-server-5/.origin/repomd.xml
received on stderr: /var/www/cobbler/repo_mirror/local-rhel-x86_64-server-5/.origin/repomd.xml: No such file or directory.
And the target directory (/var/www/cobbler/repo_mirror/local-rhel-x86_64-server-5) is empty
So I say:
mkdir /var/www/cobbler/repo_mirror/local-rhel-x86_64-server-5/.origin
and run cobbler reposync again, and get what looks like proper responses and proper contents of the directory.
So, the question/bug is: Why isn't the ".origin" directory created before trying to wget the file into it ?
“Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us.”
Bill Waterson (Calvin & Hobbes)
12 years, 8 months
A question about local mirrored repositories
by Dan White
What are the (dis)advantages about using cobbler directly to make a local repository mirror versus doing it separately with yum commands and then adding the repo to cobbler ?
“Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us.”
Bill Waterson (Calvin & Hobbes)
12 years, 8 months
Not a valid YAML file
by adeadhat
Tiny problem:
Request Method: GET
Request URL: http://192.168.122.141/cobbler_web/
Django Version: 1.3
Exception Type: CX
Exception Value:
'/etc/cobbler/settings is not a valid YAML file'
I have everything except this bit right here. This is the Django
exception I keep receiving. Everything else is up:
tcp 0 0 127.0.0.1:25151
0.0.0.0:* LISTEN
tcp 0 0 :::80
:::* LISTEN
[root@localhost cobbler]# cobbler check
Traceback (most recent call last):
File "/usr/lib/python2.4/site-packages/cobbler/utils.py", line 1964,
in local_get_cobbler_api_url
data = simplejson.load(fh)
File "build/bdist.linux-i686/egg/simplejson/__init__.py", line 329,
in load
File "build/bdist.linux-i686/egg/simplejson/__init__.py", line 385,
in loads
File "build/bdist.linux-i686/egg/simplejson/decoder.py", line 402, in
decode
File "build/bdist.linux-i686/egg/simplejson/decoder.py", line 420, in
raw_decode
JSONDecodeError: No JSON object could be decoded: line 1 column 0 (char 0)
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 541, in main
cli = BootCLI()
File "/usr/lib/python2.4/site-packages/cobbler/cli.py", line 116, in
__init__
self.url_cobbler_api = utils.local_get_cobbler_api_url()
File "/usr/lib/python2.4/site-packages/cobbler/utils.py", line 1968,
in local_get_cobbler_api_url
raise CX("/etc/cobbler/settings is not a valid YAML file")
cobbler.cexceptions.CX: '/etc/cobbler/settings is not a valid YAML file'
utils.py:
def local_get_cobbler_api_url():
# Load server and http port
try:
#fh = open("/etc/cobbler/settings")
fh = open("/etc/cobbler/settings.json")
Any suggestions?
12 years, 8 months