Hi Peter,

This looks like some kind of issue in the ldap provider when its
searching for the user.
Is the system using ldap? does git user exist in ldap?
You might need to log an issue with the trace below.

On Tue, Nov 1, 2011 at 8:57 PM, Peter Horvath
<peter.horvat...@googlemail.com> wrote:
> I have other classes and require between classes pps working perfectly
>
> puppet apply --trace --debug /etc/puppet/site.pp
>
> debug: importing '/etc/puppet/modules/apache2/manifests/init.pp' in
> environment production
> debug: Automatically imported apache2 from apache2 into production
> debug: importing '/etc/puppet/modules/apache2/manifests/mods.pp' in
> environment production
> debug: Automatically imported apache2::mods from apache2/mods into production
> debug: importing
> '/etc/puppet/modules/apache2/manifests/vhost-eurwebtest.pp' in
> environment production
> debug: Automatically imported apache2::vhost-eurwebtest from
> apache2/vhost-eurwebtest into production
> debug: Scope(Class[Apache2::Vhost-eurwebtest]): Retrieving template
> /etc/puppet/modules/apache2/templates/vhost.erb
> debug: template[/etc/puppet/modules/apache2/templates/vhost.erb]:
> Bound template variables for
> /etc/puppet/modules/apache2/templates/vhost.erb in 0.00 seconds
> debug: template[/etc/puppet/modules/apache2/templates/vhost.erb]:
> Interpolated template /etc/puppet/modules/apache2/templates/vhost.erb
> in 0.00 seconds
> debug: importing '/etc/puppet/modules/system/manifests/init.pp' in
> environment production
> debug: Automatically imported system from system into production
> debug: importing '/etc/puppet/modules/git/manifests/init.pp' in
> environment production
> debug: Automatically imported git from git into production
> debug: importing '/etc/puppet/modules/git/manifests/ssh.pp' in
> environment production
> debug: Automatically imported git::ssh from git/ssh into production
> debug: importing '/etc/puppet/modules/git/manifests/user.pp' in
> environment production
> debug: Automatically imported git::user from git/user into production
> debug: importing '/etc/puppet/modules/git/manifests/sudoers.pp' in
> environment production
> debug: Automatically imported git::sudoers from git/sudoers into production
> debug: Puppet::Type::Package::ProviderPortage: file /usr/bin/emerge
> does not exist
> debug: Puppet::Type::Package::ProviderPkg: file /usr/bin/pkg does not exist
> debug: Puppet::Type::Package::ProviderSun: file /usr/sbin/pkgrm does not exist
> debug: Puppet::Type::Package::ProviderSunfreeware: file pkg-get does not exist
> debug: Puppet::Type::Package::ProviderAptrpm: file rpm does not exist
> debug: Puppet::Type::Package::ProviderYum: file yum does not exist
> debug: Puppet::Type::Package::ProviderUrpmi: file urpmi does not exist
> debug: Puppet::Type::Package::ProviderOpenbsd: file pkg_add does not exist
> debug: Puppet::Type::Package::ProviderAix: file /usr/bin/lslpp does not exist
> debug: Puppet::Type::Package::ProviderNim: file /usr/sbin/nimclient
> does not exist
> debug: Puppet::Type::Package::ProviderUp2date: file
> /usr/sbin/up2date-nox does not exist
> debug: Puppet::Type::Package::ProviderFink: file /sw/bin/fink does not exist
> debug: Puppet::Type::Package::ProviderPortupgrade: file
> /usr/local/sbin/pkg_deinstall does not exist
> debug: Puppet::Type::Package::ProviderFreebsd: file /usr/sbin/pkg_add
> does not exist
> debug: Puppet::Type::Package::ProviderRug: file /usr/bin/rug does not exist
> debug: Puppet::Type::Package::ProviderPorts: file
> /usr/local/sbin/pkg_deinstall does not exist
> debug: Puppet::Type::Package::ProviderHpux: file /usr/sbin/swinstall
> does not exist
> debug: Puppet::Type::Package::ProviderZypper: file /usr/bin/zypper
> does not exist
> debug: Puppet::Type::Package::ProviderRpm: file rpm does not exist
> debug: Puppet::Type::File::ProviderMicrosoft_windows: feature
> microsoft_windows is missing
> debug: Puppet::Type::Service::ProviderLaunchd: file /bin/launchctl
> does not exist
> debug: Puppet::Type::Service::ProviderRunit: file /usr/bin/sv does not exist
> debug: Puppet::Type::Service::ProviderDaemontools: file /usr/bin/svc
> does not exist
> debug: Puppet::Type::Service::ProviderGentoo: file /sbin/rc-update
> does not exist
> debug: Puppet::Type::Service::ProviderRedhat: file /sbin/chkconfig
> does not exist
> debug: Service[apache](provider=debian): Executing 'ps -ef'
> debug: Service[apache](provider=debian): PID is 1191
> debug: Puppet::Type::User::ProviderPw: file pw does not exist
> debug: Puppet::Type::User::ProviderDirectoryservice: file
> /usr/bin/dscl does not exist
> debug: Puppet::Type::User::ProviderUser_role_add: file roledel does not exist
> debug: Puppet::Type::User::ProviderLdap: true value when expecting false
> /usr/lib/ruby/1.8/puppet/type/file/owner.rb:37:in `retrieve'
> /usr/lib/ruby/1.8/puppet/type/file/owner.rb:32:in `collect'
> /usr/lib/ruby/1.8/puppet/type/file/owner.rb:32:in `retrieve'
> /usr/lib/ruby/1.8/puppet/type.rb:695:in `retrieve'
> /usr/lib/ruby/1.8/puppet/type.rb:690:in `each'
> /usr/lib/ruby/1.8/puppet/type.rb:690:in `retrieve'
> /usr/lib/ruby/1.8/puppet/type/file.rb:634:in `retrieve'
> /usr/lib/ruby/1.8/puppet/type.rb:703:in `retrieve_resource'
> /usr/lib/ruby/1.8/puppet/type.rb:1861:in `to_trans'
> /usr/lib/ruby/1.8/puppet/type/file.rb:701:in `to_trans'
> /usr/lib/ruby/1.8/puppet/type.rb:1886:in `to_resource'
> /usr/lib/ruby/1.8/puppet/type.rb:203:in `uniqueness_key'
> /usr/lib/ruby/1.8/puppet/resource/catalog.rb:83:in `add_resource'
> /usr/lib/ruby/1.8/puppet/resource/catalog.rb:72:in `each'
> /usr/lib/ruby/1.8/puppet/resource/catalog.rb:72:in `add_resource'
> /usr/lib/ruby/1.8/puppet/resource/catalog.rb:561:in `to_catalog'
> /usr/lib/ruby/1.8/puppet/resource/catalog.rb:531:in `each'
> /usr/lib/ruby/1.8/puppet/resource/catalog.rb:531:in `to_catalog'
> /usr/lib/ruby/1.8/puppet/resource/catalog.rb:468:in `to_ral'
> /usr/lib/ruby/1.8/puppet/application/apply.rb:118:in `main'
> /usr/lib/ruby/1.8/puppet/application/apply.rb:35:in `run_command'
> /usr/lib/ruby/1.8/puppet/application.rb:300:in `run'
> /usr/lib/ruby/1.8/puppet/application.rb:397:in `exit_on_fail'
> /usr/lib/ruby/1.8/puppet/application.rb:300:in `run'
> /usr/lib/ruby/1.8/puppet/util/command_line.rb:55:in `execute'
> /usr/bin/puppet:4
> Could not find user git
>
> On 1 November 2011 06:05, Andrew Hendry <andrew.hen...@gmail.com> wrote:
>> Hi Peter,
>>
>> Have you tried --debug --noop, looking for lines like these:
>>
>> debug: /Stage[main]/Git/File[dirrights]/require: requires User[git]
>> notice: /Stage[main]/Git::User/User[git]/ensure: current_value absent,
>> should be present (noop)
>> debug: /Stage[main]/Git::User/User[git]: The container
>> Class[Git::User] will propagate my refresh event
>>
>> This little test seems to run ok here.
>> test.pp
>> class git::user {
>>  user {'git':
>>    name            => 'git',
>>    ensure          => present,
>>    comment         => 'Git user for puppet',
>>  }
>> }
>>
>> class git {
>>  file {'dirrights':
>>    path    => '/home/ahendry/temp',
>>    owner   => 'git',
>>    require => User['git'],
>>  }
>> }
>>
>> include git::user
>> include git
>>
>> $ puppet apply --noop test.pp
>> warning: Could not retrieve fact fqdn
>> notice: /Stage[main]/Git::User/User[git]/ensure: current_value absent,
>> should be present (noop)
>> err: /Stage[main]/Git/File[dirrights]: Could not evaluate: Could not
>> find user git
>> notice: Class[Git::User]: Would have triggered 'refresh' from 1 events
>> notice: Stage[main]: Would have triggered 'refresh' from 1 events
>> notice: Finished catalog run in 0.05 seconds
>>
>>
>> On Tue, Nov 1, 2011 at 3:16 PM, Peter Horvath
>> <peter.horvat...@googlemail.com> wrote:
>>> I call them here.
>>> /etc/puppet/manifests/site.pp
>>>
>>> #Puppet Node configurationsnode eurwebtest01 {        include apache2
>>>       include apache2::mods        include apache2::vhost-eurwebtest}
>>> node eurwebtest02 {        include apache2        include
>>> apache2::mods        include apache2::vhost-eurwebtest        include
>>> system       include git       include git::ssh       include
>>> git::user       include git::sudoers}
>>> node eurwebtest03  {        include apache2        include
>>> apache2::mods        include apache2::vhost-eurwebtest        include
>>> system
>>>        include git        include git::ssh        include git::user
>>>      include git::sudoers}
>>>
>>> On 1 November 2011 01:19, Andrew Hendry <andrew.hen...@gmail.com> wrote:
>>>> Hi Peter,
>>>>
>>>> Where do you call "git::user" and "git::ssh" from?
>>>> Maybe the spots where you have require => User['git'], should they be
>>>> require => Class['Git::User']?
>>>>
>>>> Andrew.
>>>>
>>>> On Tue, Nov 1, 2011 at 1:21 AM, Peter Horvath
>>>> <peter.horvat...@googlemail.com> wrote:
>>>>> I am using Ubuntu LTS 10.04 with the backported puppet
>>>>> 2.6.1-0ubuntu2~lucid1
>>>>>
>>>>> I am trying to create user with the following manifests but at the end
>>>>> always getting the Could not find user git error message:
>>>>> What am i missing, seems the manifest not creating the missing git
>>>>> user.
>>>>>
>>>>> /etc/modules/git/manifests/user.pp
>>>>>
>>>>> class git::user {
>>>>>        user{'install':
>>>>>                name            => 'install',
>>>>>                ensure          => absent,
>>>>>        }
>>>>>
>>>>>        user{'git':
>>>>>                name            => 'git',
>>>>>                password        => 'xxxxx',
>>>>>                ensure          => present,
>>>>>                comment         => 'Git user for puppet',
>>>>>                managehome      => true,
>>>>>                shell           => '/bin/bash',
>>>>>                uid             => '1000',
>>>>>                require         => User['install'],
>>>>>                provider        => 'useradd',
>>>>>        }
>>>>> Some other classes uses this as requirement:
>>>>>
>>>>> /etc/modules/git/manifests/ssh.pp
>>>>>
>>>>> class git::ssh {
>>>>>        package{'ssh':
>>>>>                ensure          => installed,
>>>>>        }
>>>>>
>>>>>        file{'dir':
>>>>>                ensure          => directory,
>>>>>                path            => '/home/git/.ssh',
>>>>>                require         => User['git'],
>>>>>        }
>>>>>
>>>>>        file{'authkey':
>>>>>                path            => '/home/git/.ssh/authorized_keys',
>>>>>                ensure          => file,
>>>>>                source          => '/etc/puppet/modules/git/files/
>>>>> authorized_keys',
>>>>>                owner           => 'git',
>>>>>                group           => 'git',
>>>>>                mode            => '600',
>>>>>                recurse         => true,
>>>>>                require         => User['git'],
>>>>>        }
>>>>>
>>>>> /etc/modules/git/manifests/init.pp
>>>>>
>>>>> class git {
>>>>>        package{'git-core':
>>>>>                ensure => installed,
>>>>>        }
>>>>>
>>>>>        file{'config':
>>>>>                path    => '/etc/puppet/.git/config',
>>>>>                ensure  => file,
>>>>>                source  => '/etc/puppet/modules/git/files/config',
>>>>>        }
>>>>>
>>>>>        file{'post_receive':
>>>>>                path    => '/etc/puppet/.git/hooks/post-receive',
>>>>>                ensure  => file,
>>>>>                source  => '/etc/puppet/modules/git/files/post-
>>>>> receive',
>>>>>        }
>>>>>
>>>>>        file{'dirrights':
>>>>>                path    => '/etc/puppet',
>>>>>                owner   => 'git',
>>>>>                group   => 'root',
>>>>>                mode    => '755',
>>>>>                recurse => true,
>>>>>                require => User['git'],
>>>>>        }
>>>>> }
>>>>>
>>>>>
>>>>> Thank you
>>>>> Peter
>>>>>
>>>>> --
>>>>> You received this message because you are subscribed to the Google Groups 
>>>>> "Puppet Users" group.
>>>>> To post to this group, send email to puppet-users@googlegroups.com.
>>>>> To unsubscribe from this group, send email to 
>>>>> puppet-users+unsubscr...@googlegroups.com.
>>>>> For more options, visit this group at 
>>>>> http://groups.google.com/group/puppet-users?hl=en.
>>>>>
>>>>>
>>>>
>>>> --
>>>> You received this message because you are subscribed to the Google Groups 
>>>> "Puppet Users" group.
>>>> To post to this group, send email to puppet-users@googlegroups.com.
>>>> To unsubscribe from this group, send email to 
>>>> puppet-users+unsubscr...@googlegroups.com.
>>>> For more options, visit this group at 
>>>> http://groups.google.com/group/puppet-users?hl=en.
>>>>
>>>>
>>>
>>> --
>>> You received this message because you are subscribed to the Google Groups 
>>> "Puppet Users" group.
>>> To post to this group, send email to puppet-users@googlegroups.com.
>>> To unsubscribe from this group, send email to 
>>> puppet-users+unsubscr...@googlegroups.com.
>>> For more options, visit this group at 
>>> http://groups.google.com/group/puppet-users?hl=en.
>>>
>>>
>>
>> --
>> You received this message because you are subscribed to the Google Groups 
>> "Puppet Users" group.
>> To post to this group, send email to puppet-users@googlegroups.com.
>> To unsubscribe from this group, send email to 
>> puppet-users+unsubscr...@googlegroups.com.
>> For more options, visit this group at 
>> http://groups.google.com/group/puppet-users?hl=en.
>>
>>
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Puppet Users" group.
> To post to this group, send email to puppet-users@googlegroups.com.
> To unsubscribe from this group, send email to 
> puppet-users+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/puppet-users?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to