change the prefix NATGW_ to CTDB_NATGW_
authorRonnie Sahlberg <ronniesahlberg@gmail.com>
Wed, 13 May 2009 22:12:48 +0000 (08:12 +1000)
committerRonnie Sahlberg <ronniesahlberg@gmail.com>
Wed, 13 May 2009 22:12:48 +0000 (08:12 +1000)
config/ctdb.sysconfig
config/events.d/11.natgw
doc/ctdbd.1
doc/ctdbd.1.html
doc/ctdbd.1.xml

index 340ac75d4c89d8455cc355af57b9d478163b0456..758e89148e4a5a9adce29b25b8f41dcc771aa7dc 100644 (file)
 # and thus no proper routes to the external world it will instead
 # route all packets through the nat-gw node.
 #
-# NATGW_NODES is the list of nodes that belong to this natgw group.
+# CTDB_NATGW_NODES is the list of nodes that belong to this natgw group.
 # You can have multiple natgw groups in one cluster but each node
 # can only belong to one single natgw group.
 #
-# NATGW_PUBLIC_IP=10.0.0.227/24
-# NATGW_PUBLIC_IFACE=eth0
-# NATGW_DEFAULT_GATEWAY=10.0.0.1
-# NATGW_PRIVATE_NETWORK=10.1.1.0/24
-# NATGW_NODES=/etc/ctdb/natgw_nodes
+# CTDB_NATGW_PUBLIC_IP=10.0.0.227/24
+# CTDB_NATGW_PUBLIC_IFACE=eth0
+# CTDB_NATGW_DEFAULT_GATEWAY=10.0.0.1
+# CTDB_NATGW_PRIVATE_NETWORK=10.1.1.0/24
+# CTDB_NATGW_NODES=/etc/ctdb/natgw_nodes
 
 # where to log messages
 # the default is /var/log/log.ctdb
index 0fee6ff4a3b903c82b23bc713d6f9d0e757d47fb..3da60d898bb5f2462a3a4a198cc922e5eff62212 100644 (file)
@@ -8,7 +8,7 @@
 . $CTDB_BASE/functions
 loadconfig ctdb
 
-[ -z "$NATGW_PUBLIC_IFACE" ] && exit 0
+[ -z "$CTDB_NATGW_PUBLIC_IFACE" ] && exit 0
 
 cmd="$1"
 shift
@@ -16,14 +16,14 @@ PATH=/usr/bin:/bin:/usr/sbin:/sbin:$PATH
 
 
 delete_all() {
-       remove_ip $NATGW_PUBLIC_IP $NATGW_PUBLIC_IFACE
-       remove_ip $NATGW_PUBLIC_IP_HOST lo
+       remove_ip $CTDB_NATGW_PUBLIC_IP $CTDB_NATGW_PUBLIC_IFACE
+       remove_ip $CTDB_NATGW_PUBLIC_IP_HOST lo
 
        ip route del 0.0.0.0/0 metric 10 >/dev/null 2>/dev/null
 
        # Delete the masquerading setup from a previous iteration where we
        # were the NAT-GW
-       iptables -D POSTROUTING -t nat -s $NATGW_PRIVATE_NETWORK -d ! $NATGW_PRIVATE_NETWORK -j MASQUERADE >/dev/null 2>/dev/null
+       iptables -D POSTROUTING -t nat -s $CTDB_NATGW_PRIVATE_NETWORK -d ! $CTDB_NATGW_PRIVATE_NETWORK -j MASQUERADE >/dev/null 2>/dev/null
 
 }
 
@@ -33,16 +33,16 @@ case $cmd in
        NATGWMASTER=`ctdb natgwlist | head -1`
        NATGWIP=`ctdb natgwlist | tail --lines=+2 | head -1 | cut -d: -f3`
 
-       NATGW_PUBLIC_IP_HOST=`echo $NATGW_PUBLIC_IP | sed -e "s/\/.*/\/32/"`
+       CTDB_NATGW_PUBLIC_IP_HOST=`echo $CTDB_NATGW_PUBLIC_IP | sed -e "s/\/.*/\/32/"`
 
        delete_all
 
        if [ "$MYPNN" == "$NATGWMASTER" ]; then
                # This is the first node, set it up as the NAT GW
                echo 1 >/proc/sys/net/ipv4/ip_forward
