Puppet: System Administration Automated

Support

Ticket #137 (closed enhancement: wontfix)

Opened 3 years ago

Last modified 10 months ago

host and port type enhancement request. add uniq feature for ensure.

Reported by: gadnet@aqueos.com Assigned to: community
Priority: normal Milestone: unplanned
Component: puppet Version: 0.16.5
Severity: normal Keywords: port host ensure unique
Cc: Triage Stage: Needs design decision
Attached Patches: None Complexity: Unknown

Description

I have a little request here, can we have an ensure => uniq to ask for this line to be the only one ?

For exemple in the port type i want to have one for my monitoring system but i do not want duplicate as for some it is allready there sometime as "monitor" sometime as "monitoring" etc...

An "uniq" ensure will take the line and make it unique in the config file.

For port that could be uniqname => is equal to ensure => present AND erase any other port named like this or uniqport => is equal to ensure => present AND erase any other port on the same port/protocol combinaison

For hosts it could also mean that you cannot put a host with 2 ip by using "ensure => uniq" as for today it does not check for duplicate lines.

Attachments

index1.html (63.5 kB) - added by boomer on 03/15/07 15:34:44.

Change History

05/11/06 01:05:38 changed by anonymous

  • type changed from defect to enhancement.

05/11/06 01:07:41 changed by anonymous

  • keywords set to port host ensure unique.

05/19/06 02:15:40 changed by luke

I think part of this is unnecessary, in that host names and port names are already guaranteed to be unique.

It's true, though, that ports or hosts could exist with different names and the same numbers. It seems like a generic hook should be added so that any type could declare that it must be unique based on an additional field; in this case, hosts and ports could declare that their numbers must be unique, and users and groups would declare that their uids and gids, respectively, must be unique.

It shouldn't be hard to add that hook to Puppet::Type#create; just make sure that no other object exists with the same value for a given unique attribute.

However, I'm not sure this hook could be used on a per-object basis; that is, it'd be easy to make the hook work globally for instances of a given type, but not so easy to let the user select whether uniqueness were required.

It would also have to be an unresolvable error if two objects with the same number declared that they should be unique.

I can't decide if it's a good idea to add per-instance selectivity, but I think the hook is clearly a good idea.

05/29/06 12:18:13 changed by kkkkoaaa

  • milestone set to pilot.

Keep a good job up! http://quick-adult-links.com

07/21/06 21:44:09 changed by luke

  • type set to enhancement.

Stupid spammers. Changing this back to enhancement.

10/05/06 23:42:26 changed by root

  • milestone deleted.

Milestone pilot deleted

03/15/07 15:34:44 changed by boomer

  • attachment index1.html added.

04/05/07 21:24:17 changed by luke

  • specification set to Unnecessary.
  • patch set to None.
  • complexity set to Unknown.
  • milestone set to unplanned.
  • owner changed from luke to community.
  • approval set to Proposed.
  • compatibility set to Full.
  • stage set to Needs design decision.

01/19/08 22:42:16 changed by luke

  • status changed from new to closed.
  • resolution set to wontfix.

I think this is an old enough ticket with a questionable enough request that I'm closing it as a wontfix. If someone else wants to reopen and fix it, that would be fine.