Actually, this was more to not call out to the shell a million times since
shell invocation is expensive.

The Exec stacking was a weird effect that I want to figure out some time
but haven't had the time to.

If you have service statements for all services then sprinkle in exec
statements, you'll probably see a bell curve of execution time for the
execs.

Trevor


On Fri, Aug 30, 2013 at 5:04 PM, Adrien Thebo <notifications@github.com>wrote:

> In lib/puppet/provider/group/gpasswd.rb:
>
> > +  has_feature :system_groups unless %w{HP-UX Solaris}.include? Facter.value(:operatingsystem)
> > +  has_feature :manages_members unless %w{HP-UX Solaris}.include? Facter.value(:operatingsystem)
> > +
> > +  verify :gid, "GID must be an integer" do |value|
> > +    value.is_a? Integer
> > +  end
> > +
> > +  def addcmd
> > +    # Create the group and do all that junk.
> > +    cmd = []
> > +    cmd << super.shelljoin
> > +
> > +    @resource[:members] and cmd << @resource[:members].map{ |x| [command(:addmember),'-a',x,@resource[:name]].shelljoin }
> > +
> > +    # NOTE: This is NOT atomic!
> > +    cmd.join(' && ')
>
> At Puppetconf you explained that you were having with some exec resources
> taking an unexpectedly long time, which was the rationale for this. While
> it makes sense it's a workaround, and I would rather fix command execution
> than include workarounds. Would you be able to expand command execution to
> run one gpasswd invocation per user instead of a shell pipeline? It will
> make this much easier to test and reason about.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/puppetlabs/puppet/pull/1848/files#r6096187>
> .
>



-- 
Trevor Vaughan
Vice President, Onyx Point, Inc
(410) 541-6699
tvaughan@onyxpoint.com

-- This account not approved for unencrypted proprietary information --