-               iptables -A POSTROUTING -t nat -s $NATGW_PRIVATE_NETWORK -d ! $NATGW_PRIVATE_NETWORK -j MASQUERADE
-               ip addr add $NATGW_PUBLIC_IP dev $NATGW_PUBLIC_IFACE
-               ip route add 0.0.0.0/0 via $NATGW_DEFAULT_GATEWAY >/dev/null 2>/dev/null
+               iptables -A POSTROUTING -t nat -s $CTDB_NATGW_PRIVATE_NETWORK -d ! $CTDB_NATGW_PRIVATE_NETWORK -j MASQUERADE
+               ip addr add $CTDB_NATGW_PUBLIC_IP dev $CTDB_NATGW_PUBLIC_IFACE
+               ip route add 0.0.0.0/0 via $CTDB_NATGW_DEFAULT_GATEWAY >/dev/null 2>/dev/null
        else
                # This is not the NAT-GW
                # Assign the public ip to the private interface and make
@@ -50,7 +50,7 @@ case $cmd in
                # We do this so that the ip address will exist on a
                # non-loopback interface so that samba may send it along in the
                # KDC requests.
-               ip addr add $NATGW_PUBLIC_IP_HOST dev lo
+               ip addr add $CTDB_NATGW_PUBLIC_IP_HOST dev lo
                ip route add 0.0.0.0/0 via $NATGWIP metric 10
        fi
 
index b7a89eb689e2a9a65f54dc360c16c2cb96146a9e..d6ac7ba1f323dd14f7c0519ef1a2de60934dd2c9 100644 (file)
@@ -1,11 +1,11 @@
 .\"     Title: ctdbd
 .\"    Author: 
 .\" Generator: DocBook XSL Stylesheets v1.73.2 <http://docbook.sf.net/>
-.\"      Date: 05/12/2009
+.\"      Date: 05/14/2009
 .\"    Manual: 
 .\"    Source: 
 .\"
-.TH "CTDBD" "1" "05/12/2009" "" ""
+.TH "CTDBD" "1" "05/14/2009" "" ""
 .\" disable hyphenation
 .nh
 .\" disable justification (adjust text to left margin only)
@@ -464,46 +464,46 @@ NAT\-GW is configured in /etc/sysconfigctdb by setting the following variables:
 # and thus no proper routes to the external world it will instead
 # route all packets through the nat\-gw node\.
 #
-# NATGW_NODES is the list of nodes that belong to this natgw group\.
+# CTDB_NATGW_NODES is the list of nodes that belong to this natgw group\.
 # You can have multiple natgw groups in one cluster but each node
 # can only belong to one single natgw group\.
 #
-# NATGW_PUBLIC_IP=10\.0\.0\.227/24
-# NATGW_PUBLIC_IFACE=eth0
-# NATGW_DEFAULT_GATEWAY=10\.0\.0\.1
-# NATGW_PRIVATE_NETWORK=10\.1\.1\.0/24
-# NATGW_NODES=/etc/ctdb/natgw_nodes
+# CTDB_NATGW_PUBLIC_IP=10\.0\.0\.227/24
+# CTDB_NATGW_PUBLIC_IFACE=eth0
+# CTDB_NATGW_DEFAULT_GATEWAY=10\.0\.0\.1
+# CTDB_NATGW_PRIVATE_NETWORK=10\.1\.1\.0/24
+# CTDB_NATGW_NODES=/etc/ctdb/natgw_nodes
     
 .fi
 .RE
-.SS "NATGW_PUBLIC_IP"
+.SS "CTDB_NATGW_PUBLIC_IP"
 .PP
 This is an ip address in the public network that is used for all outgoing traffic when the public addresses are not assigned\. This address will be assigned to one of the nodes in the cluster which will masquerade all traffic for the other nodes\.
 .PP
 Format of this parameter is IPADDRESS/NETMASK
-.SS "NATGW_PUBLIC_IFACE"
+.SS "CTDB_NATGW_PUBLIC_IFACE"
 .PP
-This is the physical interface where the NATGW_PUBLIC_IP will be assigned to\. This should be an interface connected to the public network\.
+This is the physical interface where the CTDB_NATGW_PUBLIC_IP will be assigned to\. This should be an interface connected to the public network\.
 .PP
 Format of this parameter is INTERFACE
-.SS "NATGW_DEFAULT_GATEWAY"
+.SS "CTDB_NATGW_DEFAULT_GATEWAY"
 .PP
-This is the default gateway to use on the node that is elected to host the NATGW_PUBLIC_IP\. This is the default gateway on the public network\.
+This is the default gateway to use on the node that is elected to host the CTDB_NATGW_PUBLIC_IP\. This is the default gateway on the public network\.
 .PP
 Format of this parameter is IPADDRESS
-.SS "NATGW_PRIVATE_NETWORK"
+.SS "CTDB_NATGW_PRIVATE_NETWORK"
 .PP
 This is the network/netmask used for the interal private network\.
 .PP
 Format of this parameter is IPADDRESS/NETMASK
