update to system fails with Exception value: 'NoneType' object has no attribute 'os_version'
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cobbler (Ubuntu) |
Fix Released
|
Critical
|
Unassigned | ||
Oneiric |
Fix Released
|
Critical
|
Unassigned |
Bug Description
While I was trying to update a system/profile definition, I got hit by the backtrace below. Given the last line in the backtrace suggests this is an error in a 'distro' instance, I went and edited the disto affected: same error.
I then tried _other_ distros, and they also failed (but I did not try all). This was working as of 2.1.0+git201106
Cobbler version: 2.1.0+git201106
Wed Feb 29 00:27:10 2012 - DEBUG | get_item; ['profile', 'lucid-i386']
Wed Feb 29 00:27:10 2012 - DEBUG | authorize; ['cobbler', 'save_profile', <cobbler.
Wed Feb 29 00:27:10 2012 - DEBUG | get_items; ['profile']
Wed Feb 29 00:27:10 2012 - INFO | generating: /var/lib/
Wed Feb 29 00:27:10 2012 - INFO | generating: /var/lib/
Wed Feb 29 00:27:10 2012 - INFO | generating: /var/lib/
Wed Feb 29 00:27:10 2012 - INFO | generating: /var/lib/
Wed Feb 29 00:27:10 2012 - INFO | Exception occured: <type 'exceptions.
Wed Feb 29 00:27:10 2012 - INFO | Exception value: 'NoneType' object has no attribute 'os_version'
Wed Feb 29 00:27:10 2012 - INFO | Exception Info:
File "/usr/lib/
return method_
File "/usr/lib/
rc = self.api.
File "/usr/lib/
return self.get_
File "/usr/lib/
self.
File "/usr/lib/
self.
File "/usr/lib/
self.
File "/usr/lib/
profile=None, distro=None, arch=image.arch, image=image)
File "/usr/lib/
elif distro.
ProblemType: BugDistroRelease: Ubuntu 11.10
Package: cobbler 2.1.0+git201106
ProcVersionSign
Uname: Linux 3.0.0-12-server x86_64
ApportVersion: 1.23-0ubuntu4
Architecture: amd64
Date: Wed Feb 29 00:49:24 2012Installatio
PackageArchitec
[SRU REQUEST] - ONEIRIC
[Impact]
If am image is found, during PXE setup, the process may abort with the backtrace above. When this happens, no updates or usage of the affected profiles/systems is possible anymore, effectively disabling Cobbler.
[Development Fix]
A fix has been written by Scott Moser, and uploaded to precise; an upstream merge has been requested (https:/
[Stable Fix]A fix to Oneiric has been proposed; this fix is slightly different from upstream due to changes in the code from 2.1 to 2.2.2 and GIT. A package has been built on a PPA (https:/
[Test Case]
-- BEFORE applying the fix:
1. You MUST have images on your Cobbler install, and MUST try to update a profile/system with images.
2. Edit the profile/system;
3. Click on the SAVE button at the bottom.
FAILS -- an error is shown, and the /var/log/
-- AFTER applying the fixed package, and AFTER restarting Cobbler:
Repeat steps (1)-(3) above.
SUCCEEDS -- the save completes with no errors.
[Regression Potential]
Patch is isolated, straightforward, and affects only the code path in the backtrace.
[Original Report]
This is it. Additionally, there is https:/
Related branches
- James Page: Approve
- Ubuntu branches: Pending requested
-
Diff: 1126 lines (+951/-18)11 files modified.pc/48_ubuntu_mini_iso_autodetect.patch/cobbler/modules/manage_import_debian_ubuntu.py (+2/-2)
.pc/49_ubuntu_add_arm_arch_support.patch/cobbler/modules/manage_import_debian_ubuntu.py (+2/-2)
.pc/58_ubuntu_from_git_pxe_fails_on_image.patch/cobbler/pxegen.py (+876/-0)
.pc/applied-patches (+1/-0)
cobbler/codes.py (+1/-1)
cobbler/modules/manage_import_debian_ubuntu.py (+2/-2)
cobbler/pxegen.py (+3/-4)
debian/changelog (+18/-0)
debian/patches/47_ubuntu_add_oneiric_codename.patch (+7/-7)
debian/patches/58_ubuntu_from_git_pxe_fails_on_image.patch (+38/-0)
debian/patches/series (+1/-0)
Changed in cobbler (Ubuntu Oneiric): | |
status: | New → Triaged |
importance: | Undecided → Critical |
description: | updated |
description: | updated |
Well. Following the backtrace we see:
403 for image in image_list: exists( image.file) : pxe_file( filename= None, system=None,
404 if os.path.
405 contents = self.write_
406 profile=None, distro=None, arch=image.arch, image=image)
and distro is not otherwise set in write_pxe_file. So, no wonder the code barfs there.
Going on a limb, and marking confirmed.