Difference between revisions of "Switch your model/image from TIPC to UDP"

m (Step 1)
(FAQ / Troubleshooting)
 
(13 intermediate revisions by 2 users not shown)
Line 1: Line 1:
== From Model ==
+
UDP can be run in two modes -- local or cloud.  In local mode, the UDP system uses multicast to find members of the cluster and auto-assigns non-routable IP addresses onto an alias of your chosen backplane network interface.  The advantage of local mode is that no IP addresses need to be configured.
 +
 
 +
In cloud mode, it is assumed that the cluster is potentially running across the entire internet (no multicast) on machines with specified IP addresses.  Since no initial discovery is possible, every node needs to be configured with the IP addresses of the two system controller nodes.
 +
 
 +
== Changing Your Model from TIPC to UDP ==
 
=== Step 1 ===
 
=== Step 1 ===
- Using IDE open your model, upgrade your model, a xport configure file clTransport.xml will be generated in <your model>/config/clTransport.xml
+
- If you have a pre-60 model you will need to upgrade it.  Using the IDE open your model, every option will be grey except model->update. This update will generate a configuration file called <your model>/config/clTransport.xml that looks something like this:
  
 
     <?xml version="1.0" encoding="UTF-8"?>
 
     <?xml version="1.0" encoding="UTF-8"?>
Line 7: Line 11:
 
       <version v0="4.0.0">
 
       <version v0="4.0.0">
 
         <multixport xmlns="multixport.ecore">
 
         <multixport xmlns="multixport.ecore">
        <config>
 
          <default>TIPC</default>
 
        </config>
 
 
           <xports>
 
           <xports>
 
             <xport>
 
             <xport>
Line 30: Line 31:
  
 
=== Step 2 ===
 
=== Step 2 ===
Edit content clTransport.xml with UDP default:
+
Edit the content clTransport.xml with the UDP configuration details, and remove the TIPC details:
  
 
     <?xml version="1.0" encoding="UTF-8"?>
 
     <?xml version="1.0" encoding="UTF-8"?>
 
     <openClovisAsp>
 
     <openClovisAsp>
 
       <version v0="4.0.0">
 
       <version v0="4.0.0">
        <ioc:BootConfig xmlns:ioc="ioc.ecore">
+
      <multixport xmlns="multixport.ecore">
 
           <xports>
 
           <xports>
 
             <xport>
 
             <xport>
Line 42: Line 43:
 
             </xport>
 
             </xport>
 
           </xports>
 
           </xports>
 +
          <protocol default="UDP"/>
 
           <multicast address="226.0.1.1" port="9595" />
 
           <multicast address="226.0.1.1" port="9595" />
 
           <heartbeat>
 
           <heartbeat>
Line 48: Line 50:
 
               <retries>5</retries>
 
               <retries>5</retries>
 
           </heartbeat>
 
           </heartbeat>
         </ioc:BootConfig>
+
         </multixport>
 
       </version>
 
       </version>
 
     <openClovisAsp>
 
     <openClovisAsp>
  
UDP use multicast to notification component arrival and departure.
+
=== Step 3 (Local mode) ===
 
+
Add 2 environment variables into <model_dir>/src/target.env, or make sure these variables are defined before starting SAFplus:
=== Step 3 ===
+
Add 2 env variables into <model_dir>/src/target.env:
+
  
 
  export ASP_UDP_SUBNET=<IP Range>/Length
 
  export ASP_UDP_SUBNET=<IP Range>/Length
Line 65: Line 65:
 
  export ASP_UDP_LINK_NAME=eth0
 
  export ASP_UDP_LINK_NAME=eth0
  
=== Step 4 ===
 
Before running ASP, should export/setenv 2 below variables:
 
export ASP_UDP_SUBNET=192.168.57.0/24
 
export ASP_UDP_LINK_NAME=eth0
 
  
== UDP without Node Discovery (Multicast) ==
+
=== Step 3 (Cloud mode) ===
 +
To use the UDP transport without node discovery (multicast) or IP address assignment, you must:
 +
 
 +
1. Add these 2 environment variables into <model_dir>/src/target.env, or make sure these variables are defined before starting SAFplus:
 +
 
 +
ASP_UDP_USE_EXISTING_IP=true
 +
 
 +
ASP_UDP_LINK_NAME=<link name, for example 'eth0'>
 +
 
 +
2. Configure UDP peer addresses like this:
 +
<code>
 +
    <peerAddresses port="6789">
 +
        <peer addr="192.168.56.101"/>
 +
        <peer addr="192.168.56.102"/>
 +
    </peerAddresses>
 +