-.SS "NATGW_NODES"
+.SS "CTDB_NATGW_NODES"
 .PP
 This is the list of all nodes that belong to the same NATGW group as this node\. The default is /etc/ctdb/natgw_nodes\.
 .SS "Operation"
 .PP
 When the NAT\-GW fiunctionality is used, one of the nodes is elected to act as a NAT router for all the other nodes in the group when they need to originate traffic to the external public network\.
 .PP
-The NAT\-GW node is assigned the NATGW_PUBLIC_IP to the designated interface and the provided default route\. The NAT\-GW is configured to act as a router and to masquerade all traffic it receives from the internal private network and which is destined to the external network(s)\.
+The NAT\-GW node is assigned the CTDB_NATGW_PUBLIC_IP to the designated interface and the provided default route\. The NAT\-GW is configured to act as a router and to masquerade all traffic it receives from the internal private network and which is destined to the external network(s)\.
 .PP
 All other nodes in the group are configured with a default route of metric 10 pointing to the designated NAT GW node\.
 .PP
index ff7e37eae7a4ca4e9ddf2ab21c703339dfe57485..7ac33c7dfbe222e1869d3ffddf7988776a7d4579 100644 (file)
@@ -483,37 +483,37 @@ CTDB_CAPABILITY_RECMASTER=no
 # and thus no proper routes to the external world it will instead
 # route all packets through the nat-gw node.
 #
-# NATGW_NODES is the list of nodes that belong to this natgw group.
+# CTDB_NATGW_NODES is the list of nodes that belong to this natgw group.
 # You can have multiple natgw groups in one cluster but each node
 # can only belong to one single natgw group.
 #
-# NATGW_PUBLIC_IP=10.0.0.227/24
-# NATGW_PUBLIC_IFACE=eth0
-# NATGW_DEFAULT_GATEWAY=10.0.0.1
-# NATGW_PRIVATE_NETWORK=10.1.1.0/24
-# NATGW_NODES=/etc/ctdb/natgw_nodes
-    </pre></div><div class="refsect2" lang="en"><a name="id2476123"></a><h3>NATGW_PUBLIC_IP</h3><p>
+# CTDB_NATGW_PUBLIC_IP=10.0.0.227/24
+# CTDB_NATGW_PUBLIC_IFACE=eth0
+# CTDB_NATGW_DEFAULT_GATEWAY=10.0.0.1
+# CTDB_NATGW_PRIVATE_NETWORK=10.1.1.0/24
+# CTDB_NATGW_NODES=/etc/ctdb/natgw_nodes
+    </pre></div><div class="refsect2" lang="en"><a name="id2476123"></a><h3>CTDB_NATGW_PUBLIC_IP</h3><p>
       This is an ip address in the public network that is used for all outgoing
       traffic when the public addresses are not assigned.
       This address will be assigned to one of the nodes in the cluster which
       will masquerade all traffic for the other nodes.
     </p><p>
       Format of this parameter is IPADDRESS/NETMASK
-    </p></div><div class="refsect2" lang="en"><a name="id2476141"></a><h3>NATGW_PUBLIC_IFACE</h3><p>
-      This is the physical interface where the NATGW_PUBLIC_IP will be
+    </p></div><div class="refsect2" lang="en"><a name="id2476141"></a><h3>CTDB_NATGW_PUBLIC_IFACE</h3><p>
+      This is the physical interface where the CTDB_NATGW_PUBLIC_IP will be
       assigned to. This should be an interface connected to the public network.
     </p><p>
       Format of this parameter is INTERFACE
-    </p></div><div class="refsect2" lang="en"><a name="id2476156"></a><h3>NATGW_DEFAULT_GATEWAY</h3><p>
+    </p></div><div class="refsect2" lang="en"><a name="id2476156"></a><h3>CTDB_NATGW_DEFAULT_GATEWAY</h3><p>
       This is the default gateway to use on the node that is elected to host
-      the NATGW_PUBLIC_IP. This is the default gateway on the public network.
+      the CTDB_NATGW_PUBLIC_IP. This is the default gateway on the public network.
     </p><p>
       Format of this parameter is IPADDRESS
-    </p></div><div class="refsect2" lang="en"><a name="id2476171"></a><h3>NATGW_PRIVATE_NETWORK</h3><p>
+    </p></div><div class="refsect2" lang="en"><a name="id2476172"></a><h3>CTDB_NATGW_PRIVATE_NETWORK</h3><p>
       This is the network/netmask used for the interal private network.
     </p><p>
       Format of this parameter is IPADDRESS/NETMASK
-    </p></div><div class="refsect2" lang="en"><a name="id2476186"></a><h3>NATGW_NODES</h3><p>
+    </p></div><div class="refsect2" lang="en"><a name="id2476186"></a><h3>CTDB_NATGW_NODES</h3><p>
       This is the list of all nodes that belong to the same NATGW group
       as this node. The default is /etc/ctdb/natgw_nodes.
     </p></div><div class="refsect2" lang="en"><a name="id2476197"></a><h3>Operation</h3><p>
