Ticket #942 (closed enhancement: fixed)
Packages: unexpected structure val failure
Reported by: | m4z <[email protected]…> | Owned by: | desai |
---|---|---|---|
Priority: | minor | Milestone: | Bcfg2 1.2.0 Release |
Component: | bcfg2-server | Version: | 1.0 |
Keywords: | Cc: |
Description
(bcfg 1.1.0 + Packages.py r6048; not sure if this is a bug or if I'm using Packages wrong. Will test on rc5/1.1.0 in a few days.)
openSUSE has lots of archs for some repos, like:
<YUMSource> <Group>openSUSE11.2</Group> <RawURL>http://packages.example.org/susefoo/11.2/</RawURL> <Version>11.2</Version> <Component>susefoo</Component> <Arch>i386</Arch> <Arch>i486</Arch> <Arch>i586</Arch> <Arch>i686</Arch> <Arch>noarch</Arch> <Arch>src</Arch> <Arch>x86_64</Arch> </YUMSource>
Some of my clients cause errors like the following on the server:
Plugin Packages: unexpected structure val failure Traceback (most recent call last): File "/usr/local/lib/python2.6/site-packages/Bcfg2/Server/Core.py", line 149, in validate_data plugin.validate_structures(metadata, data) File "/usr/local/lib/python2.6/site-packages/Bcfg2/Server/Plugins/Packages.py", line 666, in validate_structures debug=self.debug_flag) File "/usr/local/lib/python2.6/site-packages/Bcfg2/Server/Plugins/Packages.py", line 550, in complete self.virt_pkgs[pgrps] = self.build_vpkgs_entry(meta) File "/usr/local/lib/python2.6/site-packages/Bcfg2/Server/Plugins/Packages.py", line 505, in build_vpkgs_entry s_vpkgs = source.get_vpkgs(meta) File "/usr/local/lib/python2.6/site-packages/Bcfg2/Server/Plugins/Packages.py", line 335, in get_vpkgs rv = Source.get_vpkgs(self, metadata) File "/usr/local/lib/python2.6/site-packages/Bcfg2/Server/Plugins/Packages.py", line 136, in get_vpkgs for key, value in self.provides[agrp].iteritems(): KeyError: 'i686' Generated config for foo.bar in 0.048s
I cannot yet pinpoint which of the repos is causing the error.
Is this a bug or am I simply doing it wrong (and should be using i386 and x86_64 only, for example)?
Attachments
Change History
comment:1 Changed 12 years ago by m4z <[email protected]…>
comment:2 Changed 12 years ago by m4z <[email protected]…>
There seems to be a related problem for CentOS (via asaf on IRC), but maybe it is the other way round: You want to directly use uname there to create your architecture groups and not collapse different groups. (This is implicitly documented in the CentOS QuickStart.)
Is there a generic way for any distro to determine
a) whether to use uname vs. for example /etc/$distro-version, and
b) whether to include i*86 into the i386 group or not to get the correct architecture info?
comment:3 Changed 12 years ago by desai
- Status changed from new to closed
- Resolution set to fixed
The code end if this is now fixed. In general, I don't think that it is needed to go down to the level of detail you are in the Packages configuration; I suspect that yum will do the right thing regardless on the client side.
The reason for this is related to a few things.
First, on openSUSE, the "real" architecture can differ from the architecture of the kernel, so my Probe groups (expanded version of the example Probe of the same name) returned wrong archs for some clients, because it used uname to determine it.
Second, even though packages exist for multiple architectures, you want your clients to only use either "x86_64" or "i386" (on openSUSE, at least).
Third: I still get some of these errors and have not yet been able to isolate them.