For those who may not be aware, we moved imports to a modular setup in 2.2.0 to remove the spaghetti code that imports were turning into. This allowed us to start supporting distros other than Red Hat based ones much easier, though there is still a long way to go.
One of the consequences of this move was a chicken and egg situation caused by the fact that files had to be present locally before the distro detection code could kick in, which pretty much stopped --available-as from working as intended. As a stop-gap solution, I modified the code to pull down the entire remote tree - an obviously less than ideal situation since the entire purpose of --available-as is that you don't need to copy files to cobbler locally. I have just merged in code that begins to correct this: https://github.com/cobbler/cobbler/pull/145 Essentially the way it works is a new file is created that acts as a whitelist for rsync (/etc/cobbler/import_rsync_whitelist) and limits what files are pulled down when --available-as is specified. This should work both when using --path=rsync://... and when importing from a locally mounted ISO (but when you want the bulk of the files to be pulled from another http/ftp/etc. source). I'm confident most (if not all) issues with this method can be fixed by adding entries to the whitelist file, so it should make things less painful since people won't need to know python to submit fixes. Example: $ cobbler import \ > --name=fedora-16-remote \ > --path=rsync://mirrors.kernel.org/mirrors/fedora/releases/16/Fedora/x86_64/os/ > \ > --available-as=http://mirrors.kernel.org/fedora/releases/16/Fedora/x86_64/os/ task started: 2012-04-21_072558_import task started (id=Media import, time=Sat Apr 21 07:25:58 2012) Found a redhat compatible signature: Packages adding distros - Warning : Multiple archs found : ['x86_64', 'i386'] creating new distro: fedora-16-remote-x86_64 creating new profile: fedora-16-remote-x86_64 creating new distro: fedora-16-remote-i386 creating new profile: fedora-16-remote-i386 associating kickstarts *** TASK COMPLETE *** $ cobbler distro report --name=fedora-16-remote-x86_64 Name : fedora-16-remote-x86_64 Architecture : x86_64 TFTP Boot Files : {} Breed : redhat Comment : fedora16.1 Fetchable Files : {} Initrd : /var/www/cobbler/ks_mirror/fedora-16-remote/images/pxeboot/initrd.img Kernel : /var/www/cobbler/ks_mirror/fedora-16-remote/images/pxeboot/vmlinuz Kernel Options : {} Kernel Options (Post Install) : {} Kickstart Metadata : {'tree': 'http://mirrors.kernel.org/fedora/releases/16/Fedora/x86_64/os/'} Management Classes : [] OS Version : fedora16 Owners : ['admin'] Red Hat Management Key : <<inherit>> Red Hat Management Server : <<inherit>> Template Files : {} Caveats: 1) This still requires a lot of testing, and probably won't be in 2.2.3. I'm still getting up to speed on the Debian/Ubuntu and Suse build process so pretty much all I've done is verify that a distro/profile pair is imported correctly. 2) Debian/Ubuntu are not well supported with this method, mainly due to the way their mirrors store all of the distro versions in a hierarchy that is somewhat jumbled together (all the packages are in the pool/ directory for every version on the mirror). As I said above, this has been merged into the master branch on github, so I'd appreciate any help in testing this. Enjoy! _______________________________________________ cobbler mailing list [email protected] https://fedorahosted.org/mailman/listinfo/cobbler
