From a11f7110622d1161ad1e363d73a6a40d6fd9c2de Mon Sep 17 00:00:00 2001 From: Rohit Yadav Date: Fri, 19 Feb 2016 13:50:37 +0100 Subject: [PATCH 1/3] systemvm: set default umask 022 in injectkeys.sh The default umask of 0022 is set in Ubuntu and other packages. Set the same in case of CentOS startup scripts. Use umask 022 in the injectkeys.sh script Signed-off-by: Rohit Yadav --- packaging/centos63/cloud-management.rc | 1 + packaging/centos7/cloud-management.service | 1 + scripts/vm/systemvm/injectkeys.sh | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/packaging/centos63/cloud-management.rc b/packaging/centos63/cloud-management.rc index f5ed7a8048a..5b6ba4faa46 100755 --- a/packaging/centos63/cloud-management.rc +++ b/packaging/centos63/cloud-management.rc @@ -87,6 +87,7 @@ handle_pid_file() { } start() { + umask 0022 readpath=$(readlink -f $0) source `dirname $readpath`/tomcat.sh } diff --git a/packaging/centos7/cloud-management.service b/packaging/centos7/cloud-management.service index 19989ece180..db52dcf1ba1 100644 --- a/packaging/centos7/cloud-management.service +++ b/packaging/centos7/cloud-management.service @@ -24,6 +24,7 @@ Description=CloudStack Management Server After=syslog.target network.target [Service] +UMask=0022 Type=simple EnvironmentFile=/etc/tomcat/tomcat.conf Environment="NAME=cloudstack-management" diff --git a/scripts/vm/systemvm/injectkeys.sh b/scripts/vm/systemvm/injectkeys.sh index 6f224cdddcf..863ca6a4a30 100755 --- a/scripts/vm/systemvm/injectkeys.sh +++ b/scripts/vm/systemvm/injectkeys.sh @@ -27,7 +27,7 @@ set -e TMP=/tmp MOUNTPATH=${HOME}/systemvm_mnt TMPDIR=${TMP}/cloud/systemvm - +umask 022 clean_up() { $SUDO umount $MOUNTPATH From 53de78f64230cc688f32aa072bdb6359fb77714d Mon Sep 17 00:00:00 2001 From: Remi Bergsma Date: Fri, 5 Feb 2016 16:58:01 +0100 Subject: [PATCH 2/3] Check the existence of 'forceencap' parameter before use --- systemvm/patches/debian/config/opt/cloud/bin/configure.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/systemvm/patches/debian/config/opt/cloud/bin/configure.py b/systemvm/patches/debian/config/opt/cloud/bin/configure.py index ab134fcfca7..fd37f40346e 100755 --- a/systemvm/patches/debian/config/opt/cloud/bin/configure.py +++ b/systemvm/patches/debian/config/opt/cloud/bin/configure.py @@ -531,6 +531,8 @@ class CsSite2SiteVpn(CsDataBag): file.addeq(" pfs=%s" % CsHelper.bool_to_yn(obj['dpd'])) file.addeq(" keyingtries=2") file.addeq(" auto=start") + if 'encap' not in obj: + obj['encap']=False file.addeq(" forceencaps=%s" % CsHelper.bool_to_yn(obj['encap'])) if obj['dpd']: file.addeq(" dpddelay=30") From cfd2ce71edbab431412f48b14011c8a137df1d22 Mon Sep 17 00:00:00 2001 From: Patrick Dube Date: Wed, 20 Apr 2016 16:16:32 -0400 Subject: [PATCH 3/3] CLOUDSTACK-9172 Added cross zones check to delete template and iso --- ui/scripts/templates.js | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/ui/scripts/templates.js b/ui/scripts/templates.js index c8c5b89df25..fb01334b98e 100644 --- a/ui/scripts/templates.js +++ b/ui/scripts/templates.js @@ -1451,8 +1451,12 @@ } }, action: function(args) { + var queryParams = "deleteTemplate&id=" + args.context.templates[0].id; + if (!args.context.templates[0].crossZones){ + queryParams += "&zoneid=" + args.context.zones[0].zoneid; + } $.ajax({ - url: createURL("deleteTemplate&id=" + args.context.templates[0].id + "&zoneid=" + args.context.zones[0].zoneid), + url: createURL(queryParams), dataType: "json", async: true, success: function(json) { @@ -2536,12 +2540,12 @@ } }, action: function(args) { - var array1 = []; - if (args.context.zones[0].zoneid != null) - array1.push("&zoneid=" + args.context.zones[0].zoneid); - + var queryParams = "deleteIso&id=" + args.context.isos[0].id; + if (!args.context.isos[0].crossZones){ + queryParams += "&zoneid=" + args.context.zones[0].zoneid; + } $.ajax({ - url: createURL("deleteIso&id=" + args.context.isos[0].id + "&zoneid=" + args.context.zones[0].zoneid), + url: createURL(queryParams), dataType: "json", async: true, success: function(json) {