Modify

Ticket #753 (closed enhancement: fixed)

Opened 10 years ago

Last modified 7 years ago

Metadata/groups.xml to support multiple group level

Reported by: somekool <somekool@…> Owned by: https://www.google.com/accounts/o8/id?id=AItOawnSjgovXZr-_V3vGkvMSR0pc5LDykRc1Nc
Priority: major Milestone: Bcfg2 1.3.0 Release
Component: bcfg2-server Version: 0.9.x
Keywords: Cc:

Description

This is very annoying missing feature.

in Metadata/groups.xml I cannot do something like ...

  <Group name='grp1-foo'><Group name='grp2-bar'><Group name='grp3-foobar'>
    <Group name='grp123-foobar' />
  </Group> </Group> </Group>

only one level of <Group> is allowed

thanks

Attachments

Change History

comment:1 Changed 10 years ago by kisielk

You can express the same thing as:

<Group name="grp1-foo">
    <Group name="grp2-bar"/>
</Group>
<Group name="grp2-bar">
    <Group name="grp3-foobar"/>
</Group>
<Group name="grp3-foobar">
    <Group name="grp123-foobar"/>
</Group>

It's a little more verbose, but I think the level of complexity is lower.

comment:2 Changed 10 years ago by somekool <somekool@…>

ain't equivalent.

in your comment. you say that....

if a: then b if b: then c if c: then abc

which is equal to

if a or b or c: then abc

what I ask is

if a and b and c: then abc

comment:3 Changed 10 years ago by somekool <somekool@…>

  • Component changed from bcfg2-client to bcfg2-server

I should mentioned that my current needs could probably be fulfilled with the new GroupPatterns? plugin, as my [a,b,c] are derived from my hostname. But I am sure there could be other cases from dynamic probes. such as os-version and os-architecture for example.

one way or another; the xml schema validator should error out when you try to "embed" groups within groups for metadata like shown above. either that, or the functionality should work AsExpected?(tm).

thank you

comment:4 Changed 10 years ago by desai

  • Status changed from new to closed
  • Resolution set to wontfix

This is an ordering issue. If you want group b to include group c when group d is already asserted, you can add c at the same level where b and d are asserted. I'm pretty sure that will work in all cases. You *might* need to define these things at the profile level (or a new intermediate group) Conditional syntax like this won't be added in groups.xml; it would be too confusing in general.

comment:5 Changed 10 years ago by somekool <somekool@…>

  • Status changed from closed to reopened
  • Resolution wontfix deleted
  • Milestone changed from Bcfg2 1.0.0 Release to Bcfg2 1.0.1 Release

i think you miss understand my request. I am very much missing this feature.

here is a more realistic example.

I have app servers, production app servers and DEV app servers and QA app servers they are in the role-ap group and respectively in env-pr, env-dv and env-qa

all app server needs a special bundle; qa-ap needs proftpd server and I have another kind of machine that also needs proftpd. here is how I'd like to define this in Metadata/groups.xml

in some other cases, machines that correspond to multiple groups dont need to a specific bundle but would benefit from an extra group that I can reuse in several SGenshi bundles.

so I'd like to assign it like mentioned above

<Group name='role-ap'>

<Bundle name='bundle-app-server'/> <Group name='env-qa'>

<Bundle name='bundle-proftpd'/> <Group name='i_am_qa_ap_thankyou' />

</Group>

</Group> <Group name='other-machine'>

<Bundle name='bundle-proftpd'/>

</Group>

please

comment:6 Changed 10 years ago by somekool <somekool@…>

a patch for 0.9.6 would be GREAT !

comment:7 Changed 10 years ago by solj

  • Type changed from defect to enhancement
  • Milestone changed from Bcfg2 1.0.1 Release to Bcfg2 1.1.0 Release

comment:8 Changed 9 years ago by solj

  • Milestone changed from Bcfg2 1.1.0 Release to Bcfg2 1.2.0 Release

comment:9 Changed 8 years ago by https://www.google.com/accounts/o8/id?id=AItOawnSjgovXZr-_V3vGkvMSR0pc5LDykRc1Nc

  • Owner changed from desai to https://www.google.com/accounts/o8/id?id=AItOawnSjgovXZr-_V3vGkvMSR0pc5LDykRc1Nc
  • Status changed from reopened to accepted

comment:10 Changed 8 years ago by solj

  • Milestone changed from Bcfg2 1.2.0 Release to Bcfg2 1.3.0 Release

comment:11 Changed 7 years ago by https://www.google.com/accounts/o8/id?id=AItOawnSjgovXZr-_V3vGkvMSR0pc5LDykRc1Nc

  • Status changed from accepted to closed
  • Resolution set to fixed

WARNING! You need to establish a session before you can create or edit tickets. Otherwise the ticket will get treated as spam.

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.