From 06c2be96f67ee8acb3aa7170ed4557139927ea3a Mon Sep 17 00:00:00 2001 From: Lukas Bezdicka Date: Thu, 30 Apr 2015 11:28:41 +0200 Subject: [PATCH] Update ntp to ca6bbcfbd2ff44e1a4abef8b91a8339a5b0b878c ca6bbcfbd2ff44e1a4abef8b91a8339a5b0b878c Merge pull request #262 from bmjen/fix-rhel-ci 04d195c1250210ae915e169b0f285d0267462e23 adds fix for redhat to disable ntp restart due to dhcp ntp server updates 94ccfd2984fa50cb17ac2db9165f0faadaf50464 Merge pull request #261 from bmjen/fix-acceptance-tests bc136efb1e7f22b823d0da94e99263d198529e2b fixes debian-based flakiness in acceptance tests Change-Id: I4f67d17254cfa530119edb1e4734eafc4958e385 --- Puppetfile | 2 +- ntp/spec/spec_helper_acceptance.rb | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/Puppetfile b/Puppetfile index 10c085865..6d13c79e9 100644 --- a/Puppetfile +++ b/Puppetfile @@ -131,7 +131,7 @@ mod 'nssdb', :git => 'https://github.com/rcritten/puppet-nssdb.git' mod 'ntp', - :commit => '060c453a9bbd87d1bf229db70ee6367033a2910e', + :commit => 'ca6bbcfbd2ff44e1a4abef8b91a8339a5b0b878c', :git => 'https://github.com/puppetlabs/puppetlabs-ntp' mod 'openstack_extras', diff --git a/ntp/spec/spec_helper_acceptance.rb b/ntp/spec/spec_helper_acceptance.rb index 6b6f1b8fa..ac8a59cfd 100644 --- a/ntp/spec/spec_helper_acceptance.rb +++ b/ntp/spec/spec_helper_acceptance.rb @@ -24,6 +24,14 @@ else on host, puppet('module install puppetlabs-stdlib'), {:acceptable_exit_codes => [0, 1]} end + + #Need to disable update of ntp servers from DHCP, as subsequent restart of ntp causes test failures + if fact('osfamily') == 'Debian' + shell('[[ -f /etc/dhcp/dhclient-exit-hooks.d/ntp ]] && rm /etc/dhcp/dhcp-exit-hooks.d/ntp', { :acceptable_exit_codes => [0, 1] }) + shell('[[ -f /etc/dhcp3/dhclient-exit-hooks.d/ntp ]] && rm /etc/dhcp3/dhcp-exit-hooks.d/ntp', { :acceptable_exit_codes => [0, 1] }) + elsif fact('osfamily') == 'RedHat' + shell('echo "PEERNTP=no" >> /etc/sysconfig/network', { :acceptable_exit_codes => [0, 1]}) + end end end