[prev in list] [next in list] [prev in thread] [next in thread]
List: puppet-bugs
Subject: Re: [Puppet-bugs] [puppet] #737: assigning no groups to a user fails
From: "puppet" <trac () reductivelabs ! com>
Date: 2007-07-31 21:52:10
Message-ID: 054.6454e10b720b3ec5f271ec7292eb836d () reductivelabs ! com
[Download RAW message or body]
#737: assigning no groups to a user fails
-----------------------------+----------------------------------------------
Reporter: kdesjard | Owner: luke
Type: defect | Status: new
Priority: normal | Milestone: elmo
Component: library | Version:
Severity: normal | Resolution:
Keywords: | Stage: Accepted
Approval: Unnecessary | Patch: None
Complexity: Unknown | Compatibility: Unknown
Specification: Unnecessary |
-----------------------------+----------------------------------------------
Changes (by luke):
* stage: Unreviewed => Accepted
* milestone: => elmo
Old description:
> 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
New description:
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
}}}
--
Ticket URL: <https://reductivelabs.com/trac/puppet/ticket/737#comment:1>
puppet <https://reductivelabs.com>
Puppet - Portable System Automation
_______________________________________________
Puppet-bugs mailing list
Puppet-bugs@madstop.com
https://mail.madstop.com/mailman/listinfo/puppet-bugs
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic