Getting rid of bad cobbler metavariables
by Adam Rosenwald
A FAQ that I have brought up on numerous occasions on IRC involves
'getting rid of bad cobbler metavariables'.
If I were to set a wrong ks_meta variable NAME, how do I get rid of the
NAME without taking out ks_meta entirely.
E.g.
`cobbler system add --name=NAME --ksmeta='arg0=val0 arg1=val1
*art2*=val2 ... argN=valN' ...`
There are quite a number of scenarios where I don't want to remove all
of ksmeta, but only a mistyped variable name. I have heard about the
'!ARG' syntax:
E.g.
`cobbler system edit --in-place --name=NAME --ksmeta='*!art2*'`
Supposedly this syntax will, upon deserialization of the JSON, clear the
ks_meta namespace of *art2*; however, upon issuing a report on a given
entity, the flawed variable will still appear along with the negated
variable.
I.e.
ks_meta : 'arg0=val0 arg1=val1 *art2*=*val2* ... argN=valN *!art2*'
For those who make use of this data for inventory or other purposes, the
'!VAR' notation does not cut it. I would like a definitive explanation
of how to remove bad metavariables irrespective of deserialization.
Thanks,
- A.
14 years, 3 months
Inconsistency between cobbler webui (system list) and command line
by Ronald J. Yacketta
Hello all!
Doing some system renaming via the system webui, after making my changes
I sync'ed and noticed that the webui differs form what the command lind
reports
cobbler system list
00_09_6B_DA_71_46
00_16_3E_02_10_41
00_16_3E_41_55_2A
Dalaran
Sol
WebProxynew
antivirus
apollo2
calendar
chalkboard
eden
eva
f11base
genesis
ie-linux
iesurveys
images
iris
naxx
ox
pluto
torquetest
treekiller
zeusdev2
zord
== cobbler ==
cobbler version
cobbler 1.6.6
build date : Fri Jun 12 16:22:03 2009
Copyright (C) 2006-2008 Red Hat, Inc.
License GPLv2+: GNU GPL version 2 or later
<http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Written by Michael DeHaan.
I also restarted cobblerd as well as rebooted (not needed..) the server,
ended with the same result as above.
-Ron
14 years, 6 months
RHEL 5.3 failure: repodata/primary.xml.gz
by CLIFFORD ILKAY
Hello,
I read a post
<https://fedorahosted.org/pipermail/cobbler/2009-April/003838.html> that
describes the same problem I'm having trying to install CentOS 5.3 via
Cobbler.
I created a CentOS 5.3 profile, mirrored a bunch of CentOS 5.3 repos,
and the first problem I encountered was that the CentOS choked on the
kickstart file that I've been using on Fedora 10 and 11. I removed lines
from the file until it no longer complained. I got as far as the
"Retrieving installation information" right after I selected the
timezone and got an error:
"Unable to read package metadata. This may be due to missing repodata
directory. Please ensure that your install tree has been correctly
generated. failure: repodata/primary.xml.gz from
anaconda-base-2009-3211311.x86_64: [Errno 256] No more mirrors to try."
I've run "cobbler sync" and "cobbler reposync" already. How do I work
around this?
--
Regards,
Clifford Ilkay
Dinamis
1419-3266 Yonge St.
Toronto, ON
Canada M4N 3P6
<http://dinamis.com>
+1 416-410-3326
14 years, 6 months
cobbler 2.0 webui profile list only shows 50 items
by Bryan Schneiders
I have more than 50 profiles. Only the first 50 are shown on the profile page. If I change how it's sorted I can see some of the hidden profiles.
Is this intentional? Is there a "next page" button I'm not seeing?
--
Bryan Schneiders
bschneiders(a)woti.com
301-562-1900 ext 305
14 years, 6 months
ksmeta and the webui
by Christopher Dale
I think I have stumbled into a small annoyance with the ksmeta field in the
webui. I am using cobbler to build directory server and have the following
ksmeta:
suffix='dc=incommon, dc=dev' dsDBName=incommonDB adminDomain=incommon.dev
configDirHost=ds01 rootDNPwd=incommon.dev adminPwd=password
When I save (from the webui) the first time, I get the following result in
the json file
"ks_meta": {"suffix": "dc=incommon, dc=dev", "dsDBName": "incommonDB",
"adminDomain": "incommon.dev", "configDirHost": "ds01", "rootDNPwd":
"incommon.dev", "adminPwd": "password"}
The webui is then refreshed with the following ksmeta line. Note that the
single quotes have been removed. This also happens for double quotes.
suffix=dc=incommon, dc=dev dsDBName=incommonDB adminDomain=incommon.dev
configDirHost=ds01 rootDNPwd=incommon.dev adminPwd=password
If I save from the webui again, the following transformation takes place in
the json file
"ks_meta": {"suffix": "dc=incommon,", "dsDBName": "incommonDB", "dc": "dev",
"adminDomain": "incommon.dev", "configDirHost": "ds01", "rootDNPwd":
"incommon.dev", "adminPwd": "password"}
And the ksmeta field in the webui is rewritten in such a way as to separate
the suffix.
suffix=dc=incommon, dsDBName=incommonDB dc=dev adminDomain=incommon.dev
configDirHost=ds01 rootDNPwd=incommon.dev adminPwd=password
Please note that if I write the ksmeta line as such (no space between the
parts of the suffix), everything is handled correctly.
suffix=dc=incommon,dc=dev dsDBName=incommonDB adminDomain=incommon.dev
configDirHost=ds01 rootDNPwd=incommon.dev adminPwd=password
I realize that this is probably not a bug, per se, but if there is ever a
real need to embed a space into the ksmeta, one would need to be mindful of
the implications for the second time you save the profile.
14 years, 6 months
Cobbler 2.0 WebUI: 'NoneType' object has no attribute 'can_access'
by Bryan Schneiders
cobbler-2.0.0-1.fc10.noarch
cobbler-web-2.0.0-1.fc10.noarch
I can access the Settings, Events, Distros, Profiles, Systems, Repos, Images, Kickstart Templates and Snippets fine.
But when I try to visit the "Check", "Sync", "Reposync" or "Build ISO" pages in the new web interface, I get the following error.
Fault at /cobbler_web/check
<Fault 1: "<type 'exceptions.AttributeError'>:'NoneType' object has no attribute 'can_access'">
Request Method: GET
Request URL: http://fs1.woti.com/cobbler_web/check
Exception Type: Fault
Exception Value:
<Fault 1: "<type 'exceptions.AttributeError'>:'NoneType' object has no attribute 'can_access'">
Exception Location: /usr/lib/python2.5/xmlrpclib.py in close, line 790
Python Executable: /usr/bin/python
Python Version: 2.5.2
Python Path: ['/usr/share/cobbler/web/', '/usr/lib/python2.5/site-packages/cobbler/modules', '/usr/lib/python2.5/site-packages/cobbler', '/usr/lib/python25.zip', '/usr/lib/python2.5', '/usr/lib/python2.5/plat-linux2', '/usr/lib/python2.5/lib-tk', '/usr/lib/python2.5/lib-dynload', '/usr/lib/python2.5/site-packages', '/usr/lib/python2.5/site-packages/Numeric', '/usr/lib/python2.5/site-packages/PIL', '/usr/lib/python2.5/site-packages/gtk-2.0', '/var/www/cobbler/svc/']
Server time: Tue, 29 Sep 2009 17:26:28 +0000
Environment:
Request Method: GET
Request URL: http://fs1.woti.com/cobbler_web/check
Django Version: 1.0.3
Python Version: 2.5.2
Installed Applications:
['django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'cobbler_web']
Installed Middleware:
('django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware')
Traceback:
File "/usr/lib/python2.5/site-packages/django/core/handlers/base.py" in get_response
91. response = callback(request, *callback_args, **callback_kwargs)
File "/usr/share/cobbler/web/cobbler_web/views.py" in check
506. results = remote.check(token)
File "/usr/lib/python2.5/xmlrpclib.py" in __call__
1150. return self.__send(self.__name, args)
File "/usr/lib/python2.5/xmlrpclib.py" in __request
1440. verbose=self.__verbose
File "/usr/lib/python2.5/xmlrpclib.py" in request
1204. return self._parse_response(h.getfile(), sock)
File "/usr/lib/python2.5/xmlrpclib.py" in _parse_response
1343. return u.close()
File "/usr/lib/python2.5/xmlrpclib.py" in close
790. raise Fault(**self._stack[0])
Exception Type: Fault at /cobbler_web/check
Exception Value: <Fault 1: "<type 'exceptions.AttributeError'>:'NoneType' object has no attribute 'can_access'">
--
Bryan Schneiders
bschneiders(a)woti.com
301-562-1900 ext 305
14 years, 6 months
cobbler 2.0 workaround for SELinux and misc issues
by Philippe Eveque
Hi,
to share my testing experience with cobbler2.0 (thanks for it!) hoping it
can hepls others.
My context:
- having one cobbler server1 being migrated from 1.6.x to 2.0.
- having one cobbler server2 directly installed in 2.0
Both servers configured with ldap authentication in /etc/cobbler/[settings,
modules.conf]
authorization is also on in modules.conf [module = authz_ownership]
Both servers are running with SELinux in enforcing mode.
The cobbler 2.0 SW was built from the source in each case.
I noticed the following:
- on server2 set up from scratch
cobbler import .... was complaining that the issued rsync command was
failing
I had to disable selinux for rsync to make cobbler import working with
the following command.
root# setsebool -P rsync_disable_trans=1
may be a better way exist ?
or something to be notified by the cobbler check command ?
Note this is not an issue is selinux is _not_ in enforcing mode.
- on server1 (migrated from 1.6.x) and after migration:
- Had to removed the "omapi" section from the /etc/cobbler/dhcp.template
file
a task for cobbler check ?
(not sure but that helps dumb guy like myself not reading the docs...
:-( )
- Some text comments attached with the systems had "accents"/diacritics
char.
I had to removed them (from jason files) to avoid a python stack trace
in the new WEB interface
(1.6.x was not having issue there - may be due to the move to django)
- In the new WEB interface, I got python stack trace when trying to sort
the "Systems" view on a per profile basis
The pb was with the /usr/share/cobbler/session/sessionid..... file
the following solved the issue:
root# chcon -t httpd_sys_content_t /usr/share/cobbler/web/sessions
and to be sure it will be persistent:
root # /usr/sbin/semanage fcontext -a -t httpd_sys_content_t
"/usr/share/cobbler/web(/.*)?"
may be something that can be addressed at installation time ?
Note this is not an issue is selinux is _not_ in enforcing mode.
- The "owners" field is not displayed anymore in the web interface.
That was very usefull to figure out who to contact.
Any easy way to make it visible again ?
Apart the small annoyance sabove, cobbler2.0 on server1 (the migrated one)
works very well
and I continue testing and experimenting with it.
thanks,
Phil.
14 years, 6 months
Cobbler 2.0 WebUI: AttributeError: 'module' object has no attribute 'uniquify'
by Bryan Schneiders
cobbler-2.0.0-1.fc10.noarch
cobbler-web-2.0.0-1.fc10.noarch
I'm seeing this error on various web ui links. Refreshing the page usually makes it go away. Clicking the same link immediately after a correct page finishes loading is an easy way to reproduce the error.
MOD_PYTHON ERROR
ProcessId: 22784
Interpreter: 'fs1.woti.com'
ServerName: 'fs1.woti.com'
DocumentRoot: '/var/www/html'
URI: '/cobbler_web/ksfile/list'
Location: '/cobbler_web'
Directory: None
Filename: '/var/www/cobbler_web'
PathInfo: '/ksfile/list'
Phase: 'PythonAuthenHandler'
Handler: 'cobbler_web.views'
Traceback (most recent call last):
File "/usr/lib/python2.5/site-packages/mod_python/importer.py", line 1537, in HandlerDispatch
default=default_handler, arg=req, silent=hlist.silent)
File "/usr/lib/python2.5/site-packages/mod_python/importer.py", line 1202, in _process_target
module = import_module(module_name, path=path)
File "/usr/lib/python2.5/site-packages/mod_python/importer.py", line 304, in import_module
return __import__(module_name, {}, {}, ['*'])
File "/usr/share/cobbler/web/cobbler_web/views.py", line 16, in <module>
import cobbler.item_distro as item_distro
File "/usr/lib/python2.5/site-packages/cobbler/item_distro.py", line 108, in <module>
[ "os_version","generic26",0,"OS Version",True,"Needed for some virtualization optimizations",codes.get_all_os_versions()],
File "/usr/lib/python2.5/site-packages/cobbler/codes.py", line 67, in get_all_os_versions
results = utils.uniquify(results)
AttributeError: 'module' object has no attribute 'uniquify'
--
Bryan Schneiders
bschneiders(a)woti.com
301-562-1900 ext 305
14 years, 7 months
Using usb disk cobbler boot and experiencing problems with initial menu/keyboard
by David Jablonski
I have built 5 other machines using the usb image I created using the
cobbler buildiso and the usb-livecd commands. Unfortunately this
particular machine currently will boot to the menu and then the keyboard
doesn't work and it won't load the kernel image (even if I change the
default to be the correct profile manually on the boot disk). It just
starts to load the isolinux image and then goes right back to the menu.
Has anyone experienced this before? Is this a module missing issue?
The machine is a Dell Optiplex GX620. Unfortunately I don't see any
errors...
Also I can get a Koan LiveCD to boot fine. Can I use this to start the
baremetal install process? This machine has brand new harddrives and
koan has never been installed. I'm not sure how to use the Koan LiveCD
to start the baremetal install process. Thanks for any advice...
--
David W. Jablonski
Systems Administrator
INOC
608.204.0202
608.663.4555 fax
djablonski(a)inoc.com
www.inoc.com
*** DELIVERING UPTIME ***
14 years, 7 months
cobbler repo rename
by Baptiste AGASSE
Hi all,
Today i have rename a repo in cobbler. The rename works but all data of this repository has been deleted.
Is it a normal behavior of "cobbler repo rename --name=myoldname --newname=mynewname" ?
Thanks for your answers.
Baptiste.
14 years, 7 months