@@ -521,7 +521,7 @@ CTDB_CAPABILITY_RECMASTER=no
       to act as a NAT router for all the other nodes in the group when
       they need to originate traffic to the external public network.
     </p><p>
-      The NAT-GW node is assigned the NATGW_PUBLIC_IP to the designated
+      The NAT-GW node is assigned the CTDB_NATGW_PUBLIC_IP to the designated
       interface and the provided default route. The NAT-GW is configured
       to act as a router and to masquerade all traffic it receives from the
       internal private network and which is destined to the external network(s).
index 10f9ed45f4e25430519cde44bbceddf294fbfdf0..555ca06d303317ff5ded21f33050e388956a6ebb 100644 (file)
@@ -861,19 +861,19 @@ CTDB_CAPABILITY_RECMASTER=no
 # and thus no proper routes to the external world it will instead
 # route all packets through the nat-gw node.
 #
-# NATGW_NODES is the list of nodes that belong to this natgw group.
+# CTDB_NATGW_NODES is the list of nodes that belong to this natgw group.
 # You can have multiple natgw groups in one cluster but each node
 # can only belong to one single natgw group.
 #
-# NATGW_PUBLIC_IP=10.0.0.227/24
-# NATGW_PUBLIC_IFACE=eth0
-# NATGW_DEFAULT_GATEWAY=10.0.0.1
-# NATGW_PRIVATE_NETWORK=10.1.1.0/24
-# NATGW_NODES=/etc/ctdb/natgw_nodes
+# CTDB_NATGW_PUBLIC_IP=10.0.0.227/24
+# CTDB_NATGW_PUBLIC_IFACE=eth0
+# CTDB_NATGW_DEFAULT_GATEWAY=10.0.0.1
+# CTDB_NATGW_PRIVATE_NETWORK=10.1.1.0/24
+# CTDB_NATGW_NODES=/etc/ctdb/natgw_nodes
     </screen>
     </refsect2>
 
-    <refsect2><title>NATGW_PUBLIC_IP</title>
+    <refsect2><title>CTDB_NATGW_PUBLIC_IP</title>
     <para>
       This is an ip address in the public network that is used for all outgoing
       traffic when the public addresses are not assigned.
@@ -885,9 +885,9 @@ CTDB_CAPABILITY_RECMASTER=no
     </para>
     </refsect2>
 
-    <refsect2><title>NATGW_PUBLIC_IFACE</title>
+    <refsect2><title>CTDB_NATGW_PUBLIC_IFACE</title>
     <para>
-      This is the physical interface where the NATGW_PUBLIC_IP will be
+      This is the physical interface where the CTDB_NATGW_PUBLIC_IP will be
       assigned to. This should be an interface connected to the public network.
     </para>
     <para>
@@ -895,17 +895,17 @@ CTDB_CAPABILITY_RECMASTER=no
     </para>
     </refsect2>
 
-    <refsect2><title>NATGW_DEFAULT_GATEWAY</title>
+    <refsect2><title>CTDB_NATGW_DEFAULT_GATEWAY</title>
     <para>
       This is the default gateway to use on the node that is elected to host
-      the NATGW_PUBLIC_IP. This is the default gateway on the public network.
+      the CTDB_NATGW_PUBLIC_IP. This is the default gateway on the public network.
     </para>
     <para>
       Format of this parameter is IPADDRESS
     </para>
     </refsect2>
 
-    <refsect2><title>NATGW_PRIVATE_NETWORK</title>
+    <refsect2><title>CTDB_NATGW_PRIVATE_NETWORK</title>
     <para>
       This is the network/netmask used for the interal private network.
     </para>
@@ -914,7 +914,7 @@ CTDB_CAPABILITY_RECMASTER=no
     </para>
     </refsect2>
 
-    <refsect2><title>NATGW_NODES</title>
+    <refsect2><title>CTDB_NATGW_NODES</title>
     <para>
       This is the list of all nodes that belong to the same NATGW group
       as this node. The default is /etc/ctdb/natgw_nodes.
@@ -928,7 +928,7 @@ CTDB_CAPABILITY_RECMASTER=no
       they need to originate traffic to the external public network.
     </para>
     <para>
-      The NAT-GW node is assigned the NATGW_PUBLIC_IP to the designated
+      The NAT-GW node is assigned the CTDB_NATGW_PUBLIC_IP to the designated
       interface and the provided default route. The NAT-GW is configured
       to act as a router and to masquerade all traffic it receives from the
       internal private network and which is destined to the external network(s).