Skip to content

Instantly share code, notes, and snippets.

@marcusphi
Created January 13, 2016 09:42
Show Gist options
  • Save marcusphi/5ebb016fa31226b3852b to your computer and use it in GitHub Desktop.
Save marcusphi/5ebb016fa31226b3852b to your computer and use it in GitHub Desktop.
puppet jdk rpm install fails silently
Puppet code:
------------
package { 'jdk-1.7.0_80-fcs.i586':
provider => 'rpm',
source => '/etc/puppet/modules/jdk/files/jdk-7u80-linux-i586.rpm',
}
#Get rpm manually:
wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/7u80-b15/jdk-7u80-linux-i586.rpm"
Jag har prövat med exec också, ingen skillnad:
exec { 'Install jdk 7 32-bit':
command => 'rpm -i /etc/puppet/modules/jdk/files/jdk-7u80-linux-i586.rpm',
path => '/bin',
creates => "${java_home}/bin/java",
}
Puppet log:
-----------
[ec2-user@ip-10-0-1-176 jdk]$ sudo puppet apply /etc/puppet/environments/production/manifests/site.pp --confdir=/etc/puppet/ --environment=production --environmentpath=/etc/puppet/environments/ --debug
Debug: Runtime environment: puppet_version=3.7.4, ruby_version=2.0.0, run_mode=user, default_encoding=UTF-8
Debug: Loading external facts from /var/lib/puppet/facts.d
Debug: importing '/etc/puppet/modules/base/manifests/init.pp' in environment production
Debug: Automatically imported base from base into production
Debug: Failed to load library 'selinux' for feature 'selinux'
Debug: importing '/etc/puppet/modules/jdk/manifests/init.pp' in environment production
Debug: Automatically imported jdk from jdk into production
Debug: Executing '/bin/rpm --version'
Debug: Executing '/bin/rpm -ql rpm'
Debug: Executing '/bin/rpm --version'
Debug: importing '/etc/puppet/modules/httpd/manifests/init.pp' in environment production
Debug: Automatically imported httpd from httpd into production
Debug: importing '/etc/puppet/modules/glassfish/manifests/init.pp' in environment production
Debug: Automatically imported glassfish from glassfish into production
Debug: importing '/etc/puppet/modules/mysql/manifests/init.pp' in environment production
Debug: Automatically imported mysql from mysql into production
Debug: Adding relationship from Package[jdk-1.7.0_80-fcs.i586] to File[/usr/java/default/jre/lib/security/local_policy.jar] with 'before'
Debug: Adding relationship from File[/usr/java/default/jre/lib/security/local_policy.jar] to File[/usr/java/default/jre/lib/security/US_export_policy.jar] with 'before'
Debug: Adding relationship from Package[compat-libstdc++-33.i686] to File[/opt/sges.conf] with 'before'
Debug: Adding relationship from Package[glibc.i686] to File[/opt/sges.conf] with 'before'
Debug: Adding relationship from File[/opt/sges.conf] to File[/opt/sges-2_1_1-linux.bin] with 'before'
Notice: Compiled catalog for ip-10-0-1-176.eu-west-1.compute.internal in environment production in 0.51 seconds
Debug: Puppet::Type::Package::ProviderSun: file /usr/bin/pkginfo does not exist
Debug: Puppet::Type::Package::ProviderOpenbsd: file pkg_info does not exist
Debug: Puppet::Type::Package::ProviderAptrpm: file apt-get does not exist
Debug: Puppet::Type::Package::ProviderOpkg: file opkg does not exist
Debug: Puppet::Type::Package::ProviderPortupgrade: file /usr/local/sbin/portupgrade does not exist
Debug: Puppet::Type::Package::ProviderFreebsd: file /usr/sbin/pkg_info does not exist
Debug: Puppet::Type::Package::ProviderPorts: file /usr/local/sbin/portupgrade does not exist
Debug: Puppet::Type::Package::ProviderUp2date: file /usr/sbin/up2date-nox does not exist
Debug: Puppet::Type::Package::ProviderPacman: file /usr/bin/pacman does not exist
Debug: Puppet::Type::Package::ProviderAix: file /usr/bin/lslpp does not exist
Debug: Puppet::Type::Package::ProviderPkgin: file pkgin does not exist
Debug: Puppet::Type::Package::ProviderDpkg: file /usr/bin/dpkg does not exist
Debug: Puppet::Type::Package::ProviderApt: file /usr/bin/apt-get does not exist
Debug: Puppet::Type::Package::ProviderUrpmi: file urpmi does not exist
Debug: Puppet::Type::Package::ProviderPkg: file /usr/bin/pkg does not exist
Debug: Puppet::Type::Package::ProviderNim: file /usr/sbin/nimclient does not exist
Debug: Puppet::Type::Package::ProviderZypper: file /usr/bin/zypper does not exist
Debug: Puppet::Type::Package::ProviderPortage: file /usr/bin/emerge does not exist
Debug: Puppet::Type::Package::ProviderRug: file /usr/bin/rug does not exist
Debug: Puppet::Type::Package::ProviderFink: file /sw/bin/fink does not exist
Debug: Puppet::Type::Package::ProviderAptitude: file /usr/bin/aptitude does not exist
Debug: Puppet::Type::Package::ProviderSunfreeware: file pkg-get does not exist
Debug: Puppet::Type::Package::ProviderHpux: file /usr/sbin/swinstall does not exist
Warning: The package type's allow_virtual parameter will be changing its default value from false to true in a future release. If you do not want to allow virtual packages, please explicitly set allow_virtual to false.
(at /usr/share/ruby/vendor_ruby/2.0/puppet/type/package.rb:430:in `block (3 levels) in <module:Puppet>')
Debug: Creating default schedules
Debug: Using settings: adding file resource 'confdir': 'File[/etc/puppet]{:path=>"/etc/puppet", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Puppet::Type::User::ProviderUser_role_add: file roleadd does not exist
Debug: Puppet::Type::User::ProviderDirectoryservice: file /usr/bin/dsimport does not exist
Debug: Failed to load library 'ldap' for feature 'ldap'
Debug: Puppet::Type::User::ProviderLdap: feature ldap is missing
Debug: Puppet::Type::User::ProviderPw: file pw does not exist
Debug: Puppet::Type::Group::ProviderDirectoryservice: file /usr/bin/dscl does not exist
Debug: Failed to load library 'ldap' for feature 'ldap'
Debug: Puppet::Type::Group::ProviderLdap: feature ldap is missing
Debug: Puppet::Type::Group::ProviderPw: file pw does not exist
Debug: Using settings: adding file resource 'vardir': 'File[/var/lib/puppet]{:path=>"/var/lib/puppet", :owner=>"puppet", :group=>"puppet", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'logdir': 'File[/var/log/puppet]{:path=>"/var/log/puppet", :mode=>"750", :owner=>"puppet", :group=>"puppet", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'statedir': 'File[/var/lib/puppet/state]{:path=>"/var/lib/puppet/state", :mode=>"1755", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'rundir': 'File[/var/run/puppet]{:path=>"/var/run/puppet", :mode=>"755", :owner=>"puppet", :group=>"puppet", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'libdir': 'File[/var/lib/puppet/lib]{:path=>"/var/lib/puppet/lib", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'certdir': 'File[/var/lib/puppet/ssl/certs]{:path=>"/var/lib/puppet/ssl/certs", :mode=>"755", :owner=>"puppet", :group=>"puppet", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'ssldir': 'File[/var/lib/puppet/ssl]{:path=>"/var/lib/puppet/ssl", :mode=>"771", :owner=>"puppet", :group=>"puppet", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'publickeydir': 'File[/var/lib/puppet/ssl/public_keys]{:path=>"/var/lib/puppet/ssl/public_keys", :mode=>"755", :owner=>"puppet", :group=>"puppet", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'requestdir': 'File[/var/lib/puppet/ssl/certificate_requests]{:path=>"/var/lib/puppet/ssl/certificate_requests", :mode=>"755", :owner=>"puppet", :group=>"puppet", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'privatekeydir': 'File[/var/lib/puppet/ssl/private_keys]{:path=>"/var/lib/puppet/ssl/private_keys", :mode=>"750", :owner=>"puppet", :group=>"puppet", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'privatedir': 'File[/var/lib/puppet/ssl/private]{:path=>"/var/lib/puppet/ssl/private", :mode=>"750", :owner=>"puppet", :group=>"puppet", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'statefile': 'File[/var/lib/puppet/state/state.yaml]{:path=>"/var/lib/puppet/state/state.yaml", :mode=>"660", :ensure=>:file, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'clientyamldir': 'File[/var/lib/puppet/client_yaml]{:path=>"/var/lib/puppet/client_yaml", :mode=>"750", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'client_datadir': 'File[/var/lib/puppet/client_data]{:path=>"/var/lib/puppet/client_data", :mode=>"750", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'clientbucketdir': 'File[/var/lib/puppet/clientbucket]{:path=>"/var/lib/puppet/clientbucket", :mode=>"750", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'lastrunfile': 'File[/var/lib/puppet/state/last_run_summary.yaml]{:path=>"/var/lib/puppet/state/last_run_summary.yaml", :mode=>"644", :ensure=>:file, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'lastrunreport': 'File[/var/lib/puppet/state/last_run_report.yaml]{:path=>"/var/lib/puppet/state/last_run_report.yaml", :mode=>"640", :ensure=>:file, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'graphdir': 'File[/var/lib/puppet/state/graphs]{:path=>"/var/lib/puppet/state/graphs", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'pluginfactdest': 'File[/var/lib/puppet/facts.d]{:path=>"/var/lib/puppet/facts.d", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: /File[/var/lib/puppet/state]: Autorequiring File[/var/lib/puppet]
Debug: /File[/var/lib/puppet/lib]: Autorequiring File[/var/lib/puppet]
Debug: /File[/var/lib/puppet/ssl/certs]: Autorequiring File[/var/lib/puppet/ssl]
Debug: /File[/var/lib/puppet/ssl]: Autorequiring File[/var/lib/puppet]
Debug: /File[/var/lib/puppet/ssl/public_keys]: Autorequiring File[/var/lib/puppet/ssl]
Debug: /File[/var/lib/puppet/ssl/certificate_requests]: Autorequiring File[/var/lib/puppet/ssl]
Debug: /File[/var/lib/puppet/ssl/private_keys]: Autorequiring File[/var/lib/puppet/ssl]
Debug: /File[/var/lib/puppet/ssl/private]: Autorequiring File[/var/lib/puppet/ssl]
Debug: /File[/var/lib/puppet/state/state.yaml]: Autorequiring File[/var/lib/puppet/state]
Debug: /File[/var/lib/puppet/client_yaml]: Autorequiring File[/var/lib/puppet]
Debug: /File[/var/lib/puppet/client_data]: Autorequiring File[/var/lib/puppet]
Debug: /File[/var/lib/puppet/clientbucket]: Autorequiring File[/var/lib/puppet]
Debug: /File[/var/lib/puppet/state/last_run_summary.yaml]: Autorequiring File[/var/lib/puppet/state]
Debug: /File[/var/lib/puppet/state/last_run_report.yaml]: Autorequiring File[/var/lib/puppet/state]
Debug: /File[/var/lib/puppet/state/graphs]: Autorequiring File[/var/lib/puppet/state]
Debug: /File[/var/lib/puppet/facts.d]: Autorequiring File[/var/lib/puppet]
Debug: /File[/etc/puppet/environments/production]: Autorequiring File[/etc/puppet]
Debug: Finishing transaction 14137520
Debug: Loaded state in 0.00 seconds
Debug: Loaded state in 0.00 seconds
Debug: /Stage[main]/Jdk/Package[jdk-1.7.0_80-fcs.i586]/before: requires File[/usr/java/default/jre/lib/security/local_policy.jar]
Debug: /Stage[main]/Jdk/File[/usr/java/default/jre/lib/security/local_policy.jar]/before: requires File[/usr/java/default/jre/lib/security/US_export_policy.jar]
Debug: /Stage[main]/Glassfish/require: requires Class[Jdk]
Debug: /Stage[main]/Glassfish/Package[compat-libstdc++-33.i686]/before: requires File[/opt/sges.conf]
Debug: /Stage[main]/Glassfish/Package[glibc.i686]/before: requires File[/opt/sges.conf]
Debug: /Stage[main]/Glassfish/File[/opt/sges.conf]/before: requires File[/opt/sges-2_1_1-linux.bin]
Info: Applying configuration version '1452676923'
Debug: Prefetching parsed resources for ssh_authorized_key
Debug: Prefetching yum resources for package
Debug: Executing '/bin/rpm --version'
Debug: Executing '/bin/rpm -qa --nosignature --nodigest --qf '%{NAME} %|EPOCH?{%{EPOCH}}:{0}| %{VERSION} %{RELEASE} %{ARCH}\n''
Debug: Prefetching rpm resources for package
Debug: Executing '/bin/rpm --version'
Debug: Executing '/bin/rpm -qa --nosignature --nodigest --qf '%{NAME} %|EPOCH?{%{EPOCH}}:{0}| %{VERSION} %{RELEASE} %{ARCH}\n''
Debug: Executing '/bin/rpm -q jdk-1.7.0_80-fcs.i586 --nosignature --nodigest --qf %{NAME} %|EPOCH?{%{EPOCH}}:{0}| %{VERSION} %{RELEASE} %{ARCH}\n'
Debug: Executing '/bin/rpm -i /etc/puppet/modules/jdk/files/jdk-7u80-linux-i586.rpm'
Debug: /Stage[main]/Jdk/Package[jdk-1.7.0_80-fcs.i586]/ensure: created
Debug: /Stage[main]/Jdk/Package[jdk-1.7.0_80-fcs.i586]: The container Class[Jdk] will propagate my refresh event
Info: Computing checksum on file /usr/java/default/jre/lib/security/local_policy.jar
Info: FileBucket got a duplicate file {md5}55a41a558adc32bf2d64b046053746a0
Info: /Stage[main]/Jdk/File[/usr/java/default/jre/lib/security/local_policy.jar]: Filebucketed /usr/java/default/jre/lib/security/local_policy.jar to puppet with sum 55a41a558adc32bf2d64b046053746a0
Notice: /Stage[main]/Jdk/File[/usr/java/default/jre/lib/security/local_policy.jar]/content: content changed '{md5}55a41a558adc32bf2d64b046053746a0' to '{md5}9dd69bcc7637d872121880c35437788d'
Debug: /Stage[main]/Jdk/File[/usr/java/default/jre/lib/security/local_policy.jar]: The container Class[Jdk] will propagate my refresh event
Info: Computing checksum on file /usr/java/default/jre/lib/security/US_export_policy.jar
Info: FileBucket got a duplicate file {md5}6eb07a841cd0cd17a4b8b8d8135ff8cd
Info: /Stage[main]/Jdk/File[/usr/java/default/jre/lib/security/US_export_policy.jar]: Filebucketed /usr/java/default/jre/lib/security/US_export_policy.jar to puppet with sum 6eb07a841cd0cd17a4b8b8d8135ff8cd
Notice: /Stage[main]/Jdk/File[/usr/java/default/jre/lib/security/US_export_policy.jar]/content: content changed '{md5}6eb07a841cd0cd17a4b8b8d8135ff8cd' to '{md5}3bb2e88a915b3cb003ca185357a92c16'
Debug: /Stage[main]/Jdk/File[/usr/java/default/jre/lib/security/US_export_policy.jar]: The container Class[Jdk] will propagate my refresh event
Debug: Class[Jdk]: The container Stage[main] will propagate my refresh event
Debug: Executing '/bin/rpm -q compat-libstdc++-33.i686 --nosignature --nodigest --qf %{NAME} %|EPOCH?{%{EPOCH}}:{0}| %{VERSION} %{RELEASE} %{ARCH}\n'
Debug: Executing '/bin/rpm -q glibc.i686 --nosignature --nodigest --qf %{NAME} %|EPOCH?{%{EPOCH}}:{0}| %{VERSION} %{RELEASE} %{ARCH}\n'
Debug: Finishing transaction 21587620
Debug: Storing state
Debug: Stored state in 0.01 seconds
Notice: Finished catalog run in 7.42 seconds
Debug: Using settings: adding file resource 'rrddir': 'File[/var/lib/puppet/rrd]{:path=>"/var/lib/puppet/rrd", :mode=>"750", :owner=>"puppet", :group=>"puppet", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Finishing transaction 8337640
Debug: Received report to process from ip-10-0-1-176.eu-west-1.compute.internal
Debug: Processing report from ip-10-0-1-176.eu-west-1.compute.internal with processor Puppet::Reports::Store
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment