Modify hooks to use node infra details.
authorDimitris Aragiorgis <dimara@grnet.gr>
Thu, 24 May 2012 04:57:04 +0000 (07:57 +0300)
committerDimitris Aragiorgis <dimara@grnet.gr>
Thu, 24 May 2012 04:57:04 +0000 (07:57 +0300)
When connecting a network in routed mode pass the routing table
and not the vlan as link. The link will be choosen depending the
network type and the cluster/node infrastructure.

Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>

hooks/network-connect-post.d/snf-network
hooks/network-disconnect-post.d/snf-network

index 631690e..2d5e6ac 100755 (executable)
@@ -27,9 +27,9 @@ source $NODEINFRAFILE
 source $NETFILE
 
 if [ "$MODE" == "routed" ]; then 
-  VLAN=$LINK
   TABLE=rt_$NETWORK
   if [ "$TYPE" == "public" ]; then
+    VLAN=$PUBLIC_VLAN
     ARP_IP=$(ipcalc $SUBNET | grep HostMax | awk '{print $2}')
     
     ip link set $VLAN up
index 6c121e8..0fb1dff 100755 (executable)
@@ -23,9 +23,9 @@ source $NETFILE
 source $NODEMAPFILE
 
 if [ "$MODE" == "routed" ]; then 
-  VLAN=$LINK
   TABLE=rt_$NETWORK
   if [ "$TYPE" == "public" ]; then
+    VLAN=$PUBLIC_VLAN
     ARP_IP=$(ipcalc $SUBNET | grep HostMax | awk '{print $2}')
   
     arptables -D OUTPUT -o $VLAN --opcode request -j mangle --mangle-ip-s  $ARP_IP