</code>
  
To use the UDP transport without node discovery, you must explicitly configure the peer addresses. 
+
The following is a this complete example of a cloud mode configuration file:
  
 +
<code>
 
  <?xml version="1.0" encoding="UTF-8"?>
 
  <?xml version="1.0" encoding="UTF-8"?>
 
  <openClovisAsp>
 
  <openClovisAsp>
 
   <version v0="4.0.0">
 
   <version v0="4.0.0">
    <multixport xmlns="multixport.ecore">
+
  <multixport xmlns="multixport.ecore">
      <xports>
+
    <xports>
        <xport>
+
      <xport>
          <type>UDP</type>
+
        <type>UDP</type>
          <plugin>libClUDP.so</plugin>
+
        <plugin>libClUDP.so</plugin>
        </xport>
+
      </xport>
      </xports>
+
    </xports>
 +
    <protocol default="UDP"/>
 
     <heartbeat>
 
     <heartbeat>
 
           <interval>1000</interval>
 
           <interval>1000</interval>
Line 89: Line 102:
 
           <retries>4</retries>
 
           <retries>4</retries>
 
     </heartbeat>
 
     </heartbeat>
     <peerAddresses port="5689">
+
     <peerAddresses port="6789">
      <peer addr="192.168.20.1"/>
+
        <peer addr="192.168.56.101"/>
      <peer addr="192.168.20.2"/>
+
        <peer addr="192.168.56.102"/>
 
     </peerAddresses>
 
     </peerAddresses>
 
     </multixport>
 
     </multixport>
 
   </version>
 
   </version>
 
  </openClovisAsp>
 
  </openClovisAsp>
 +
</code>
  
== From Image ==
+
=== Before or After "make images"? ===
Create a clTransport.xml like step 2 & 3 above and retarball your images.
+
clTransport.xml and target.env can be changed before the "make images" step so all generated images are UDP by default OR these files can be changed on every node after deployment.
  
== Q&A ==
+
== FAQ / Troubleshooting ==
* Q: Is the SAFplus able to run as a user other than root?
+
 
* A: Only pre-requisites, configure interface name (ASP_UDP_LINK_NAME) with IP address (ASP_UDP_SUBNET.DEFAULT_NODEADDR) (Use DEFAULT_NODEADDR settings from asp.conf file)
+
 
 +
=== Q: Is the SAFplus able to run in UDP local mode as a non-root user? ===
 +
* A: Yes, but you must properly configure the interfaces since SAFplus cannot.
 +
Configure interface name (ASP_UDP_LINK_NAME) with the IP address calculated from your subnet and node address (ASP_UDP_SUBNET.DEFAULT_NODEADDR).  The node address is the DEFAULT_NODEADDR settings from etc/asp.conf file.
  
 
  Example:
 
  Example:
Line 109: Line 126:
 
   user:#export ASP_UDP_LINK_NAME=eth0
 
   user:#export ASP_UDP_LINK_NAME=eth0
 
   user:#./etc/init.d/safplus start
 
   user:#./etc/init.d/safplus start
 +
 +
=== Q: In UDP LAN mode, nodes do not discover each other ===
 +
 +
You can determine this by running bin/safplus_info command "nodes" to see what nodes are alive.
 +
 +
* A: UDP broadcast packets are being dropped.  This could be a router configuration, but is more likely a configuration in your Linux distribution's firewall software.  Disable the firewall or add rules to allow UDP broadcast.  How do to this depends on your distro:
 +
Examples:
 +
  Centos 7: systemctl stop firewalld
 +
  Ubuntu:  service iptables stop
 +
 +
=== Q: In UDP mode, the software still tries to load the TIPC kernel module ===
 +
 +
* A: TIPC is still specified as a backup communications protocol.  Edit etc/clTransport.xml (on all nodes) and remove the <xport><type>TIPC ... </xport> block.  Also edit etc/asp.conf and set "export BUILD_TIPC=0" (rather than =1).

Latest revision as of 13:08, 9 May 2016

UDP can be run in two modes -- local or cloud. In local mode, the UDP system uses multicast to find members of the cluster and auto-assigns non-routable IP addresses onto an alias of your chosen backplane network interface. The advantage of local mode is that no IP addresses need to be configured.

In cloud mode, it is assumed that the cluster is potentially running across the entire internet (no multicast) on machines with specified IP addresses. Since no initial discovery is possible, every node needs to be configured with the IP addresses of the two system controller nodes.

Contents

[edit] Changing Your Model from TIPC to UDP

[edit] Step 1

