Hello folks,
I finally found the culprit of not being able to successfully import a distro in
Beaker. (kudos to Raymond Mancy who told me where to look).
This code snippet in osversion.trigger get_paths() is wrong:
79 found = None
80 while kerneldir != os.path.dirname(tree_path):
81 for x in signatures:
82 d = os.path.join( kerneldir, x)
83 if os.path.exists( d ):
84 found = True
85 break
86 if found:
87 break
88 kerneldir = os.path.dirname(kerneldir)
89
90 return dict( tree_path = tree_path,
91 path = path,
92 package_path = os.path.join(tree_path ,x))
tree_path is .../rhel-server-5.6-x86_64/
kerneldir is .../rhel-server-5.6-x86_64/images/pxeboot/vmlinuz
The while loop starts iterating. In my case it will iterate 3 times. found will
always be False because we try to search for meaningful repos under the
kerneldir (e.g. Server, Client, etc.) and of course repos are not there.
Then as the last step in the loop we update the kerneldir variable and seek one
level up in the directory structure. But when we finally have kerneldir ==
tree_path the loop exits. (i.e. we never have a chance to find the signature repos).
found is None and x is Client (the last element in the signatures array).
Thus the function returns wrong result. As consequence osversion.trigger will
try to decide which distro is this by looking for
.../rhel-server-5.6-x86_64/Client/redhat-release* which is not present.
Changing line 82 to something like:
d = os.path.join( os.path.dirname(tree_path), x)
helps and distros were imported in cobbler successfully (they were present in
the webUI).
However looping through several directories up to the tree root is meaningless
IMHO. The files/directories that we try to find (the signatures elements) are
always under the tree_path directory and one or two levels above the kerneldir.
I'm not sure how to best fix this issue. Please advise.
This is with beaker-lab-controller-0.6.8-5.el5
--
Alexander.
_______________________________________________
Beaker-devel mailing list
Beaker-devel(a)lists.fedorahosted.org
https://fedorahosted.org/mailman/listinfo/beaker-devel
Try applying the attached patch. I'm not sure your hitting the same
thing but its worth a try.