[node-patches] Change in ovirt-node[master]: ntpdate: Disable the service

dougsland at redhat.com dougsland at redhat.com
Wed Jun 17 15:25:49 UTC 2015


Douglas Schilling Landgraf has uploaded a new change for review.

Change subject: ntpdate: Disable the service
......................................................................

ntpdate: Disable the service

This patch disable ntpdate service in favor of ntpd
which adjusts the clock continuously instead of once
as ntpdate does. Additionally, the patch also
update/remove related code.

Change-Id: Ie60f7561f01fb8d2ce96ee8e112d97a979a024db
Signed-off-by: Douglas Schilling Landgraf <dougsland at redhat.com>
---
M recipe/centos7-install.ks
M recipe/ovirt17-install.ks
M recipe/rhevh7-install.ks
M scripts/ovirt-functions.in
M src/ovirt/node/config/defaults.py
M src/ovirtnode/ovirtfunctions.py
6 files changed, 4 insertions(+), 33 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/00/42500/1

diff --git a/recipe/centos7-install.ks b/recipe/centos7-install.ks
index 3a1e55f..d70632e 100644
--- a/recipe/centos7-install.ks
+++ b/recipe/centos7-install.ks
@@ -1,3 +1,3 @@
-services --enabled=auditd,ntpd,ntpdate,iptables,network,rsyslog,multipathd,snmpd,ovirt-early,ovirt-post,ovirt-kdump,cgconfig,mcelog,tuned,libvirtd --disabled=netfs,ovirt-awake,libvirt-guests,kdump
+services --enabled=auditd,ntpd,iptables,network,rsyslog,multipathd,snmpd,ovirt-early,ovirt-post,ovirt-kdump,cgconfig,mcelog,tuned,libvirtd --disabled=netfs,ovirt-awake,libvirt-guests,kdump
 
 
diff --git a/recipe/ovirt17-install.ks b/recipe/ovirt17-install.ks
index 258cbdd..25cd719 100644
--- a/recipe/ovirt17-install.ks
+++ b/recipe/ovirt17-install.ks
@@ -1 +1 @@
-services --enabled=auditd,ntpd,ntpdate,iptables,network,rsyslog,multipathd,snmpd,ovirt-early,ovirt,ovirt-post,ovirt-kdump,anyterm,collectd,libvirtd,cgconfig,mcelog,tuned --disabled=kdump
+services --enabled=auditd,ntpd,iptables,network,rsyslog,multipathd,snmpd,ovirt-early,ovirt,ovirt-post,ovirt-kdump,anyterm,collectd,libvirtd,cgconfig,mcelog,tuned --disabled=kdump
diff --git a/recipe/rhevh7-install.ks b/recipe/rhevh7-install.ks
index aafcff0..5fc0ead 100644
--- a/recipe/rhevh7-install.ks
+++ b/recipe/rhevh7-install.ks
@@ -1,3 +1,3 @@
-services --enabled=auditd,ntpd,ntpdate,iptables,network,rsyslog,multipathd,snmpd,ovirt-early,ovirt-post,ovirt-cim,ovirt-kdump,cgconfig,mcelog,tuned --disabled=netfs,ovirt-awake,libvirt-guests,libvirtd,kdump
+services --enabled=auditd,ntpd,iptables,network,rsyslog,multipathd,snmpd,ovirt-early,ovirt-post,ovirt-cim,ovirt-kdump,cgconfig,mcelog,tuned --disabled=netfs,ovirt-awake,libvirt-guests,libvirtd,kdump
 
 
diff --git a/scripts/ovirt-functions.in b/scripts/ovirt-functions.in
index b3882ee..7b7a940 100644
--- a/scripts/ovirt-functions.in
+++ b/scripts/ovirt-functions.in
@@ -982,23 +982,6 @@
     done
 }
 
-test_ntp_configuration () {
-    # stop ntpd service for testing
-    service ntpd stop > /dev/null 2>&1
-    SERVERS=$(echo $NTPSERVERS | awk 'BEGIN{FS=":"}{for (i=1; i<=NF; i++) print $i}')
-        for server in $SERVERS; do
-            ntpdate $server > /dev/null 2>&1
-            result=$?
-            if [ $result -ne 0 ]; then
-                printf "\n Unable to verify NTP server: $server \n"
-            else
-                printf "\n Verified NTP server: $server \n"
-            fi
-        done
-    service ntpd start
-
-}
-
 get_dm_device ()
 {
     local device="$1"
diff --git a/src/ovirt/node/config/defaults.py b/src/ovirt/node/config/defaults.py
index a078438..404cdf9 100755
--- a/src/ovirt/node/config/defaults.py
+++ b/src/ovirt/node/config/defaults.py
@@ -279,7 +279,7 @@
     def transaction(self):
         """Return all transactions to re-configure networking
         """
-        services = ["network", "ntpd", "ntpdate", "rpcbind", "nfslock",
+        services = ["network", "ntpd", "rpcbind", "nfslock",
                     "rpcidmapd", "nfs-idmapd", "rpcgssd"]
 
         def do_services(cmd, services):
@@ -937,7 +937,6 @@
             def commit(self):
                 system.service("ntpd", "stop", False)
                 if not disable:
-                    system.service("ntpdate", "start", False)
                     system.service("ntpd", "start", False)
 
         tx = utils.Transaction("Configuring timeservers")
diff --git a/src/ovirtnode/ovirtfunctions.py b/src/ovirtnode/ovirtfunctions.py
index bb3f808..d87c580 100644
--- a/src/ovirtnode/ovirtfunctions.py
+++ b/src/ovirtnode/ovirtfunctions.py
@@ -1391,17 +1391,6 @@
                     " * 512/4096 - 35)) count=35 &>>" + OVIRT_TMP_LOGFILE)
     system_closefds("sync")
 
-def test_ntp_configuration(self):
-    # stop ntpd service for testing
-    system_closefds("service ntpd stop > /dev/null 2>&1")
-    for server in OVIRT_VARS["NTP"].split():
-        ret = system_closefds("ntpdate %s > /dev/null 2>&1" % server)
-        if ret > 0:
-            logger.error("Unable to verify NTP server: %s" % server)
-        else:
-            logger.info("Verified NTP server: %s" % server)
-    system_closefds("service ntpd start")
-
 def get_dm_device(device):
     dev_major_cmd="stat -c '%t' " + "\"/dev/" + device + "\""
     dev_minor_cmd="stat -c '%T' " + "\"/dev/" + device + "\""


-- 
To view, visit https://gerrit.ovirt.org/42500
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie60f7561f01fb8d2ce96ee8e112d97a979a024db
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Douglas Schilling Landgraf <dougsland at redhat.com>



More information about the node-patches mailing list