I actually had a similar issue when first running cobbler (from a Debian
system). Cobbler attempts to determine the operating system version and
has some logic for various distributions. On my debian system, it checks
/etc/debian_version. Unfortunately, not every version uses a floating
point representation (i.e. 4.0). Some use words or have multiple dots.
IMHO cobbler should be modified to accomodate such situations. To do my
development last summer, I had to clobber this line and put in dummy
constants:
return (make, float(version), rest)
in utils.py os_release(). I don't know exactly where this version
information is used or why it's a float. How hard would it be to make
this a string? If it's not too involved, I may find time (this weekend)
to do it myself.
~
Dan
Chris O'Regan wrote:
> I am setting up a custom install of cobbler v1.2.4 (custom in the sense
> that I am massaging it into our application tree). Unfortunately
> something appears to be broken. Simple things like "cobbler --help" or
> "cobbler <ACTION> --help" work, but other tasks do not. The messages I
> am getting seem to indicate syntax or programming errors. Any ideas?
> Thanks in advance.
>
>
> [EMAIL PROTECTED] repo]$ cobbler check
>
> local variable 'rc' referenced before assignment
> File
> "/local/pkg/python-2.5.2/root/lib/python2.5/site-packages/cobbler/cobbler.py",
>
> line 77, in main
> rc = BootCLI().run(sys.argv)
>
> File
> "/local/pkg/python-2.5.2/root/lib/python2.5/site-packages/cobbler/cobbler.py",
>
> line 57, in run
> return self.loader.run(args)
>
> File
> "/local/pkg/python-2.5.2/root/lib/python2.5/site-packages/cobbler/commands.py",
>
> line 116, in run
> return fn.run()
>
> File
> "/local/pkg/python-2.5.2/root/lib/python2.5/site-packages/cobbler/modules/cli_misc.py",
>
> line 53, in run
> status = self.api.check()
>
> File
> "/local/pkg/python-2.5.2/root/lib/python2.5/site-packages/cobbler/api.py",
> line 357, in check
> return check.run()
>
> File
> "/local/pkg/python-2.5.2/root/lib/python2.5/site-packages/cobbler/action_check.py",
>
> line 68, in run
> self.check_service(status, "cobblerd")
>
> File
> "/local/pkg/python-2.5.2/root/lib/python2.5/site-packages/cobbler/action_check.py",
>
> line 92, in check_service
> if rc != 0:
>
>
> [EMAIL PROTECTED] repo]$ cobbler sync
>
> invalid literal for float(): 5server
> File
> "/local/pkg/python-2.5.2/root/lib/python2.5/site-packages/cobbler/cobbler.py",
>
> line 77, in main
> rc = BootCLI().run(sys.argv)
>
> File
> "/local/pkg/python-2.5.2/root/lib/python2.5/site-packages/cobbler/cobbler.py",
>
> line 57, in run
> return self.loader.run(args)
>
> File
> "/local/pkg/python-2.5.2/root/lib/python2.5/site-packages/cobbler/commands.py",
>
> line 116, in run
> return fn.run()
>
> File
> "/local/pkg/python-2.5.2/root/lib/python2.5/site-packages/cobbler/modules/cli_misc.py",
>
> line 223, in run
> return self.api.sync()
>
> File
> "/local/pkg/python-2.5.2/root/lib/python2.5/site-packages/cobbler/api.py",
> line 380, in sync
> sync = self.get_sync()
>
> File
> "/local/pkg/python-2.5.2/root/lib/python2.5/site-packages/cobbler/api.py",
> line 394, in get_sync
> return action_sync.BootSync(self._config,dhcp=self.dhcp,dns=self.dns)
>
> File
> "/local/pkg/python-2.5.2/root/lib/python2.5/site-packages/cobbler/action_sync.py",
>
> line 68, in __init__
> self.pxegen = pxegen.PXEGen(config)
>
> File
> "/local/pkg/python-2.5.2/root/lib/python2.5/site-packages/cobbler/pxegen.py",
> line 65, in __init__
> self.bootloc = utils.tftpboot_location()
>
> File
> "/local/pkg/python-2.5.2/root/lib/python2.5/site-packages/cobbler/utils.py",
> line 752, in tftpboot_location
> (make,version,rest) = os_release()
>
> File
> "/local/pkg/python-2.5.2/root/lib/python2.5/site-packages/cobbler/utils.py",
> line 724, in os_release
> return (make, float(version), rest)
>
>
> Chris
> _______________________________________________
> cobbler mailing list
> [email protected]
> https://fedorahosted.org/mailman/listinfo/cobbler
>
_______________________________________________
cobbler mailing list
[email protected]
https://fedorahosted.org/mailman/listinfo/cobbler