| Summary: | Regression importing Red Hat distros with 'cobbler import | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Cole Robinson <crobinso> | ||||
| Component: | cobbler | Assignee: | James C. <jimi> | ||||
| Status: | CLOSED NEXTRELEASE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
| Severity: | unspecified | Docs Contact: | |||||
| Priority: | unspecified | ||||||
| Version: | 16 | CC: | awood, dgoodwin, shenson, vanmeeuwen+fedora | ||||
| Target Milestone: | --- | ||||||
| Target Release: | --- | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2012-04-21 13:18:11 UTC | Type: | --- | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Attachments: |
|
||||||
|
Description
Cole Robinson
2011-10-27 20:31:48 UTC
Created attachment 530565 [details]
Fix various issues importing RH distros
A couple more fixes were needed for importing an F16 tree. The first basic one is that fedora16 needs to be added to the whitelist in cobblers/codes.py
Second problem is that scanning an x86_64 tree is again detecting 2 architectures, because the kernel package scanning is picking up an i686 kernel-tools package. This patch fixes that:
@@ -835,12 +844,22 @@ class ImportRedhatManager:
"""
Is the given filename a kernel filename?
"""
+ blacklist = ["kernel-tools"]
+ whitelist = ["kernel-header", "kernel-source", "kernel-smp",
+ "kernel-largesmp", "kernel-hugemem", "linux-headers-",
+ "kernel-devel", "kernel-"]
if not filename.endswith("rpm") and not filename.endswith("deb"):
return False
- for match in ["kernel-header", "kernel-source", "kernel-smp", "kernel-largesmp", "kernel-hugemem", "linux-headers-", "kernel-devel", "kernel-"]:
+
+ for match in blacklist:
+ if filename.find(match) != -1:
+ return False
+
+ for match in whitelist:
if filename.find(match) != -1:
return True
+
return False
def scan_pkg_filename(self, rpm):
Yall should probably be parsing .treeinfo files for red hat distros, it's much much easier. Would also be nice to have some logic that makes an unknown fedora value just default to the highest supported fedora OS. We do similar things in python-virtinst:
http://git.fedorahosted.org/git/?p=python-virtinst.git;a=blob_plain;f=virtinst/OSDistro.py;hb=HEAD
This package has changed ownership in the Fedora Package Database. Reassigning to the new owner of this component. I believe this has been fixed in the most recent release (2.2.x). Can you please verify if this is still an issue? I have imported SL6 on a F16 system running cobbler without issue. Things don't obviously fail like previously, but now there is a very annoying change in behavior. I have a RHEL6 tree on my local machine. I want cobbler to learn about it and advertise a kickstart for it. I don't want it to copy it to it's preferred location. sudo cobbler import --name=xdist-rhel6-latest --path=/mnt/data/devel/trees/rhel6-latest --available-as=http://192.168.1.149/trees/rhel6-latest Previously the above invocation was a very quick operation. With current version from updates-testing, it begins rsyncing the distro tree to /var/www/cobbler/ks_mirror/xdist-rhel6-latest which would leave 2 copies on my physical machine. Maybe there was a regression and import just isn't taking into account --available-as ? Actually it looks like the change was deliberate (and done by you) :) https://github.com/cobbler/cobbler/commit/494d36ff5053958a90fc71c48a5b038b6b1907b0 But the commit message provides little justification for this change. All the cobbler documentation for --available-as touted its main feature that it didn't try and mirror the distro to another location. So this change is a regression and an API break since the cli tool is the admin's API to cobbler. IMO this change should be reverted. If you need a way to pass to specify network_root but still do the mirroring, what you want is a new cli option to force mirroring, not changing existing option semantics. My workflow has me regularly blow away and reimport distros with cobbler (I'm a virt developer and use pxe to advertise multiple distros). Yes, that is correct. That commit was to address a chicken & egg problem with the new import modules, which have to scan files before they can figure out what distro to import. Doing the full rsync was supposed to be a stop-gap measure so that --available-as imports didn't fail outright (which was the situation before). I will start working on correcting this situation, which is going to involve using a file containing a whitelist of just the files it needs to rsync while excluding the rest. This bug will be closed as fixed, and I'll open a new issue on github to track the fix if that works for you. Got this working for RedHat-based distros: http://pastebin.com/qSYeW973 As you can see, the downloaded data for Centos 5.8 was just 78M - much better than the full DVD (or more). I should get the rest of the distros fixed up the same way, and will aim to get fix in 2.2.3. Sounds good, thanks James. I'd also appreciate a redhat bugzilla so I can track when the issue is fixed in fedora. That's fine, I'll just leave this open as well. The github issue is https://github.com/cobbler/cobbler/issues/138 Code merged into master to correct this: https://github.com/cobbler/cobbler/pull/145 If there's enough testing we may be able to get it into 2.2.3, otherwise it will be in 2.2.4. |