You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by da...@apache.org on 2014/12/09 10:52:08 UTC

[1/3] git commit: updated refs/heads/4.4 to af4d1a6

Repository: cloudstack
Updated Branches:
  refs/heads/4.4 79f8d6f5c -> af4d1a635


remove biglock usage from ipsectunnel.sh

Biglock breaks creating VPN's when other scripts run at the
same time that also use the same biglock. These other scripts
do nothing that could harm our deployment and even multiple
vpn's can safely be created simultaniously.

(cherry picked from commit 8b412ce194eaf195dc77531379687de43e14a088)


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/2df7eb5b
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/2df7eb5b
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/2df7eb5b

Branch: refs/heads/4.4
Commit: 2df7eb5ba381775c614d9c982b3d7afc2ed3616e
Parents: 79f8d6f
Author: Remi Bergsma <rb...@schubergphilis.com>
Authored: Mon Dec 8 18:53:18 2014 +0100
Committer: Daan Hoogland <da...@onecht.net>
Committed: Tue Dec 9 10:50:04 2014 +0100

----------------------------------------------------------------------
 .../patches/debian/config/opt/cloud/bin/ipsectunnel.sh | 13 +++----------
 1 file changed, 3 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2df7eb5b/systemvm/patches/debian/config/opt/cloud/bin/ipsectunnel.sh
----------------------------------------------------------------------
diff --git a/systemvm/patches/debian/config/opt/cloud/bin/ipsectunnel.sh b/systemvm/patches/debian/config/opt/cloud/bin/ipsectunnel.sh
index e20c10f..9aa3f89 100755
--- a/systemvm/patches/debian/config/opt/cloud/bin/ipsectunnel.sh
+++ b/systemvm/patches/debian/config/opt/cloud/bin/ipsectunnel.sh
@@ -18,13 +18,6 @@
 
 source /root/func.sh
 
-lock="biglock"
-locked=$(getLockFile $lock)
-if [ "$locked" != "1" ]
-then
-    exit 1
-fi
-
 vpnconfdir="/etc/ipsec.d"
 vpnoutmark="0x525"
 vpninmark="0x524"
@@ -262,7 +255,7 @@ do
   p)    passive=1
         ;;
   ?)    usage
-        unlock_exit 2 $lock $locked
+        exit 2
         ;;
   esac
 done
@@ -301,7 +294,7 @@ then
     ret=$?
 else
     printf "Invalid action specified, must choose -A or -D to add/del tunnels\n" >&2
-    unlock_exit 5 $lock $locked
+    exit 5
 fi
 
-unlock_exit $ret $lock $locked
+exit $ret


[2/3] git commit: updated refs/heads/4.4 to af4d1a6

Posted by da...@apache.org.
renamed $leftgw to $leftnexthop to make clear what it does

(cherry picked from commit 8b2563a216b012ab1905e65f446c8b6b1435b983)


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/72aa05ab
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/72aa05ab
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/72aa05ab

Branch: refs/heads/4.4
Commit: 72aa05ab8e75c10cbde4edbcdda49bdd3770b630
Parents: 2df7eb5
Author: Remi Bergsma <rb...@schubergphilis.com>
Authored: Mon Dec 8 18:54:27 2014 +0100
Committer: Daan Hoogland <da...@onecht.net>
Committed: Tue Dec 9 10:50:17 2014 +0100

----------------------------------------------------------------------
 systemvm/patches/debian/config/opt/cloud/bin/ipsectunnel.sh | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/72aa05ab/systemvm/patches/debian/config/opt/cloud/bin/ipsectunnel.sh
----------------------------------------------------------------------
diff --git a/systemvm/patches/debian/config/opt/cloud/bin/ipsectunnel.sh b/systemvm/patches/debian/config/opt/cloud/bin/ipsectunnel.sh
index 9aa3f89..cfee6d1 100755
--- a/systemvm/patches/debian/config/opt/cloud/bin/ipsectunnel.sh
+++ b/systemvm/patches/debian/config/opt/cloud/bin/ipsectunnel.sh
@@ -23,7 +23,7 @@ vpnoutmark="0x525"
 vpninmark="0x524"
 
 usage() {
-    printf "Usage: %s: (-A|-D) -l <left-side vpn peer> -n <left-side guest cidr> -g <left-side gateway> -r <right-side vpn peer> -N <right-side private subnets> -e <esp policy> -i <ike policy> -t <ike lifetime> -T <esp lifetime> -s <pre-shared secret> -d <dpd 0 or 1> [ -p <passive or not> ]\n" $(basename $0) >&2
+    printf "Usage: %s: (-A|-D) -l <left-side vpn peer> -n <left-side guest cidr> -g <left-side next hop> -r <right-side vpn peer> -N <right-side private subnets> -e <esp policy> -i <ike policy> -t <ike lifetime> -T <esp lifetime> -s <pre-shared secret> -d <dpd 0 or 1> [ -p <passive or not> ]\n" $(basename $0) >&2
 }
 
 #set -x
