Issue #18460 has been updated by eric sorenson.

Status changed from Unreviewed to Investigating
Assignee set to Gary Larizza

Gary thanks for looking at this. I've assigned the ticket to you but if you get 
to the end of your availability to troubleshoot it please feel free to assign 
it back to me.

----------------------------------------
Bug #18460: OSX user provider when used in "puppet resource" does not show 
correct values
https://projects.puppetlabs.com/issues/18460#change-89069

* Author: Andrew Parker
* Status: Investigating
* Priority: Normal
* Assignee: Gary Larizza
* Category: 
* Target version: 
* Affected Puppet version: 3.0.2
* Keywords: osx, provider, user
* Branch: 
----------------------------------------
When the user type is used in "puppet resource" on OSX the output after making 
a change is the state of the user *before* the change was made rather than 
*after*. This is different from my expectation and also different from what the 
provider on an Ubuntu system does.

Creating the user initially provides some of the information:
<pre>
Puppets-Mac:~ development$ sudo puppet resource user puppet ensure=present 
gid=puppet shell='/sbin/nologin'
Notice: /User[puppet]/shell: defined 'shell' as '/sbin/nologin'
user { 'puppet':
  ensure => 'present',
  gid    => '495',
}
</pre>

Then running the same command again provides all of the information:
<pre>
Puppets-Mac:~ development$ sudo puppet resource user puppet ensure=present 
gid=puppet shell='/sbin/nologin'
user { 'puppet':
  ensure => 'present',
  gid    => '495',
  shell  => '/sbin/nologin',
}
</pre>

Making a change shows the change was made (/sbin/nologin => /bin/bash), but 
doesn't show the change in the printed resource
<pre>
Puppets-Mac:~ development$ sudo puppet resource user puppet ensure=present 
gid=puppet shell='/sbin/bash'
Notice: /User[puppet]/shell: shell changed '/sbin/nologin' to '/bin/bash'
user { 'puppet':
  ensure => 'present',
  gid    => '495',
  shell  => '/sbin/nologin',
}
</pre>

However, running it again will show the changed value.
<pre>
Puppets-Mac:~ development$ sudo puppet resource user puppet ensure=present 
gid=puppet shell='/bin/bash'
user { 'puppet':
  ensure => 'present',
  gid    => '495',
  shell  => '/bin/bash',
}
</pre>

It appears that the provider is not doing something right in order for the 
updated resource to be shown to the user. The user provider for Ubuntu was 
tried out and it will immediately (without needing to run a second time) show 
the updated values.

This has been tried on 3.0.2 and 3.1.0-rc1. Found during exploratory testing of 
3.1.0-rc1


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-bugs?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to