Pradeep Kilambi wrote:
I would expect the following behavior:
Lets say a consumer group has {location: rdu} and it has consumers A and B
* consumers A and B in that group by default will inherit the group's key value
pairs.
* If a consumer A has its own key value pair with same key, that takes
precedence over the group key value pair for the consumer.
What happens if consumer B is a part of another consumergroup having
{location: phx} ? Will it have two values for location then?
Also another way of looking at it is: if I want consumer to have a
different value for an attribute than that of the consumergroup, why
would I add it to consumergroup instead of adding it to individual
consumers? e.g, if I want to set location:rdu to all consumers in a
"testgroup", then I would add location:rdu to "testgroup". If I want to
set location:rdu for a few systems in "testgroup" and location:sea for
others, I will add it to individual consumers and not to "testgroup".
In short, if an attribute is set for a consumergroup, it should be the
same for all consumers in that group or it should not be the group
attribute at all, right?
* consumer B since he doesn't have a location, will default to consumer group's
key value.
This way a consumer can have its own location and not effect other consumers in
the same group to inherit group values?
~ Prad
----- Original Message -----
From: "Sayli Karmarkar" <[email protected]>
To: "pulp-list" <[email protected]>
Sent: Monday, September 27, 2010 1:28:39 PM GMT -05:00 US/Canada Eastern
Subject: [Pulp-list] Consumergroup add_keyvalue error handling
As we decided in key-value attributes deep dive, I am making changes to
consumergroup to make key_value_pair a property of consumergroup (not
just consumer). That will make sure that consumers added to the
consumergroup AFTER setting a key-value property of the group will also
inherit that property. This complicates error handling a little bit.
Let's say I have consumer1 and consumer2 registered to the pulp-server
and I add key-value {location : rdu} to consumer1. consumer1 and
consumer2 belong to consumergroup "testgroup". When I try to add
key-value {location : sea} to this group, should it -
1. fail saying consumer1 already has different value for that key ?
2. override key-value for consumer1 to {location : sea} ? (basically
delete location key from consumer1, so there is no conflict)
3. fail, unless --override flag is set ?
Same error handling will need to be added when adding a consumer to
consumergroup.
Thoughts? Suggestions?
--
Sayli Karmarkar
[email protected]
Systems Management
http://www.redhat.com
_______________________________________________
Pulp-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/pulp-list