[PATCH] - fix default mgmt_parameters value for sub_profiles
by Bill Peck
When the default value is <<inherit>> I'm not sure why a sub_object
default would be any different. Unless of course its the parent field.
This patch fixes the following traceback when creating a subprofile.
Wed Jun 30 11:03:57 2010 - INFO | Exception occured:
exceptions.AttributeError
Wed Jun 30 11:03:57 2010 - INFO | Exception value: 'int' object has no
attribute 'copy'
Wed Jun 30 11:03:57 2010 - INFO | Exception Info:
File "/usr/lib/python2.4/site-packages/cobbler/remote.py", line 1747,
in _dispatch
return method_handle(*params)
File "/usr/lib/python2.4/site-packages/cobbler/remote.py", line 872,
in save_profile
return self.save_item("profile",object_id,token,editmode=editmode)
File "/usr/lib/python2.4/site-packages/cobbler/remote.py", line 866,
in save_item
rc = self.api.add_item(what,obj)
File "/usr/lib/python2.4/site-packages/cobbler/api.py", line 394, in
add_item
return
self.get_items(what).add(ref,check_for_duplicate_names=check_for_duplicate_names,save=save,logger=logger)
File "/usr/lib/python2.4/site-packages/cobbler/collection.py", line
286, in add
self.lite_sync.add_single_profile(ref.name)
File "/usr/lib/python2.4/site-packages/cobbler/action_litesync.py",
line 103, in add_single_profile
self.sync.pxegen.write_templates(profile)
File "/usr/lib/python2.4/site-packages/cobbler/pxegen.py", line 684,
in write_templates
blended = utils.blender(self.api, False, obj)
File "/usr/lib/python2.4/site-packages/cobbler/utils.py", line 612,
in blender
__consolidate(node,results)
File "/usr/lib/python2.4/site-packages/cobbler/utils.py", line 780,
in __consolidate
results[field].update(data_item.copy())
13 years, 10 months
Python tftp server for cobbler...
by Douglas Kilpatrick
The master branch of my github tree http://github.com/kilpatds/cobbler)
has a working python tftp server. This has a few advantages for Cobbler
* Sync and Litesync get lighter, no need to copy images, generate
configs
* Because the tftp server knows the host that requested a given file,
we don't need to rely on pxelinux.0's name munging
* which makes it much easier to support other operating systems that
don't have the exact same form of munging.
I was wondering if it could be reviewed and included?
---------------
Notes:
The patch adds another management module, the tftpd module. Some code
in sync/sync lite and pxegen has been moved to that module. If you
chose the "system tftpd" module (the default: "in_tftpd"), all the same
files get generated.
The modules also edit xinetd.d/tftp on sync.
The python tftpd module ("tftpd_py") doesn't create any of the files in
/tftpboot, and sets up xinetd to run to tftpd.py instead. That program
is included in the scripts/ directory in the source tree.
The xmlrpc interface "get_system_for_koan" includes the pxelinux.cfg
stanza in the returned data, except with hardcoded strings for the
kernel and initrd field. (see below)
tftpd.py is based off of the tornado event loop. It uses the web
service to look up the requesting client, and then services requests
from 3 different sources:
* a new "fetchable_files" attribute
* hardcoded logic for "pxelinux.cfg", "kernel", and "initrd", that fetch
the requested fields from the system information, and return the
relevant bits.
* /tftpboot, as before.
Doug
--
Doug Kilpatrick
kilpatds(a)oppositelock.org
13 years, 10 months
Re: [PATCH] Fixing cobbler web and cobbler --version command in 2.1.0
by Alex Kesling
This has been fixed, thanks for the patch... I wish I'd noticed it prior to having (and fixing) the issue myself.
----- Original Message -----
From: "Kelsey Hightower" <kelsey.hightower(a)gmail.com>
To: cobbler-devel(a)lists.fedorahosted.org
Sent: Sunday, June 27, 2010 3:07:46 PM GMT -05:00 US/Canada Eastern
Subject: [PATCH] Fixing cobbler web and cobbler --version command in 2.1.0
Looks like the cobbler/api.py version method requires
"/var/lib/cobbler/version" to be present on the local file system
which was generated by gen_build_version() in the old setup.py. With
gen_build_version() removed in 2.1.0 both cobbler_web (views.py) and
"cobbler --version" (cobbler.cli.py) are broken.
The attached patch adds gen_build_version() back to setup.py without
gitstamp, gitdate, and builddate version data (Do we really want to
include this data in the version file?). In keeping with the trend to
slim down setup.py, the patch also moves /var/lib/cobbler/version to
/etc/cobbler/version.
How to reproduce:
- Install cobbler and cobbler-web 2.1.0-2 on a clean system
- Visit http://<cobbler_host>/cobbler_web/
- run cobbler --version on the command line
Exceptions:
cobbler cli
=========
[root@madhatter ~]# cobbler --version
Cobbler 2.1.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 547, in main
rc = cli.run(sys.argv)
File "/usr/lib/python2.4/site-packages/cobbler/cli.py", line 212, in run
self.direct_command(direct_action)
File "/usr/lib/python2.4/site-packages/cobbler/cli.py", line 372, in
direct_command
print " source: %s, %s" % (version["gitstamp"], version["gitdate"])
KeyError: 'gitstamp'
cobbler web
==========
Environment:
Request Method: GET
Request URL: http://192.168.33.100/cobbler_web/
Django Version: 1.1.1
Python Version: 2.4.3
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.4/site-packages/django/core/handlers/base.py"
in get_response
92. response = callback(request, *callback_args,
**callback_kwargs)
File "/usr/share/cobbler/web/cobbler_web/views.py" in index
92. html = t.render(Context({
File "/usr/lib64/python2.4/xmlrpclib.py" in __call__
1096. return self.__send(self.__name, args)
File "/usr/lib64/python2.4/xmlrpclib.py" in __request
1383. verbose=self.__verbose
File "/usr/lib64/python2.4/xmlrpclib.py" in request
1147. return self._parse_response(h.getfile(), sock)
File "/usr/lib64/python2.4/xmlrpclib.py" in _parse_response
1286. return u.close()
File "/usr/lib64/python2.4/xmlrpclib.py" in close
744. raise Fault(**self._stack[0])
Exception Type: Fault at /cobbler_web/
Exception Value: <Fault 1: "exceptions.IOError:[Errno 2] No such file
or directory: '/var/lib/cobbler/version'">
_______________________________________________
cobbler-devel mailing list
cobbler-devel(a)lists.fedorahosted.org
https://fedorahosted.org/mailman/listinfo/cobbler-devel
13 years, 11 months