Bug 1028828 - cobbler import --path /mnt/dvd --name=fedora19 --arch=x86_64 throws exception for fedora19-x64
Summary: cobbler import --path /mnt/dvd --name=fedora19 --arch=x86_64 throws exceptio...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: cobbler
Version: 19
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
Assignee: James C.
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-11-11 00:45 UTC by Doug Maxey
Modified: 2015-04-11 18:09 UTC (History)
4 users (show)

Fixed In Version: cobbler-2.4.4-1.el5
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-05-03 19:57:11 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Doug Maxey 2013-11-11 00:45:04 UTC
Description of problem:
This looks very similar to https://bugzilla.redhat.com/show_bug.cgi?id=998221, 
with the difference this is for fedora19-x64, with the current cobbler.

Version-Release number of selected component (if applicable):
cobbler-2.4.0-1.fc19.noarch

How reproducible:
100%

Steps to Reproduce:
1. install fresh copy of cobbler on f19
2. setup all local details
3. cobbler import --path /mnt/dvd  --name=fedora19 --arch=x86_64

Actual results:
# cobbler import --path /mnt/dvd  --name=fedora19 --arch=x86_64
task started: 2013-11-10_182023_import
task started (id=Media import, time=Sun Nov 10 18:20:23 2013)
Found a candidate signature: breed=redhat, version=rhel6
Found a candidate signature: breed=redhat, version=fedora16
Found a candidate signature: breed=redhat, version=fedora17
Found a candidate signature: breed=redhat, version=fedora18
Found a candidate signature: breed=redhat, version=fedora19
Found a matching signature: breed=redhat, version=fedora19
Adding distros from path /var/www/cobbler/ks_mirror/fedora19-x86_64:
creating new distro: fedora19-x86_64
Exception occured: <class 'cobbler.cexceptions.CX'>
Exception value: 'invalid input type'
Exception Info:
  File "/usr/lib/python2.7/site-packages/cobbler/remote.py", line 89, in run
    rc = self._run(self)
   File "/usr/lib/python2.7/site-packages/cobbler/remote.py", line 232, in runner
    self.logger
   File "/usr/lib/python2.7/site-packages/cobbler/api.py", line 925, in import_tree
    return import_module.run(path,mirror_name,network_root,kickstart_file,arch,breed,os_version)
   File "/usr/lib/python2.7/site-packages/cobbler/modules/manage_import_signatures.py", line 141, in run
    os.path.walk(self.path, self.distro_adder, distros_added)
   File "/usr/lib64/python2.7/posixpath.py", line 246, in walk
    walk(name, func, arg)
   File "/usr/lib64/python2.7/posixpath.py", line 246, in walk
    walk(name, func, arg)
   File "/usr/lib64/python2.7/posixpath.py", line 238, in walk
    func(arg, top, names)
   File "/usr/lib/python2.7/site-packages/cobbler/modules/manage_import_signatures.py", line 256, in distro_adder
    adtls.append(self.add_entry(dirname,kernel,initrd))
   File "/usr/lib/python2.7/site-packages/cobbler/modules/manage_import_signatures.py", line 314, in add_entry
    distro.set_kernel_options_post(self.signature.get("kernel_options_post",""))
   File "/usr/lib/python2.7/site-packages/cobbler/item.py", line 196, in set_kernel_options_post
    (success, value) = utils.input_string_or_hash(options,allow_multiples=True)
   File "/usr/lib/python2.7/site-packages/cobbler/utils.py", line 584, in input_string_or_hash
    raise CX(_("invalid input type"))

!!! TASK FAILED !!!


Expected results:


Additional info:
I got it to this point by adding the following patch to 
diff --git a/var/lib/cobbler/distro_signatures.json b/var/lib/cobbler/distro_signatures.json
index 9ad816d..dabe211 100644
--- a/var/lib/cobbler/distro_signatures.json
+++ b/var/lib/cobbler/distro_signatures.json
@@ -96,6 +96,22 @@
     "kernel_options":"repo=$tree",
     "kernel_options_post":"",
     "boot_files":[]
+   },
+   "fedora19": {
+    "signatures":["Packages"],
+    "version_file":"(fedora)-release-19-(.*)\\.noarch\\.rpm",
+    "version_file_regex":null,
+    "kernel_arch":"kernel-(.*)\\.rpm",
+    "kernel_arch_regex":null,
+    "supported_arches":["i386","x86_64","ppc","ppc64"],
+    "supported_repo_breeds":["rsync", "rhn", "yum"],
+    "kernel_file":"vmlinuz(.*)",
+    "initrd_file":"initrd(.*)\\.img",
+    "isolinux_ok":false,
+    "default_kickstart":"/var/lib/cobbler/kickstarts/sample_end.ks",
+    "kernel_options":"repo=$tree",
+    "kernel_options_post":"",
+    "boot_files":[]
    }
   },
   "debian": {

Comment 1 Pete Travis 2013-12-29 19:21:03 UTC
I also saw this on F20 - even with the distro_signatures.py from git master. To troubleshoot further, I did a `ln -s /path/to/cobbler_upstream_git_master/cobbler/lib/site-packages/python2.7/cobbler` to start hacking the problem out of the code, and found it has been resolved already.

James, can we have an update for this package to some appropriate recent commit, to bring in the updated signatures and other code changes needed to deploy F20?

Comment 2 Fedora Update System 2014-04-21 20:33:15 UTC
cobbler-2.4.3-1.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/cobbler-2.4.3-1.fc19

Comment 3 Fedora Update System 2014-04-21 20:33:44 UTC
cobbler-2.4.3-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/cobbler-2.4.3-1.fc20

Comment 4 Fedora Update System 2014-04-22 15:33:38 UTC
cobbler-2.4.4-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/cobbler-2.4.4-1.fc20

Comment 5 Fedora Update System 2014-04-22 15:34:45 UTC
cobbler-2.4.4-1.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/cobbler-2.4.4-1.fc19

Comment 6 Fedora Update System 2014-04-22 15:35:46 UTC
cobbler-2.4.4-1.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/cobbler-2.4.4-1.el6

Comment 7 Fedora Update System 2014-04-22 15:36:50 UTC
cobbler-2.4.4-1.el5 has been submitted as an update for Fedora EPEL 5.
https://admin.fedoraproject.org/updates/cobbler-2.4.4-1.el5

Comment 8 Fedora Update System 2014-04-22 19:56:08 UTC
Package cobbler-2.4.4-1.el5:
* should fix your issue,
* was pushed to the Fedora EPEL 5 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=epel-testing cobbler-2.4.4-1.el5'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-EPEL-2014-1211/cobbler-2.4.4-1.el5
then log in and leave karma (feedback).

Comment 9 Fedora Update System 2014-05-03 19:57:11 UTC
cobbler-2.4.4-1.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 10 Fedora Update System 2014-05-08 21:59:15 UTC
cobbler-2.4.4-1.el6 has been pushed to the Fedora EPEL 6 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 11 Fedora Update System 2014-05-09 02:56:27 UTC
cobbler-2.4.4-1.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 12 Fedora Update System 2014-05-09 22:01:27 UTC
cobbler-2.4.4-1.el5 has been pushed to the Fedora EPEL 5 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.