Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

it's FreeBSD 9.1-RELEASE amd64 in here. I installed puppet from ports and my manifest also probably uses ports packages. I'm happy with that. Now here's a simple manifest:

root@ovh:/root # cat freebsd.pp
package { '*./editors/vim':
    ensure => installed,
}

Applying manifest:

root@ovh:/root # puppet apply freebsd.pp
Notice: /Stage[main]//Package[*./editors/vim]/ensure: created
Notice: Finished catalog run in 22.54 seconds

23 seconds to execute simple package check which actually already installed??? Is this normal? I'm new to puppet, so if somebody can explain what's going on in background for such a simple check, I would really appreciate that. Maybe there's faster way to check if package installed?

share|improve this question
    
have you tried running puppet with the --debug switch? That should give you more detail about what's going on. –  growse Feb 5 '13 at 12:18
    
ok with debug i see that puppet every time adds package with pkg_add, and there's really lots of stuff going on in there.. would be nice if puppet could use ports. is this possible? –  holms Feb 5 '13 at 14:25

2 Answers 2

Yes since you installed a new package.. run it again and the created should go away and it will be a little faster. Puppet is not very fast anyway. For that package it has to query your package manager to see if it is installed and if you don't select one it will take it's best guess at what it should be try that and if that isn't there pick the next best guess.

share|improve this answer
    
actually it's created every time I run it. That's odd –  holms Feb 5 '13 at 13:38
up vote 0 down vote accepted

after adding debug switch I see that vim installed every time with pkg_add. So this question is answered.

