Ticket #595 (closed defect: fixed)
group categories not handled quite right
Reported by: | Jim Rowan <[email protected]…> | Owned by: | desai |
---|---|---|---|
Priority: | minor | Milestone: | Bcfg2 0.9.6 Release |
Component: | bcfg2-server | Version: | |
Keywords: | Cc: |
Description
I tried something which turns out to be illegal in my group config, and was surprised with the results. I'm not sure which aspects of this are defective, if any.
from Metadata/groups.xml:
<Group name='sles'> <Group name='suse'/> </Group> <Group name='sles9' category='sles-version'> <Group name='sles'/> </Group> <Group name='sles9sp1' category='sles-version'> <Group name='sles9'/> </Group> <Group name='sles9sp3' category='sles-version'> <Group name='sles9sp1'/> </Group>
Output from bcfg2-info groups:
sles | no | | suse,rpm,linux,unix sles9 | no | sles-version | sles,suse,rpm,linux,unix sles9sp1 | no | sles-version | sles9,sles,suse,rpm,linux,unix sles9sp3 | no | sles-version | sles9sp1
So, I have two issues.
1.) The configuration validated with no mention that I had this heirarchy of groups with the same category. Probably, some warning is appropriate at the very least.
2.) The doc says "A group can only contain one instance of a group in any category." Literally taken, this is ambiguous (I believe) with respect to the situation of a group including another instance of the same category. However, the intent seems clear and I think the first level inclusion of sles9 in sles9sp1 should have failed.
I fixed the metadata plugin to log category-based group suppression properly. This should help with the clearness of things. This is committed in [4d23a9ea84291522dcd18dd996ae4ba03eeb6a84] (SVN r4896)