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

Validate ntp paths #25

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

nalyanyam
Copy link

Tested on Solaris and RedHat.
for Solaris default ntp packages/service is a matter of test. Includes both SUNWntp4* and SUNWntp* and also service: ntp4/ntp
I find ntp to be more standard that ntp4 - maybe we can simply set it from hiera.

The installed packages are stored in $default_package_source = '/var/sadm/pkg' - but may be better to specify a repo name explicity. heira??

Please note that the same issue experience earlier with ssh package array failing on Solaris applies to ntp packages as well. Fails with cannot convert array to string. - it must be a puppet limitation when it comes to Solaris. Can i implement the array package check differently??

Tomorrow, I will test the module on SuSE as well - most likely works out of the box.

Tested on Solaris 10, Red Hat
Didnt need to specify type as evaluated by type function
@@ -147,7 +147,9 @@
'solaris': {
case $::kernelrelease {
'5.9','5.10': {
$default_package_name = [ 'SUNWntp4r', 'SUNWntp4u' ]
# $default_package_name = hiera(ntp::packages)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please remove the commented out lines. We do not want commented out source in the code. We can always use git to see what the lines used to be.

@ghoneycutt
Copy link
Owner

You will also need to update the files in spec/classes/ so that the spec tests pass.

<% if @operatingsystem =~ /SLE[DS]/ -%>
#Failing because of a bug - when key is set,
#need to figure out how to get it fixed
#keys /etc/ntp.keys
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SuSE stores its keys in /etc/ntp.keys - but it seems to fail by default when keys /etc/ntp/keys are specified in /etc/ntp.conf

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well that makes sense. We are looking in the wrong place. Make the path for /etc/ntp/keys a variable.

SuSE seems to have a bug and ntp fails when key is specified
in /etc/ntp.conf.
A line needs to be changed in /etc/init.d/ntp  for ntp keys to work
<% end -%>

<% if @operatingsystem =~ /SLE[DS]/ -%>
<% if @ntp_key_enable_real == 'true' %>
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Introduced $ntp_key_enable variable. - Not sure it is a good idea,
Would be good for others to test
On SuSE - a modication to /etc/init.d/ntp script seems to be necessary for the ntp keys to work. and by default the ntp_key location is /etc/ntp.keys

@nalyanyam
Copy link
Author

I added an ntp_key_enable option in ntp/manifests/init.pp and left the SLED/SLES default as "not enabled = false"
The option was set to "true" for all other operating systems. I have tested and it works.

networktimeout=60
networkretries=3
authentication=quit
keystore=/var/sadm/security
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this a solaris default or an Ericsson specifc thing?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is not real an Ericsson specific thing - but Solaris default, The default admin file = /var/sadm/install/admin/default also lists keystore=/var/sadm/security as the keystore directory - however, the default admin file causes interactive installation.

ref:
http://docs.oracle.com/cd/E19082-01/819-2379/swmgrpkgs-19113/index.html

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.

2 participants