- If you have a pre-60 model you will need to upgrade it. Using the IDE open your model, every option will be grey except model->update. This update will generate a configuration file called <your model>/config/clTransport.xml that looks something like this:

   <?xml version="1.0" encoding="UTF-8"?>
   <openClovisAsp>
     <version v0="4.0.0">
       <multixport xmlns="multixport.ecore">
         <xports>
           <xport>
             <type>TIPC</type>
             <plugin>libClTIPC.so</plugin>
           </xport>
         </xports>
       </multixport>
     </version>
   </openClovisAsp>

[edit] Step 2

Edit the content clTransport.xml with the UDP configuration details, and remove the TIPC details:

   <?xml version="1.0" encoding="UTF-8"?>
   <openClovisAsp>
     <version v0="4.0.0">
      <multixport xmlns="multixport.ecore">
         <xports>
           <xport>
             <type>UDP</type>
             <plugin>libClUDP.so</plugin>
           </xport>
         </xports>
         <protocol default="UDP"/>
         <multicast address="226.0.1.1" port="9595" />
         <heartbeat>
             <interval>3000</interval>
             <intervalLocal>3000</intervalLocal>
             <retries>5</retries>
         </heartbeat>
       </multixport>
     </version>
   <openClovisAsp>

[edit] Step 3 (Local mode)

Add 2 environment variables into <model_dir>/src/target.env, or make sure these variables are defined before starting SAFplus:

export ASP_UDP_SUBNET=<IP Range>/Length
export ASP_UDP_LINK_NAME=<your interface>
  • Example:
export ASP_UDP_SUBNET=192.168.57.0/24
export ASP_UDP_LINK_NAME=eth0


[edit] Step 3 (Cloud mode)

To use the UDP transport without node discovery (multicast) or IP address assignment, you must:

1. Add these 2 environment variables into <model_dir>/src/target.env, or make sure these variables are defined before starting SAFplus:

ASP_UDP_USE_EXISTING_IP=true

ASP_UDP_LINK_NAME=<link name, for example 'eth0'>

2. Configure UDP peer addresses like this:

    <peerAddresses port="6789">
       <peer addr="192.168.56.101"/>
       <peer addr="192.168.56.102"/>
    </peerAddresses>

The following is a this complete example of a cloud mode configuration file:

<?xml version="1.0" encoding="UTF-8"?>
<openClovisAsp>
 <version v0="4.0.0">
  <multixport xmlns="multixport.ecore">
    <xports>
      <xport>
        <type>UDP</type>
        <plugin>libClUDP.so</plugin>
      </xport>
    </xports>
    <protocol default="UDP"/>
    <heartbeat>
         <interval>1000</interval>
         <intervalLocal>1000</intervalLocal>
         <retries>4</retries>
    </heartbeat>
    <peerAddresses port="6789">
       <peer addr="192.168.56.101"/>
       <peer addr="192.168.56.102"/>
    </peerAddresses>
   </multixport>
 </version>
</openClovisAsp>

[edit] Before or After "make images"?

clTransport.xml and target.env can be changed before the "make images" step so all generated images are UDP by default OR these files can be changed on every node after deployment.

[edit] FAQ / Troubleshooting

[edit] Q: Is the SAFplus able to run in UDP local mode as a non-root user?

  • A: Yes, but you must properly configure the interfaces since SAFplus cannot.

Configure interface name (ASP_UDP_LINK_NAME) with the IP address calculated from your subnet and node address (ASP_UDP_SUBNET.DEFAULT_NODEADDR). The node address is the DEFAULT_NODEADDR settings from etc/asp.conf file.

Example:
 root:#ifconfig eth0 192.168.57.1
 user:#export ASP_UDP_SUBNET=192.168.57.0/24
 user:#export ASP_UDP_LINK_NAME=eth0
 user:#./etc/init.d/safplus start

[edit] Q: In UDP LAN mode, nodes do not discover each other

You can determine this by running bin/safplus_info command "nodes" to see what nodes are alive.

  • A: UDP broadcast packets are being dropped. This could be a router configuration, but is more likely a configuration in your Linux distribution's firewall software. Disable the firewall or add rules to allow UDP broadcast. How do to this depends on your distro:
Examples:
  Centos 7: systemctl stop firewalld
  Ubuntu:   service iptables stop

[edit] Q: In UDP mode, the software still tries to load the TIPC kernel module

  • A: TIPC is still specified as a backup communications protocol. Edit etc/clTransport.xml (on all nodes) and remove the <xport><type>TIPC ... </xport> block. Also edit etc/asp.conf and set "export BUILD_TIPC=0" (rather than =1).