-
Notifications
You must be signed in to change notification settings - Fork 193
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(PE-12299) Add Solaris 11 support #93
Merged
highb
merged 7 commits into
puppetlabs:master
from
MikaelSmith:feature/master/pe-12299-add-solaris-11
Apr 4, 2016
Merged
Changes from 6 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
825a259
(maint) Bump rspec-puppet-facts to 1.3
7224a6f
(PE-12299) Add Solaris 11 support
ea05394
(PE-12299) Pass Puppet agent PID as an argument
d1dc946
(maint) Move selecting puppet_version to params
c7947ae
(PE-12299) Fix Solaris 11 upgrade from puppet-agent
78ce9af
(PE-12299) Only rebuild Solaris 11 repo for new packages
46f2ee5
(maint) Simplify selecting package file name for Solaris
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/bin/bash | ||
|
||
puppet_pid=$1 | ||
while $(kill -0 ${puppet_pid:?}); do | ||
sleep 5 | ||
done | ||
|
||
function start_service() { | ||
service="${1:?}" | ||
/opt/puppetlabs/bin/puppet resource service "${service:?}" ensure=running enable=true | ||
} | ||
|
||
start_service puppet | ||
start_service mcollective |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,10 +21,13 @@ | |
} | ||
} | ||
|
||
$package_name = 'puppet-agent' | ||
|
||
case $::osfamily { | ||
'RedHat', 'Debian', 'Suse', 'Solaris', 'Darwin', 'AIX': { | ||
$package_name = 'puppet-agent' | ||
$service_names = ['puppet', 'mcollective'] | ||
if !($::osfamily == 'Solaris' and $::operatingsystemmajrelease == '11') { | ||
$service_names = ['puppet', 'mcollective'] | ||
} | ||
|
||
$local_puppet_dir = '/opt/puppetlabs' | ||
$local_packages_dir = "${local_puppet_dir}/packages" | ||
|
@@ -46,7 +49,6 @@ | |
$group = 0 | ||
} | ||
'windows' : { | ||
$package_name = 'puppet-agent' | ||
$service_names = ['puppet', 'mcollective'] | ||
|
||
$local_puppet_dir = windows_native_path("${::common_appdata}/Puppetlabs") | ||
|
@@ -80,6 +82,12 @@ | |
default => undef, | ||
} | ||
|
||
if ($master_agent_version != undef and versioncmp("${::clientversion}", '4.0.0') < 0) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Moving this to |
||
$package_version = $master_agent_version | ||
} else { | ||
$package_version = undef | ||
} | ||
|
||
$ssldir = "${confdir}/ssl" | ||
$config = "${confdir}/puppet.conf" | ||
|
||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couldn't the i386 vs sparc part be set in a variable? Then we wouldn't need to duplicate all the regex for both platforms.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, probably.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it also make sense for Solaris 10 packages?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, the arch is the same between 10 and 11, right? There could be a
$_arch
that is set to eithersparc
ori386
depending on thesun4[uv]
regex, and then we just use$_arch
regardless of wether it is on 10 or 11.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ping @demophoon where did needing to strip letters out of development builds come from? If I look at current Solaris 11 package names, I see things like
puppet-agent@1.4.1.36.778531,5.11-1.i386.p5p
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@MikaelSmith That is how our packaging works with solaris package names. That was taken directly out of Vanagon here: https://github.com/puppetlabs/vanagon/blob/5236eefe97963f3cfc312bbef1e3e1b388d6ffc4/lib/vanagon/platform/solaris_11.rb#L100-L107
Solaris 11 seems to be the only platform that has this version naming oddity.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I see. Ok, I'll put it back to Solaris 11 only.