Debug: Puppet::Type::Package::ProviderRug: file /usr/bin/rug does not exist
Debug: Puppet::Type::Package::ProviderPortage: file /usr/bin/emerge does not exist
Debug: Puppet::Type::Package::ProviderPkgin: file pkgin does not exist
Debug: Puppet::Type::Package::ProviderHpux: file /usr/sbin/swinstall does not exist
Debug: Puppet::Type::Package::ProviderNim: file /usr/sbin/nimclient does not exist
Debug: Puppet::Type::Package::ProviderAptrpm: file apt-get does not exist
Debug: Puppet::Type::Package::ProviderFink: file /sw/bin/fink does not exist
Debug: Puppet::Type::Package::ProviderUp2date: file /usr/sbin/up2date-nox does not exist
Debug: Puppet::Type::Package::ProviderRpm: file rpm does not exist
Debug: Puppet::Type::Package::ProviderYum: file rpm does not exist
Debug: Puppet::Type::Package::ProviderPkg: file /usr/bin/pkg does not exist
Debug: Puppet::Type::Package::ProviderApt: file /usr/bin/apt-get does not exist
Debug: Puppet::Type::Package::ProviderSun: file /usr/sbin/pkgrm does not exist
Debug: Puppet::Type::Package::ProviderDpkg: file /usr/bin/dpkg does not exist
Debug: Puppet::Type::Package::ProviderPacman: file /usr/bin/pacman does not exist
Debug: Puppet::Type::Package::ProviderAptitude: file /usr/bin/aptitude does not exist
Debug: Puppet::Type::Package::ProviderZypper: file /usr/bin/zypper does not exist
Debug: Puppet::Type::Package::ProviderUrpmi: file urpmq does not exist
Debug: Puppet::Type::Package::ProviderSunfreeware: file pkg-get does not exist
Debug: Puppet::Type::Package::ProviderAix: file /usr/bin/lslpp does not exist
Debug: Creating default schedules
Debug: Failed to load library 'selinux' for feature 'selinux'
Debug: Using settings: adding file resource 'client_datadir': 'File[/var/puppet/client_data]{:backup=>false, :mode=>"750", :path=>"/var/puppet/client_data", :ensure=>:directory, :loglevel=>:debug, :links=>:follow}'
Debug: Failed to load library 'shadow' for feature 'libshadow'
Debug: Puppet::Type::User::ProviderUseradd: file usermod does not exist
Debug: Puppet::Type::User::ProviderUser_role_add: file usermod does not exist
Debug: Puppet::Type::User::ProviderLdap: true value when expecting false
Debug: Puppet::Type::User::ProviderDirectoryservice: file /usr/bin/uuidgen does not exist
Debug: Using settings: adding file resource 'certdir': 'File[/var/puppet/ssl/certs]{:owner=>"puppet", :backup=>false, :path=>"/var/puppet/ssl/certs", :ensure=>:directory, :loglevel=>:debug, :links=>:follow}'
Debug: Using settings: adding file resource 'vardir': 'File[/var/puppet]{:backup=>false, :path=>"/var/puppet", :ensure=>:directory, :loglevel=>:debug, :links=>:follow}'
Debug: Using settings: adding file resource 'requestdir': 'File[/var/puppet/ssl/certificate_requests]{:owner=>"puppet", :backup=>false, :path=>"/var/puppet/ssl/certificate_requests", :ensure=>:directory, :loglevel=>:debug, :links=>:follow}'
Debug: Using settings: adding file resource 'rundir': 'File[/var/run/puppet]{:backup=>false, :mode=>"1777", :path=>"/var/run/puppet", :ensure=>:directory, :loglevel=>:debug, :links=>:follow}'
Debug: Using settings: adding file resource 'plugindest': 'File[/var/puppet/lib]{:backup=>false, :path=>"/var/puppet/lib", :ensure=>:directory, :loglevel=>:debug, :links=>:follow}'
Debug: Using settings: adding file resource 'statefile': 'File[/var/puppet/state/state.yaml]{:backup=>false, :mode=>"660", :path=>"/var/puppet/state/state.yaml", :ensure=>:file, :loglevel=>:debug, :links=>:follow}'
Debug: Using settings: adding file resource 'hostprivkey': 'File[/var/puppet/ssl/private_keys/ovh.holms.lt.pem]{:owner=>"puppet", :backup=>false, :mode=>"600", :path=>"/var/puppet/ssl/private_keys/ovh.holms.lt.pem", :ensure=>:file, :loglevel=>:debug, :links=>:follow}'
Debug: Using settings: adding file resource 'clientbucketdir': 'File[/var/puppet/clientbucket]{:backup=>false, :mode=>"750", :path=>"/var/puppet/clientbucket", :ensure=>:directory, :loglevel=>:debug, :links=>:follow}'
Debug: Using settings: adding file resource 'statedir': 'File[/var/puppet/state]{:backup=>false, :mode=>"1755", :path=>"/var/puppet/state", :ensure=>:directory, :loglevel=>:debug, :links=>:follow}'
Debug: Using settings: adding file resource 'lastrunfile': 'File[/var/puppet/state/last_run_summary.yaml]{:backup=>false, :mode=>"644", :path=>"/var/puppet/state/last_run_summary.yaml", :ensure=>:file, :loglevel=>:debug, :links=>:follow}'
Debug: Using settings: adding file resource 'logdir': 'File[/var/puppet/log]{:owner=>"puppet", :group=>"puppet", :backup=>false, :mode=>"750", :path=>"/var/puppet/log", :ensure=>:directory, :loglevel=>:debug, :links=>:follow}'
Debug: Using settings: adding file resource 'ssldir': 'File[/var/puppet/ssl]{:owner=>"puppet", :backup=>false, :mode=>"771", :path=>"/var/puppet/ssl", :ensure=>:directory, :loglevel=>:debug, :links=>:follow}'
Debug: Using settings: adding file resource 'graphdir': 'File[/var/puppet/state/graphs]{:backup=>false, :path=>"/var/puppet/state/graphs", :ensure=>:directory, :loglevel=>:debug, :links=>:follow}'
Debug: Using settings: adding file resource 'privatekeydir': 'File[/var/puppet/ssl/private_keys]{:owner=>"puppet", :backup=>false, :mode=>"750", :path=>"/var/puppet/ssl/private_keys", :ensure=>:directory, :loglevel=>:debug, :links=>:follow}'
Debug: Using settings: adding file resource 'clientyamldir': 'File[/var/puppet/client_yaml]{:backup=>false, :mode=>"750", :path=>"/var/puppet/client_yaml", :ensure=>:directory, :loglevel=>:debug, :links=>:follow}'
Debug: Using settings: adding file resource 'hostpubkey': 'File[/var/puppet/ssl/public_keys/ovh.holms.lt.pem]{:owner=>"puppet", :backup=>false, :mode=>"644", :path=>"/var/puppet/ssl/public_keys/ovh.holms.lt.pem", :ensure=>:file, :loglevel=>:debug, :links=>:follow}'
Debug: Using settings: adding file resource 'lastrunreport': 'File[/var/puppet/state/last_run_report.yaml]{:backup=>false, :mode=>"640", :path=>"/var/puppet/state/last_run_report.yaml", :ensure=>:file, :loglevel=>:debug, :links=>:follow}'
Debug: Using settings: adding file resource 'confdir': 'File[/usr/local/etc/puppet]{:backup=>false, :path=>"/usr/local/etc/puppet", :ensure=>:directory, :loglevel=>:debug, :links=>:follow}'
Debug: Using settings: adding file resource 'publickeydir': 'File[/var/puppet/ssl/public_keys]{:owner=>"puppet", :backup=>false, :path=>"/var/puppet/ssl/public_keys", :ensure=>:directory, :loglevel=>:debug, :links=>:follow}'
Debug: Using settings: adding file resource 'privatedir': 'File[/var/puppet/ssl/private]{:owner=>"puppet", :backup=>false, :mode=>"750", :path=>"/var/puppet/ssl/private", :ensure=>:directory, :loglevel=>:debug, :links=>:follow}'
Debug: /File[/var/puppet/ssl]: Autorequiring File[/var/puppet]
Debug: /File[/var/puppet/ssl/private]: Autorequiring File[/var/puppet/ssl]
Debug: /File[/var/puppet/ssl/certificate_requests]: Autorequiring File[/var/puppet/ssl]
Debug: /File[/var/puppet/clientbucket]: Autorequiring File[/var/puppet]
Debug: /File[/var/puppet/ssl/private_keys/ovh.holms.lt.pem]: Autorequiring File[/var/puppet/ssl/private_keys]
Debug: /File[/var/puppet/ssl/certs]: Autorequiring File[/var/puppet/ssl]
Debug: /File[/var/puppet/ssl/public_keys/ovh.holms.lt.pem]: Autorequiring File[/var/puppet/ssl/public_keys]
Debug: /File[/var/puppet/state]: Autorequiring File[/var/puppet]
Debug: /File[/var/puppet/ssl/public_keys]: Autorequiring File[/var/puppet/ssl]
Debug: /File[/var/puppet/state/graphs]: Autorequiring File[/var/puppet/state]
Debug: /File[/var/puppet/client_data]: Autorequiring File[/var/puppet]
Debug: /File[/var/puppet/log]: Autorequiring File[/var/puppet]
Debug: /File[/var/puppet/state/last_run_summary.yaml]: Autorequiring File[/var/puppet/state]
Debug: /File[/var/puppet/lib]: Autorequiring File[/var/puppet]
Debug: /File[/var/puppet/state/state.yaml]: Autorequiring File[/var/puppet/state]
Debug: /File[/var/puppet/state/last_run_report.yaml]: Autorequiring File[/var/puppet/state]
Debug: /File[/var/puppet/ssl/private_keys]: Autorequiring File[/var/puppet/ssl]
Debug: /File[/var/puppet/client_yaml]: Autorequiring File[/var/puppet]
Debug: Finishing transaction 17233557220
Debug: Loaded state in 0.00 seconds
Debug: Loaded state in 0.00 seconds
Info: Applying configuration version '1360078391'
Debug: /Schedule[daily]: Skipping device resources because running on a host
Debug: /Schedule[monthly]: Skipping device resources because running on a host
Debug: /Schedule[hourly]: Skipping device resources because running on a host
Debug: /Schedule[never]: Skipping device resources because running on a host
Debug: /Schedule[weekly]: Skipping device resources because running on a host
Debug: /Schedule[puppet]: Skipping device resources because running on a host
Debug: Prefetching freebsd resources for package
Debug: Executing '/usr/sbin/pkg_info -aoQ'
Debug: Executing '/usr/sbin/pkg_info -aoQ'
Debug: Package: *./editors/vim: origin => {:port_category=>"editors", :port_name=>"vim"}
Debug: Package: *./editors/vim: source => #<URI::FTP:0x80648c4d0 URL:ftp://ftp.freebsd.org/%2Fpub/FreeBSD/ports/amd64/packages-9-stable/>
Debug: Fetching INDEX: #<URI::FTP:0x80648b1c0 URL:ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-9-stable/INDEX.bz2>
Debug: Package: *./editors/vim: package_uri => #<URI::FTP:0x80a1b3980 URL:ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-9-stable/All/vim-7.3.669.tbz>
Debug: Executing '/usr/sbin/pkg_add -f ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-9-stable/All/vim-7.3.669.tbz'
Notice: /Stage[main]//Package[*./editors/vim]/ensure: created
Debug: /Stage[main]//Package[*./editors/vim]: The container Class[Main] will propagate my refresh event
Debug: Class[Main]: The container Stage[main] will propagate my refresh event
Debug: Finishing transaction 17232926340
Debug: Storing state
Debug: Stored state in 0.02 seconds
Notice: Finished catalog run in 21.05 seconds
Debug: Using settings: adding file resource 'rrddir': 'File[/var/puppet/rrd]{:owner=>"puppet", :group=>"puppet", :backup=>false, :mode=>"750", :path=>"/var/puppet/rrd", :ensure=>:directory, :loglevel=>:debug, :links=>:follow}'
Debug: Finishing transaction 17264361120
Debug: Received report to process from ovh.holms.lt
Debug: Processing report from ovh.holms.lt with processor Puppet::Reports::Store
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.