Skip to content
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

Added support for Solaris 9 & 11 #26

Merged
merged 1 commit into from
May 16, 2014

Conversation

nalyanyam
Copy link
Contributor

Tested on Solaris 9 & 11

@jwennerberg
Copy link
Contributor

@boandersson can you have a look at this? You mentioned the other day that the rstat dependency was not needed.

@nalyanyam
Copy link
Contributor Author

What is the status on this PR? has it been tested?

@boandersson
Copy link
Contributor

The question was if it has to enable rpc/keyserv and rpc/rstat for installing VAS. Will do some tests without it. Will take me some time to get test env setup though.
Another comment is that indentation is inconsistent after updating the case statement :) puppet-lint doesn't complain though.

@nalyanyam
Copy link
Contributor Author

@boandersson
Indentation is a bit different because in the original file, the entire code was only for Solaris 10, but since the packages and service routines are the same for Solaris 9, 10 and 11, i split it and grouped the dependencies per platform into one loop. In this case the subsequent code applies to all the 3 kernelreleases.
I have now updated '5.10','5.11': to be in one case statement.

Please note that: For Solaris 9 nisclient module will need to be adapted;
nisclient module service name is by default = 'nis/client'

so this needs to be updated for Solaris 9 systems;
nisclient::service_name: 'ypbind

@nalyanyam
Copy link
Contributor Author

@boandersson
You are right, i have not seen any VAS dependency on rpc/rstat & rpc/keyserv.
Instead there is a dependency on 'rpc/bind'. So i think we can create that as one dependency for Solaris 10 & 11, and rpc as dependency for Solaris 9.

Regarding service init -
Puppet itself knows how to handle services - whether by default smf, or init provider - it will know how to start, stop & restart & also check status if it has status option. So specifying provider init is enough & for the case of Solaris 9 rpc - hasnostatus = false, otherwise it will try to start the service everytime. In the case where status does not work well - we could create a command that uses 'ps -ef| grep pid'. But in this case it is not necessary - i think vasypd will take care of that.

Regarding package provider;
'sun' should be the default puppet package provider. At least that is what i have seen even on the Solaris 11 that I am using - Only necessary to specify provider if using other providers such as pkg-get. But maybe my test Solaris 11 is configured differently. Does installation fail with source/adminfile provided without specifying the provider?

Please test the above cases and you (or me) can create a PR if you agree with them.
Thanks

@boandersson
Copy link
Contributor

@nalyanyam
To elaborate around what I meant (and concluded after some more testing) about the Solaris 9 rpc init script vs puppet: First, the rpc-start script starts more than just rpcbind, e.g. NIS client before NIS server. Perhaps doesn’t hurt as the NIS client shouldn’t be configured at this stage but it’s more than we need.
Also, since the rpc-script as you say doesn’t provide any status option, puppet seem to rely on ps –ef | grep rpc for determining if the start-script should be executed or not. I think the behavior can be altered by adding a pattern attribute to search for rpcbind instead. However, considering that the vasypd init script already starts rpcbind and considering that it's basically all that puppet can do anyway (i.e. it cannot “enable” the service) I don’t think it adds any value to have the dependency for Solaris 9.

I agree that for Solaris 10/11 it makes sense to add rpc/bind as a dependency – it’s cleaner and vasypd won’t do it for us (although in our setup with packets on NFS, if rpc isn’t already enabled puppet will hang before getting to enabling the rpc-service :) )

On Solaris 11 package installation failed since it tried to do a /usr/sbin/pkg install –accept despite having both response-file and admin-file provided. Admittedly a bit strange but since it worked after just adding the ‘sun’-provider, I didn’t dig any deeper into the issue. Dell only provides SVR4-packages anyway.

@nalyanyam
Copy link
Contributor Author

@boandersson
I updated my old commit (branch = support_solaris9_11 ) with the changes that include vas dependencies. I could have left out the Solaris 9 dependency but the loop that implements that would be almost same effort as just having the dependency and I noticed under some circumstances - rpcbind is not automatically restart on Solaris 9. Please check/test and see if you discover any other issues before we get it merged.

@boandersson
Copy link
Contributor

@nalyanyam
Yes, the end result will basically be the same even with the rpc-dep for Solaris 9.
To illustrate a case where it doesn't work as intended: just stop rpcbind, start for instance a vi according to below and run the puppet vas module.
In such cases, puppet wont do /etc/init.d/rpc start:

Debug: Servicevas_deps: Executing 'ps -ef'
Debug: Servicevas_deps: Process matched: root 9130 6799 0 14:20:12 pts/9 0:00 vi abrpcdef
Debug: Servicevas_deps: PID is 9130

Nevertheless, it surely doesn't get worse by having the dep and rpcbind will eventually get started by vasypd anyway so I can live with that.
Not sure I got your remark regarding rpcbind not being automatically restarted on Solaris 9. We never want to restart, only start it unless it's already running but that was perhaps what you meant?

I still don't agree with indentation but apart from that, I'm fine with the PR and it's better move forward than to polish all minor details for supporting a legacy OS :).

@boandersson
Copy link
Contributor

@nalyanyam
Sorry, forgot about Solaris 11 - did you have anything against adding the provider => 'sun' for all the vas-packages? Cannot get it to work here without it.

@nalyanyam
Copy link
Contributor Author

Ok, If you can't get it to work on Solaris 11 without 'sun' provider, then i will add it in the code for Solaris, since it does no harm on earlier Solaris releases as it was already the default

@nalyanyam
Copy link
Contributor Author

@boandersson
Added 'sun' provider, please Check.

@jwennerberg
If ok, please merge the PR so that we continue using it, and in case we encounter any other dependency issues, we could fix them later. Note that spec tests seem to fail - No Solaris entries are added yet. Will check later and add the spec tests.

@boandersson
Copy link
Contributor

@nalyanyam
Thanks, it works now. Fixing the failing tests seem to be as simple as adding 'common': 'git://github.com/ghoneycutt/puppet-module-common.git' to the repositories section of .fixtures.yml.

@nalyanyam
Copy link
Contributor Author

@jwennerberg
Could you please double check the code and merge if possible. I will get time and try to follow-up with spec tests later.

@boandersson
I also confirmed from a recently installed Solaris 11 that package provider 'sun' is real needed. Not sure why it was not needed on earlier Solaris 11 system that i was using.

jwennerberg pushed a commit that referenced this pull request May 16, 2014
Added support for Solaris 9 & 11
@jwennerberg jwennerberg merged commit 6de2ef5 into Ericsson:master May 16, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants