cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aprat...@apache.org
Subject git commit: updated refs/heads/master to 469d9eb
Date Fri, 10 Jul 2015 01:56:11 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/master b0136c56e -> 469d9ebed


CLOUDSTACK-8624: Added the support for mysql db port and lowered the requiremnts for available
disk capacity to 2.1GB VS original 5GB as it was too excessive.


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

Branch: refs/heads/master
Commit: 469d9ebed43b3914264d2736f39abfe20b70f65b
Parents: b0136c5
Author: Ilya Musayev <ilya@apache.org>
Authored: Fri Jul 10 06:57:53 2015 +0530
Committer: Abhinandan Prateek <abhinandan.prateek@shapeblue.com>
Committed: Fri Jul 10 07:24:41 2015 +0530

----------------------------------------------------------------------
 .../storage/secondary/cloud-install-sys-tmplt   | 25 +++++++++++++-------
 1 file changed, 16 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/469d9ebe/scripts/storage/secondary/cloud-install-sys-tmplt
----------------------------------------------------------------------
diff --git a/scripts/storage/secondary/cloud-install-sys-tmplt b/scripts/storage/secondary/cloud-install-sys-tmplt
index fe700d3..68409dd 100755
--- a/scripts/storage/secondary/cloud-install-sys-tmplt
+++ b/scripts/storage/secondary/cloud-install-sys-tmplt
@@ -20,7 +20,7 @@
 
 
 usage() {
-  printf "Usage: %s: -m <secondary storage mount point> -f <system vm template file>
[-h <hypervisor name: kvm|vmware|xenserver|hyperv|ovm3> ] [ -s <mgmt server secret
key, if you specified any when running cloudstack-setup-database, default is password>][-u
<Url to system vm template>] [-F <clean up system templates of specified hypervisor>]
[-e <Template suffix, e.g vhd, ova, qcow2>] [-o <Database server hostname or ip,
e.g localhost>] [-r <Database user name, e.g root>] [-d <Database password. Fllowed
by nothing if the password is empty>]\n" $(basename $0) >&2
+  printf "Usage: %s: -m <secondary storage mount point> -f <system vm template file>
[-h <hypervisor name: kvm|vmware|xenserver|hyperv|ovm3> ] [ -s <mgmt server secret
key, if you specified any when running cloudstack-setup-database, default is password>][-u
<Url to system vm template>] [-F <clean up system templates of specified hypervisor>]
[-e <Template suffix, e.g vhd, ova, qcow2>] [-o <Database server hostname or ip,
e.g localhost>] [-r <Database user name, e.g root>] [-p <mysql database port>]
[-d <Database password. Fllowed by nothing if the password is empty>]\n" $(basename
$0) >&2
   printf "or\n" >&2
   printf "%s: -m <secondary storage mount point> -u <http url for system vm template>
[-h <hypervisor name: kvm|vmware|xenserver|hyperv|ovm3> ] [ -s <mgmt server secret
key>]\n" $(basename $0) >&2
 }
@@ -36,12 +36,13 @@ ext="vhd"
 templateId=
 hyper=
 msKey=password
-DISKSPACE=5120000  #free disk space required in kilobytes
+DISKSPACE=2120000  #free disk space required in kilobytes
 dbHost=
 dbUser=
 dbPassword=
+dbPort=
 jasypt='/usr/share/cloudstack-common/lib/jasypt-1.9.2.jar'
-while getopts 'm:h:f:u:Ft:e:s:o:r:d:' OPTION
+while getopts 'm:h:f:u:Ft:e:s:o:r:d:p:'# OPTION
 do
   case $OPTION in
   m)	mflag=1
@@ -72,6 +73,9 @@ do
   d)    dflag=1
         dbPassword="$OPTARG"
                 ;;
+  p)    pflag=1
+        dbPort="$OPTARG"
+                ;;
   ?)	usage
 		failed 2
 		;;
@@ -102,6 +106,9 @@ then
   failed 3
 fi
 
+if [ "$pflag" != 1 ]; then
+    dbPort=$(sed '/^\#/d' /etc/cloudstack/management/db.properties | grep 'db.cloud.port'
 | tail -n 1 | cut -d "=" -f2- | sed 's/^[[:space:]]*//;s/[[:space:]]*$//')
+fi
 
 if [ "$oflag" != 1 ]; then
     dbHost=$(sed '/^\#/d' /etc/cloudstack/management/db.properties | grep 'db.cloud.host'
 | tail -n 1 | cut -d "=" -f2- | sed 's/^[[:space:]]*//;s/[[:space:]]*$//')
@@ -148,27 +155,27 @@ then
    if [ "$hyper" == "kvm" ]
    then
       ext="qcow2"
-      templateId=(`mysql -h $dbHost --user=$dbUser --password=$dbPassword --skip-column-names
-U cloud -e "select max(id) from cloud.vm_template where type = \"SYSTEM\" and hypervisor_type
= \"KVM\" and removed is null"`)
+      templateId=(`mysql -P $dbPort -h $dbHost --user=$dbUser --password=$dbPassword --skip-column-names
-U cloud -e "select max(id) from cloud.vm_template where type = \"SYSTEM\" and hypervisor_type
= \"KVM\" and removed is null"`)
    elif [ "$hyper" == "xenserver" ]
    then
       ext="vhd"
-      templateId=(`mysql -h $dbHost --user=$dbUser --password=$dbPassword --skip-column-names
-U cloud -e "select max(id) from cloud.vm_template where type = \"SYSTEM\" and hypervisor_type
= \"XenServer\" and removed is null"`)
+      templateId=(`mysql -P $dbPort -h $dbHost --user=$dbUser --password=$dbPassword --skip-column-names
-U cloud -e "select max(id) from cloud.vm_template where type = \"SYSTEM\" and hypervisor_type
= \"XenServer\" and removed is null"`)
    elif [ "$hyper" == "vmware" ]
    then
       ext="ova"
-      templateId=(`mysql -h $dbHost --user=$dbUser --password=$dbPassword --skip-column-names
-U cloud -e "select max(id) from cloud.vm_template where type = \"SYSTEM\" and hypervisor_type
= \"VMware\" and removed is null"`)
+      templateId=(`mysql -P $dbPort -h $dbHost --user=$dbUser --password=$dbPassword --skip-column-names
-U cloud -e "select max(id) from cloud.vm_template where type = \"SYSTEM\" and hypervisor_type
= \"VMware\" and removed is null"`)
    elif [ "$hyper" == "lxc" ]
    then
       ext="qcow2"
-      templateId=(`mysql -h $dbHost --user=$dbUser --password=$dbPassword --skip-column-names
-U cloud -e "select max(id) from cloud.vm_template where type = \"SYSTEM\" and hypervisor_type
= \"LXC\" and removed is null"`)
+      templateId=(`mysql -P $dbPort -h $dbHost --user=$dbUser --password=$dbPassword --skip-column-names
-U cloud -e "select max(id) from cloud.vm_template where type = \"SYSTEM\" and hypervisor_type
= \"LXC\" and removed is null"`)
    elif [ "$hyper" == "hyperv" ]
    then
       ext="vhd"
-      templateId=(`mysql -h $dbHost --user=$dbUser --password=$dbPassword --skip-column-names
-U cloud -e "select max(id) from cloud.vm_template where type = \"SYSTEM\" and hypervisor_type
= \"Hyperv\" and removed is null"`)
+      templateId=(`mysql -P $dbPort -h $dbHost --user=$dbUser --password=$dbPassword --skip-column-names
-U cloud -e "select max(id) from cloud.vm_template where type = \"SYSTEM\" and hypervisor_type
= \"Hyperv\" and removed is null"`)
    elif [ "$hyper" == "ovm3" ]
    then
       ext="raw"
-      templateId=(`mysql -h $dbHost --user=$dbUser --password=$dbPassword --skip-column-names
-U cloud -e "select max(id) from cloud.vm_template where type = \"SYSTEM\" and hypervisor_type
= \"Ovm3\" and removed is null"`)
+      templateId=(`mysql -P $dbPort -h $dbHost --user=$dbUser --password=$dbPassword --skip-column-names
-U cloud -e "select max(id) from cloud.vm_template where type = \"SYSTEM\" and hypervisor_type
= \"Ovm3\" and removed is null"`)
    else
       usage
       failed 2


Mime
View raw message