[et-mgmt-tools] OS type detection in virt-install/virt-manager

Daniel P. Berrange berrange at redhat.com
Thu Feb 14 03:50:08 UTC 2008


On Wed, Feb 13, 2008 at 09:53:44AM -0500, Cole Robinson wrote:
> Daniel P. Berrange wrote:
> > On Wed, Feb 13, 2008 at 09:38:11AM +0100, Alexander Todorov wrote:
> >> Hello,
> >> I was looking at the recent code in OSDistro.py
> >> Can we switch to using the new .treeinfo file and the information there 
> >> instead of the current if hasFile() mechanism?
> >> The .treeinfo provides with all the information needed to detect the 
> >> family type (Fedora, RHEL, CentOS ???) and boot images location.
> >> Also improve the acquire$FILE functions with that information.
> > 
> > What new .treeinfo file ?  It sounds interesting, but this is the first
> > I've heard of it... Is there anywhere that describes it ?
> > 
> > I don't see a .treeinfo file on the Fedora download sites, eg
> > 
> > http://download.fedora.redhat.com/pub/fedora/linux/development/x86_64/os/
> > 
> > http://download.fedora.redhat.com/pub/fedora/linux/releases/8/Fedora/x86_64/os/
> > 
> >> The reason I'm requesting this: in newer Fedora repos the packages dir 
> >> is simply called "Packages" but not "Fedora" and wrt remixing tools it 
> >> may be called with any name I think. OSDistro.py uses the presence of 
> >> fedora.css in the repo to decide on a Fedora distribution. This file 
> >> is not essential to the install process and may be missing in some repos.
> >>
> >> What do you think?
> > 
> > If there's ways we can improve the OS detection, I'm open to any suggestions.
> > 
> > Currently, we do the probing whether the user has manually selected a 
> > distro type or not.
> > 
> > One optimization would be to only do the probing if the user has NOT
> > explicitly selected a distro type. This would give users an easy way
> > to force the install to continue even if the 'magic' files are missing.
> > 
> > eg, if you select 'Fedora 8' in virt-manager it would just go straight
> > to the kernel/initrd fetch stage.
> > 
> > Dan.
> 
> I updated the hasFile function recently to not grab files and instead just
> test for their existence. This means we can change the distro detection
> to actually just be dependent on whether the install media is found or
> not. So the 'magic' file could be the file needed to actually run the
> install which should avoid any misses for goofy trees.

Yes, my original goal was that the file 'magic' would just serve as hinting
for detecting distros / sanity checking. In the end I made it a mandatory
check before doing anything - in retrospect this was a mistake because it
made the system fragile wrt to change, and also adds download overhead.
The 'hasFile' changes eliminate the overhead, but we still need to address
the reliability issue - the treeinfo would help here for Fedora at least.

Dan.
-- 
|=- Red Hat, Engineering, Emerging Technologies, Boston.  +1 978 392 2496 -=|
|=-           Perl modules: http://search.cpan.org/~danberr/              -=|
|=-               Projects: http://freshmeat.net/~danielpb/               -=|
|=-  GnuPG: 7D3B9505   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505  -=| 




More information about the et-mgmt-tools mailing list