-
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 #73
(PE-12299) Add Solaris 11 Support #73
Conversation
69d0789
to
8263b86
Compare
I'm waiting on this to be validated on Solaris 11 sparc before removing the 'Do not merge' flag. |
@demophoon it sounds like it has been validated on solaris i386? |
Yes, this has been validated on solaris 11 i386. The service bug is still a problem however. I am trying the windows style fix for that however. |
cf9d252
to
8263b86
Compare
@demophoon The solaris11/windows restart scripts look equally evil. So I guess that's 👍 Is this starting the new services by your testing? Also, looks like a rebase is needed. |
3453b18
to
a0697df
Compare
cfe178f
to
52810db
Compare
|
||
$_package_options = { | ||
require => Exec['puppet_agent restore /etc/puppetlabs'], | ||
notify => Exec['puppet_agent post-install restore /etc/puppetlabs'], |
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.
@demophoon I'm lost here, we seem to be restoring from /tmp/puppet_agent/puppetlabs twice? Is the first a typo where we should be copying /etc to /tmp/puppet_agent/puppetlabs?
If so, how is this currently working?
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.
@jpartlow We are backing up /etc/puppetlabs/
here: https://github.com/puppetlabs/puppetlabs-puppet_agent/pull/73/files#diff-0b65fa0c1283d2894d43d73f820fe08eR46
Also the restore is needed twice because when we remove the pe-* packages all of /etc/puppetlabs is moved into a lost+found directory determined by the system. The first restore is needed before the puppet-agent package is installed because pkg expects the repo we setup to be in /etc/puppetlabs/installer/solaris.repo/
with the new agent package. The second restore is because when you install the puppet-agent package solaris overwrites any existing user configuration in /etc/puppetlabs/
leaving the puppet.conf in a bad state where it doesn't know its master or any other configuration that a user may have specified.
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.
O_o
Ok, I think I've got it.
52810db
to
14fdfcd
Compare
14fdfcd
to
566501d
Compare
This commit plumbs the puppet agent module to add solaris 11 support. This commit should be fairly consistent with how pe_repo handles upgrading agents on solaris 11 by updating the repo in `/etc/puppetlabs/installer/solaris.repo` with the new puppet-agent package and installing puppet-agent from there Lots of things in this commit are less than ideal but the current state of how solaris 11 packaging handles files through uninstallation/installation. Since solaris 11 will not uninstall packages if dependant packages are also installed so the packages must be removed in a specific order or else the puppet run will fail. When uninstalling the pe-* packages, solaris 11 decides to completely remove everything in `/etc/puppetlabs/` which is why this commit has to go through and copy it to a temporary location during the upgrade. However to install puppet-agent, the package needs to be in the repo that lives in `/etc/puppetlabs/installer/solaris.repo` so the that repo needs to be put back into place. After installing the puppet-agent package it overwrites the existing configuration files with the default configuration files. After installing the puppet-agent module the /etc/puppetlabs directory is again copied into place so that the user doesn't lose the ability to talk to the master server or any other configurations that live in /etc/puppetlabs.
Before this commit the module was relying on puppet to enforce in the same order as the array instead of having a relationship between the packages during uninstallation. This commit adds in relationships between the packages so that they are always uninstalled in the correct order.
Before this commit on solaris 11 the configuration file might be backed up before the files have had their deprecated settings removed. This meant that when the configuration files were moved back into place which can cause puppet to fail to start on subsequent runs. This commit ensures that config files are cleaned up before preparing the platforms for installing puppet-agent.
Before this commit there was no way to upgrade puppet-agent on Solaris 11 sparc boxes. This commit adds in support for this.
Before this commit when upgrading solaris 11 agents the services would be in a maintenance state where puppet was unable to start them. This commit adds in a script which waits for the currently running agent run to stop and then calls puppet to ensure that puppet and mcollective are running so that users do not have to login to the nodes to perform these steps by hand. This behavior is currently what windows is doing to start puppet and mcollective agents when upgrading with the puppet_agent module.
When testing against pre-released puppet-agent versions the sha that is appended to the version on solaris 11 does not contain alpha characters. This commit removes those from the file path so that they can be downloaded properly from the master.
When removing the packages the /var/opt/lib dir is removed from the system much like /etc/puppetlabs is removed from the system. The current agent run is unable to finish successfully since it cannot save a report to send to puppetdb and fails out after running all of the other resources. This commit ensures that those paths exist so that a final report can be saved and pushed to puppetdb.
566501d
to
b09ff24
Compare
Sadly I'm getting the following error from a frankenbuild:
I'll add the full details and log to the ticket. |
Needs a rebase. |
Closing in favor of a rebased/squashed version at #93. |
This PR consists of everything needed to get puppet agents on Solaris 11 to upgrade from puppet 3.x to puppet 4.x in a PE environment.
This PR is ready for review, and potentially even a merge.