ntp_enhancement

Note: this is an xCAT design document, not an xCAT user document. If you are an xCAT user, you are welcome to glean information from this design, but be aware that it may not have complete or up to date procedures.

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 have servicenode.ntpserver=1 as well. The ntp server on the service node will check site table attribute ntpservers and have the ntpd sync with the servers defined by it. If site.ntpservers is the keyword <xcatmaster></xcatmaster>, it will sync with the management node.

Enhance AAsn.pm

AAsn.pm is called by xcatd. Changes will be made so that it 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 cn and sn, setupntp command will check site.ntpservers attribute and point its ntp client to the ntp servers mentioned there. If site.ntpservers is <xcatmaster>, 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.</xcatmaster>

Refernce

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


Related

Wiki: XCAT_2_Mini_Designs_for_New_Features

MongoDB Logo MongoDB