Skip to content

Commit

Permalink
(MODULES-4092) Install solaris 10 package per-zone
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Branan Riley committed Nov 11, 2016
1 parent 7592e65 commit dc88fa8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 4 additions & 3 deletions manifests/install.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 2 additions & 0 deletions spec/classes/puppet_agent_osfamily_solaris_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit dc88fa8

Please sign in to comment.