|
|
05afe3 |
diff -uNr a/heartbeat/aliyun-vpc-move-ip b/heartbeat/aliyun-vpc-move-ip
|
|
|
05afe3 |
--- a/heartbeat/aliyun-vpc-move-ip 2018-08-03 15:21:34.869664678 +0200
|
|
|
05afe3 |
+++ b/heartbeat/aliyun-vpc-move-ip 2018-08-03 15:22:48.632185198 +0200
|
|
|
05afe3 |
@@ -36,13 +36,13 @@
|
|
|
05afe3 |
ip_drop
|
|
|
05afe3 |
fi
|
|
|
05afe3 |
|
|
|
05afe3 |
- cmd="aliyuncli vpc CreateRouteEntry --RouteTableId $OCF_RESKEY_routing_table --DestinationCidrBlock ${OCF_RESKEY_address}/32 --NextHopId $ECS_INSTANCE_ID --NextHopType Instance --output text"
|
|
|
05afe3 |
+ cmd="aliyuncli-ra vpc CreateRouteEntry --RouteTableId $OCF_RESKEY_routing_table --DestinationCidrBlock ${OCF_RESKEY_address}/32 --NextHopId $ECS_INSTANCE_ID --NextHopType Instance --output text"
|
|
|
05afe3 |
ocf_log debug "executing command: $cmd"
|
|
|
05afe3 |
$cmd
|
|
|
05afe3 |
rc=$?
|
|
|
05afe3 |
while [ $rc -ne 0 ]; do
|
|
|
05afe3 |
sleep 1
|
|
|
05afe3 |
- cmd="aliyuncli vpc CreateRouteEntry --RouteTableId $OCF_RESKEY_routing_table --DestinationCidrBlock ${OCF_RESKEY_address}/32 --NextHopId $ECS_INSTANCE_ID --NextHopType Instance --output text"
|
|
|
05afe3 |
+ cmd="aliyuncli-ra vpc CreateRouteEntry --RouteTableId $OCF_RESKEY_routing_table --DestinationCidrBlock ${OCF_RESKEY_address}/32 --NextHopId $ECS_INSTANCE_ID --NextHopType Instance --output text"
|
|
|
05afe3 |
ocf_log debug "executing command: $cmd"
|
|
|
05afe3 |
$cmd
|
|
|
05afe3 |
rc=$?
|
|
|
05afe3 |
@@ -75,7 +75,7 @@
|
|
|
05afe3 |
return $OCF_ERR_GENERIC
|
|
|
05afe3 |
fi
|
|
|
05afe3 |
|
|
|
05afe3 |
- cmd="aliyuncli vpc DeleteRouteEntry --RouteTableId $OCF_RESKEY_routing_table --DestinationCidrBlock ${OCF_RESKEY_address}/32 --NextHopId $ROUTE_TO_INSTANCE --output text"
|
|
|
05afe3 |
+ cmd="aliyuncli-ra vpc DeleteRouteEntry --RouteTableId $OCF_RESKEY_routing_table --DestinationCidrBlock ${OCF_RESKEY_address}/32 --NextHopId $ROUTE_TO_INSTANCE --output text"
|
|
|
05afe3 |
ocf_log debug "executing command: $cmd"
|
|
|
05afe3 |
$cmd
|
|
|
05afe3 |
if [ $? -ne 0 ]; then
|
|
|
05afe3 |
@@ -90,13 +90,13 @@
|
|
|
05afe3 |
}
|
|
|
05afe3 |
|
|
|
05afe3 |
wait_for_started() {
|
|
|
05afe3 |
- cmd="aliyuncli vpc DescribeRouteTables --RouteTableId $OCF_RESKEY_routing_table --output text"
|
|
|
05afe3 |
+ cmd="aliyuncli-ra vpc DescribeRouteTables --RouteTableId $OCF_RESKEY_routing_table --output text"
|
|
|
05afe3 |
ocf_log debug "executing command: $cmd"
|
|
|
05afe3 |
ROUTE_TO_INSTANCE="$($cmd | grep $OCF_RESKEY_address | awk '{ print $3 }')"
|
|
|
05afe3 |
|
|
|
05afe3 |
while [ "$ECS_INSTANCE_ID" != "$ROUTE_TO_INSTANCE" ]; do
|
|
|
05afe3 |
sleep 3
|
|
|
05afe3 |
- cmd="aliyuncli vpc DescribeRouteTables --RouteTableId $OCF_RESKEY_routing_table --output text"
|
|
|
05afe3 |
+ cmd="aliyuncli-ra vpc DescribeRouteTables --RouteTableId $OCF_RESKEY_routing_table --output text"
|
|
|
05afe3 |
ocf_log debug "executing command: $cmd"
|
|
|
05afe3 |
ROUTE_TO_INSTANCE="$($cmd | grep $OCF_RESKEY_address | awk '{ print $3 }')"
|
|
|
05afe3 |
done
|
|
|
05afe3 |
@@ -107,7 +107,7 @@
|
|
|
05afe3 |
|
|
|
05afe3 |
while [ ! -z "$ROUTE_TO_INSTANCE" ]; do
|
|
|
05afe3 |
sleep 1
|
|
|
05afe3 |
- cmd="aliyuncli vpc DescribeRouteTables --RouteTableId $OCF_RESKEY_routing_table --output text"
|
|
|
05afe3 |
+ cmd="aliyuncli-ra vpc DescribeRouteTables --RouteTableId $OCF_RESKEY_routing_table --output text"
|
|
|
05afe3 |
ocf_log debug "executing command: $cmd"
|
|
|
05afe3 |
ROUTE_TO_INSTANCE="$($cmd |grep $OCF_RESKEY_address | awk '{ print $3 }')"
|
|
|
05afe3 |
done
|
|
|
05afe3 |
@@ -248,7 +248,7 @@
|
|
|
05afe3 |
|
|
|
05afe3 |
ecs_ip_monitor() {
|
|
|
05afe3 |
ocf_log debug "function: ecsip_monitor: check routing table"
|
|
|
05afe3 |
- cmd="aliyuncli vpc DescribeRouteTables --RouteTableId $OCF_RESKEY_routing_table --output text"
|
|
|
05afe3 |
+ cmd="aliyuncli-ra vpc DescribeRouteTables --RouteTableId $OCF_RESKEY_routing_table --output text"
|
|
|
05afe3 |
ocf_log debug "executing command: $cmd"
|
|
|
05afe3 |
|
|
|
05afe3 |
ROUTE_TO_INSTANCE="$($cmd |grep $OCF_RESKEY_address | awk '{ print $3 }')"
|