@@ -129,7 +129,7 @@ ipsec_tunnel_add() {
   local vpnsecretsfile=$vpnconfdir/ipsec.vpn-$rightpeer.secrets
 
   logger -t cloud "$(basename $0): creating configuration for ipsec tunnel: left peer=$leftpeer \
-    left net=$leftnet left gateway=$leftgw right peer=$rightpeer right network=$rightnets phase1 policy=$ikepolicy \
+    left net=$leftnet left gateway=$leftnexthop right peer=$rightpeer right network=$rightnets phase1 policy=$ikepolicy \
     phase2 policy=$esppolicy secret=$secret"
 
   [ "$op" == "-A" ] && ipsec_tunnel_del
@@ -139,7 +139,7 @@ ipsec_tunnel_add() {
     sudo echo "conn vpn-$rightpeer" > $vpnconffile &&
     sudo echo "  left=$leftpeer" >> $vpnconffile &&
     sudo echo "  leftsubnet=$leftnet" >> $vpnconffile &&
-    sudo echo "  leftnexthop=$leftgw" >> $vpnconffile &&
+    sudo echo "  leftnexthop=$leftnexthop" >> $vpnconffile &&
     sudo echo "  right=$rightpeer" >> $vpnconffile &&
     sudo echo "  rightsubnets={$rightnets}" >> $vpnconffile &&
     sudo echo "  type=tunnel" >> $vpnconffile &&
@@ -226,7 +226,7 @@ do
         leftnet="$OPTARG"
         ;;
   g)    gflag=1
-        leftgw="$OPTARG"
+        leftnexthop="$OPTARG"
         ;;
   r)    rflag=1
         rightpeer="$OPTARG"


[3/3] git commit: updated refs/heads/4.4 to af4d1a6

Posted by da...@apache.org.
starting the tunnel will make it keep trying until it connects

Changed 'auto=add' to 'auto=start' to make sure the tunnel starts.
When both sides are there they will connect. This resolves the
issue that there is only a small time frame in which the VPN
would connect.

(cherry picked from commit b95addd3efb45f61b129584ade49bad7bbaa16f8)


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/af4d1a63
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/af4d1a63
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/af4d1a63

Branch: refs/heads/4.4
Commit: af4d1a635f51b8fecf055cb61e62c8f558c69375
Parents: 72aa05a
Author: Remi Bergsma <rb...@schubergphilis.com>
Authored: Mon Dec 8 18:55:35 2014 +0100
Committer: Daan Hoogland <da...@onecht.net>
Committed: Tue Dec 9 10:50:31 2014 +0100

----------------------------------------------------------------------
 systemvm/patches/debian/config/opt/cloud/bin/ipsectunnel.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/af4d1a63/systemvm/patches/debian/config/opt/cloud/bin/ipsectunnel.sh
----------------------------------------------------------------------
diff --git a/systemvm/patches/debian/config/opt/cloud/bin/ipsectunnel.sh b/systemvm/patches/debian/config/opt/cloud/bin/ipsectunnel.sh
index cfee6d1..d30a9ca 100755
--- a/systemvm/patches/debian/config/opt/cloud/bin/ipsectunnel.sh
+++ b/systemvm/patches/debian/config/opt/cloud/bin/ipsectunnel.sh
@@ -151,7 +151,7 @@ ipsec_tunnel_add() {
     sudo echo "  salifetime=${esplifetime}s" >> $vpnconffile &&
     sudo echo "  pfs=$pfs" >> $vpnconffile &&
     sudo echo "  keyingtries=2" >> $vpnconffile &&
-    sudo echo "  auto=add" >> $vpnconffile &&
+    sudo echo "  auto=start" >> $vpnconffile &&
     sudo echo "$leftpeer $rightpeer: PSK \"$secret\"" > $vpnsecretsfile &&
     sudo chmod 0400 $vpnsecretsfile