Improved installation guide NTP section
I improved the NTP section of the installation guide as follows: 1) Changed configuration of other nodes to reference controller node. 2) Added section to verify synchronization of all nodes. Change-Id: I2de93426b3cf82a100a0b217f1272fc0e59ddb92 Implements: blueprint installation-guide-improvements
This commit is contained in:
parent
24f42cbf48
commit
ecef9e4ad3
@ -4,28 +4,147 @@
|
||||
xml:id="basics-ntp">
|
||||
<?dbhtml-stop-chunking?>
|
||||
<title>Network Time Protocol (NTP)</title>
|
||||
<para>To synchronize services across multiple machines, you must
|
||||
install <glossterm baseform="Network Time Protocol (NTP)">NTP</glossterm>.
|
||||
The examples in this guide configure the controller
|
||||
node as the reference server and any additional nodes to set
|
||||
their time from the controller node.</para>
|
||||
<para>Install the <literal>ntp</literal> package on each system
|
||||
running OpenStack services:</para>
|
||||
<para>You must install
|
||||
<glossterm baseform="Network Time Protocol (NTP)">NTP</glossterm> to
|
||||
properly synchronize services among nodes. We recommend that you configure
|
||||
the controller node to reference upstream servers and other nodes to
|
||||
reference the controller node.</para>
|
||||
<section xml:id="basics-ntp-controller-node">
|
||||
<title>Configure controller node</title>
|
||||
<procedure>
|
||||
<title>To install the NTP service</title>
|
||||
<step>
|
||||
<screen os="ubuntu;debian"><prompt>#</prompt> <userinput>apt-get install ntp</userinput></screen>
|
||||
<screen os="rhel;fedora;centos"><prompt>#</prompt> <userinput>yum install ntp</userinput></screen>
|
||||
<screen os="opensuse;sles"><prompt>#</prompt> <userinput>zypper install ntp</userinput></screen>
|
||||
<para os="rhel;fedora;centos;opensuse;sles">Set up the NTP server
|
||||
on your controller node so that it receives data by modifying
|
||||
the <filename>ntp.conf</filename> file and restarting the
|
||||
service:</para>
|
||||
</step>
|
||||
</procedure>
|
||||
<procedure>
|
||||
<title>To configure the NTP service</title>
|
||||
<para>By default, the controller node synchronizes the time via a pool
|
||||
of public servers. However, you can optionally edit the
|
||||
<filename>/etc/ntp.conf</filename> file to configure alternative
|
||||
servers such as those provided by your organization.</para>
|
||||
<step>
|
||||
<para>Edit the <filename>/etc/ntp.conf</filename> file:</para>
|
||||
<para>Add, change, or remove the <literal>server</literal> keys as
|
||||
necessary for your environment. Replace
|
||||
<replaceable>NTP_SERVER</replaceable> with the hostname or IP address
|
||||
of suitable NTP server.</para>
|
||||
<programlisting>server <replaceable>NTP_SERVER</replaceable> iburst</programlisting>
|
||||
<note os="ubuntu;debian">
|
||||
<para>Remove the <filename>/var/lib/ntp/ntp.conf.dhcp</filename> file
|
||||
if it exists.</para>
|
||||
</note>
|
||||
</step>
|
||||
<step os="ubuntu;debian">
|
||||
<para>Restart the NTP service:</para>
|
||||
<screen><prompt>#</prompt> <userinput>service ntp restart</userinput></screen>
|
||||
</step>
|
||||
<step os="rhel;centos;fedora;sles;opensuse">
|
||||
<para>Start the NTP service and configure it to start when the system
|
||||
boots:</para>
|
||||
<screen os="rhel;fedora;centos"><prompt>#</prompt> <userinput>service ntpd start</userinput>
|
||||
<prompt>#</prompt> <userinput>chkconfig ntpd on</userinput></screen>
|
||||
<screen os="opensuse;sles"><prompt>#</prompt> <userinput>service ntp start</userinput>
|
||||
<prompt>#</prompt> <userinput>chkconfig ntp on</userinput></screen>
|
||||
<para>It is advised that you configure additional nodes
|
||||
to synchronize their time from the controller node
|
||||
rather than from outside of your LAN. To do so, install the ntp
|
||||
daemon as above, then edit <filename>/etc/ntp.conf</filename>
|
||||
and change the <code>server</code> directive to use the
|
||||
controller node as internet time source.</para>
|
||||
</step>
|
||||
</procedure>
|
||||
</section>
|
||||
<section xml:id="basics-ntp-other-nodes">
|
||||
<title>Configure other nodes</title>
|
||||
<procedure>
|
||||
<title>To install the NTP service</title>
|
||||
<step>
|
||||
<screen os="ubuntu;debian"><prompt>#</prompt> <userinput>apt-get install ntp</userinput></screen>
|
||||
<screen os="rhel;fedora;centos"><prompt>#</prompt> <userinput>yum install ntp</userinput></screen>
|
||||
<screen os="opensuse;sles"><prompt>#</prompt> <userinput>zypper install ntp</userinput></screen>
|
||||
</step>
|
||||
</procedure>
|
||||
<procedure>
|
||||
<title>To configure the NTP service</title>
|
||||
<para>Configure the network and compute nodes to reference the
|
||||
controller node.</para>
|
||||
<step>
|
||||
<para>Edit the <filename>/etc/ntp.conf</filename> file:</para>
|
||||
<para>Comment out or remove all but one <literal>server</literal>
|
||||
key and change it to reference the controller node.</para>
|
||||
<programlisting>server <replaceable>controller</replaceable> iburst</programlisting>
|
||||
<note os="ubuntu;debian">
|
||||
<para>Remove the <filename>/var/lib/ntp/ntp.conf.dhcp</filename> file
|
||||
if it exists.</para>
|
||||
</note>
|
||||
</step>
|
||||
<step os="ubuntu;debian">
|
||||
<para>Restart the NTP service:</para>
|
||||
<screen><prompt>#</prompt> <userinput>service ntp restart</userinput></screen>
|
||||
</step>
|
||||
<step os="rhel;centos;fedora;sles;opensuse">
|
||||
<para>Start the NTP service and configure it to start when the system
|
||||
boots:</para>
|
||||
<screen os="rhel;fedora;centos"><prompt>#</prompt> <userinput>service ntpd start</userinput>
|
||||
<prompt>#</prompt> <userinput>chkconfig ntpd on</userinput></screen>
|
||||
<screen os="opensuse;sles"><prompt>#</prompt> <userinput>service ntp start</userinput>
|
||||
<prompt>#</prompt> <userinput>chkconfig ntp on</userinput></screen>
|
||||
</step>
|
||||
</procedure>
|
||||
</section>
|
||||
<section xml:id="basics-ntp-verify">
|
||||
<title>Verify operation</title>
|
||||
<para>We recommend that you verify NTP synchronization before proceeding
|
||||
further. Some nodes, particularly those that reference the controller
|
||||
node, can take several minutes to synchronize.</para>
|
||||
<procedure>
|
||||
<title>To verify NTP synchronization</title>
|
||||
<step>
|
||||
<para>Run this command on the <emphasis>controller</emphasis> node:
|
||||
</para>
|
||||
<screen><prompt>#</prompt> <userinput>ntpq -c peers</userinput>
|
||||
<computeroutput> remote refid st t when poll reach delay offset jitter
|
||||
==============================================================================
|
||||
*ntp-server1 192.0.2.11 2 u 169 1024 377 1.901 -0.611 5.483
|
||||
+ntp-server2 192.0.2.12 2 u 887 1024 377 0.922 -0.246 2.864</computeroutput></screen>
|
||||
<para>Contents in the <emphasis>remote</emphasis> column should
|
||||
indicate the hostname or IP address of one or more NTP servers.</para>
|
||||
<note>
|
||||
<para>Contents in the <emphasis>refid</emphasis> column typically
|
||||
reference IP addresses of upstream servers.</para>
|
||||
</note>
|
||||
</step>
|
||||
<step>
|
||||
<para>Run this command on the <emphasis>controller</emphasis> node:
|
||||
</para>
|
||||
<screen><prompt>#</prompt> <userinput>ntpq -c assoc</userinput>
|
||||
<computeroutput>ind assid status conf reach auth condition last_event cnt
|
||||
===========================================================
|
||||
1 20487 961a yes yes none sys.peer sys_peer 1
|
||||
2 20488 941a yes yes none candidate sys_peer 1</computeroutput></screen>
|
||||
<para>Contents in the <emphasis>condition</emphasis> column should
|
||||
indicate <literal>sys.peer</literal> for at least one server.</para>
|
||||
</step>
|
||||
<step>
|
||||
<para>Run this command on <emphasis>all other</emphasis> nodes:</para>
|
||||
<screen><prompt>#</prompt> <userinput>ntpq -c peers</userinput>
|
||||
<computeroutput> remote refid st t when poll reach delay offset jitter
|
||||
==============================================================================
|
||||
*controller 192.0.2.21 3 u 47 64 37 0.308 -0.251 0.079</computeroutput></screen>
|
||||
<para>Contents in the <emphasis>remote</emphasis> column should
|
||||
indicate the hostname of the controller node.</para>
|
||||
<note>
|
||||
<para>Contents in the <emphasis>refid</emphasis> column typically
|
||||
reference IP addresses of upstream servers.</para>
|
||||
</note>
|
||||
</step>
|
||||
<step>
|
||||
<para>Run this command on <emphasis>all other</emphasis> nodes:
|
||||
</para>
|
||||
<screen><prompt>#</prompt> <userinput>ntpq -c assoc</userinput>
|
||||
<computeroutput>ind assid status conf reach auth condition last_event cnt
|
||||
===========================================================
|
||||
1 21181 963a yes yes none sys.peer sys_peer 3</computeroutput></screen>
|
||||
<para>Contents in the <emphasis>condition</emphasis> column should
|
||||
indicate <literal>sys.peer</literal>.</para>
|
||||
</step>
|
||||
</procedure>
|
||||
</section>
|
||||
</section>
|
||||
|
Loading…
Reference in New Issue
Block a user