From dc88fa8fc017062da2647414aac2a17cb7c4cfe5 Mon Sep 17 00:00:00 2001 From: Branan Riley Date: Fri, 11 Nov 2016 13:00:51 -0800 Subject: [PATCH] (MODULES-4092) Install solaris 10 package per-zone Solaris 10 packaging, when combined with zones, is super weird. The Puppet Enterprise frictionless install has historically made sure that the agent is installed per-zone. However, the `puppet_agent` module did not. This leads to conflicts when upgrading agents - once the Global zone is updated, trying to upgrade the other zones will fail, since the `puppet-agent` package is "already installed". This changes solaris 10 packaging to be per-zone, which matches how we have historically done that deployment. --- manifests/install.pp | 7 ++++--- spec/classes/puppet_agent_osfamily_solaris_spec.rb | 2 ++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/manifests/install.pp b/manifests/install.pp index 0b94a7c8a..a2577827d 100644 --- a/manifests/install.pp +++ b/manifests/install.pp @@ -41,9 +41,10 @@ $_unzipped_package_name = regsubst($package_file_name, '\.gz$', '') $_package_options = { - adminfile => '/opt/puppetlabs/packages/solaris-noask', - source => "/opt/puppetlabs/packages/${_unzipped_package_name}", - require => Class['puppet_agent::install::remove_packages'], + adminfile => '/opt/puppetlabs/packages/solaris-noask', + source => "/opt/puppetlabs/packages/${_unzipped_package_name}", + require => Class['puppet_agent::install::remove_packages'], + install_options => "-G", } } elsif $::operatingsystem == 'Solaris' and $::operatingsystemmajrelease == '11' and $old_packages { # Updating from PE 3.x requires removing all the old packages before installing the puppet-agent package. diff --git a/spec/classes/puppet_agent_osfamily_solaris_spec.rb b/spec/classes/puppet_agent_osfamily_solaris_spec.rb index 98d3baaa9..11e673e2e 100644 --- a/spec/classes/puppet_agent_osfamily_solaris_spec.rb +++ b/spec/classes/puppet_agent_osfamily_solaris_spec.rb @@ -353,6 +353,7 @@ is_expected.to contain_package('puppet-agent').with_adminfile('/opt/puppetlabs/packages/solaris-noask') is_expected.to contain_package('puppet-agent').with_ensure('present') is_expected.to contain_package('puppet-agent').with_source("/opt/puppetlabs/packages/puppet-agent-#{package_version}-1.i386.pkg") + is_expected.to contain_package('puppet-agent').with_install_options('-G') end end @@ -449,6 +450,7 @@ is_expected.to contain_package('puppet-agent').with_adminfile('/opt/puppetlabs/packages/solaris-noask') is_expected.to contain_package('puppet-agent').with_ensure('present') is_expected.to contain_package('puppet-agent').with_source("/opt/puppetlabs/packages/puppet-agent-#{package_version}-1.sparc.pkg") + is_expected.to contain_package('puppet-agent').with_install_options('-G') end end end