The Puppet Labs Issue Tracker has Moved: https://tickets.puppetlabs.com

Bug #13078

Renaming a group fails: "groupadd: GID already exists"

Added by Bill Tong over 2 years ago. Updated about 2 years ago.

Status:RejectedStart date:03/13/2012
Priority:NormalDue date:
Assignee:eric sorenson% Done:

0%

Category:-
Target version:-
Affected Puppet version: Branch:
Keywords:

We've Moved!

Ticket tracking is now hosted in JIRA: https://tickets.puppetlabs.com

This issue is currently not available for export. If you are experiencing the issue described below, please file a new ticket in JIRA. Once a new ticket has been created, please add a link to it that points back to this Redmine ticket.


Description

group { 'originally-old':
    ensure => present,
    gid => 5,
    name => 'newname',
}

fails with GID already exists.

History

#1 Updated by Bill Tong over 2 years ago

group { ‘originally-old’: ensure => present, gid => 5, name => ‘newname’, }

#2 Updated by Patrick Carlisle over 2 years ago

  • Description updated (diff)

#3 Updated by Patrick Carlisle over 2 years ago

As I understand it this is from the choice to identify the group by the name and not by the gid within puppet. You can create and delete groups, or change the gid of a group, but not rename a group. I think you could just use two resources to delete the first name and create the second.

#4 Updated by Patrick Carlisle over 2 years ago

  • Status changed from Unreviewed to Needs Decision
  • Assignee set to Nigel Kersten

I think it’s unlikely that we’ll change this, but it seems a reasonable use case.

#5 Updated by Anonymous over 2 years ago

Patrick Carlisle wrote:

I think it’s unlikely that we’ll change this, but it seems a reasonable use case.

Specifically, Nigel, can you let us know if there is a specifically desired behaviour from your point of view?

My feeling is that we should treat “the gid is out of sync” as a reason to change the gid and no other properties of the group by name. That is, the name of the group is the primary attribute, alone, and the gid is just another facet to change.

We shouldn’t do anything about files on disk that had the old gid; if folks want that changed too, they can engineer that themselves.

#6 Updated by Nigel Kersten about 2 years ago

  • Assignee changed from Nigel Kersten to eric sorenson

#7 Updated by eric sorenson about 2 years ago

  • Status changed from Needs Decision to Rejected

I agree with Daniel in update 5 – the group name is simply the namevar.

Bill Tong, you can effect this in a more idempotent way by declaring your new group name ought to have the desired GID and the old group name should be marked ensure => absent.

Also available in: Atom PDF