2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2024-11-21 09:02:00 +00:00
4 ntp_enhancement
ligc edited this page 2015-07-30 04:22:49 -04:00

Table of Contents

Design_Warning

ntp setup enhancements

Overview

This design is to add the ntp server setup on xCAT management node and enhance service node ntp setup. There are several place in xCAT DB mention about ntp.

  • site.ntpservers ---- honored by setupntp postscript and dhcp.pm
  • networks.netservers ---- honoted by dhcp.pm to override site.ntpservers
  • servicenode.ntpsetup ---- honored by AAsn.pm to setup ntp on xCAT service node.

This design will add a new command makentp and enhance setupntp postscript and AAsn to handle management nodes.

makentp command

The command syntax is as following:

   makentp [-h|--help|-v|--version]
   makentp [-a|--all] [-V|--verbose]

makentp is a new command that sets up the ntp server on the xCAT management node and service node. On xCAT management node, it will get the new site table attribute extntpservers and have the local ntp server sync with the external ntp servers if they are defined. If -a is specified, the command will handle all the service nodes that has servicenode.ntpserver=1 as well. The ntp server on the service node will sync with the management node.

Enhance AAsn.pm

AAsn.pm is called by xcatd. Changes will be made so that tt will check servicenode.ntpserver attribute. If it is 1, the AAsn.pm will call makentp command to setup ntp server on xCAT management node and the service node.

Change setupntp postscript

setupntp is a postscript. It is used to setup the ntp client on the compute nodes. We will make sure the following is working.

For xCAT mn, do nothing.

For xCAT sn, do nothing.

For xCAT cn, setupntp command will check site.ntpservers attribute and point its ntp client to the ntp servers mentioned there. If site.ntpservers is , the ntp server will be the master of the node (sn or mn). This part of the code is already done before, but have not tested for a long time, we will do testing on supported os distributions such as rh, sles and ubuntu.

Refernce

http://sourceforge.net/p/xcat/wiki/Enhance_NTP_setup_support/