Puppet: System Administration Automated

Support

Ticket #737 (closed defect: duplicate)

Opened 1 year ago

Last modified 7 months ago

assigning no groups to a user fails

Reported by: kdesjard Assigned to: luke
Priority: normal Milestone: elmo
Component: user Version:
Severity: normal Keywords:
Cc: Triage Stage: Accepted
Attached Patches: None Complexity: Unknown

Description (Last modified by luke)

Within the user type I am unable to pass an empty array to the groups value so that the user is not assigned to any groups.

    @user { "test":
        ensure  => "present",
        uid     => "500",
        gid     => "500",
        comment => "test user",
        home    => "/home/test",
        shell   => "/bin/bash",
        groups  => [],                        <----
        membership => "inclusive",
        require => Group["test"]

The error is:

err: //basenode/virt_all_users/User[test]/groups: change from root to  failed: interning empty string

I was able to track it down to the symbolize function in util.rb. Checking for the length of the string and not "intern"ing it fixed that problem, however, I have no idea if it breaks anything else.

def symbolize(value)
        if value.respond_to? :intern
           if( value.length == 0 )
                value
           else
                value.intern
           end
        else
            value
        end
    end

Change History

07/31/07 23:52:10 changed by luke

  • stage changed from Unreviewed to Accepted.
  • description changed.
  • milestone set to elmo.

04/24/08 06:59:10 changed by luke

  • component changed from library to user.

04/24/08 07:16:11 changed by luke

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

Marking #1076 as a duplicate.

04/24/08 07:17:38 changed by luke

Rather, marking this as a duplicate of #1076, even though it was opened later, because it has more information.