You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ra...@apache.org on 2014/01/03 13:02:28 UTC

[1/2] git commit: updated refs/heads/master to 28fcd36

Updated Branches:
  refs/heads/master e59420c51 -> 28fcd3629


CLOUDSTACK-5658 CLOUDSTACK-5563  deploying VM from template created from volumes fails


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

Branch: refs/heads/master
Commit: cd43921fda02a391ae461095ae95893c7a2c4817
Parents: e59420c
Author: Rajesh Battala <ra...@citrix.com>
Authored: Fri Jan 3 15:32:06 2014 +0530
Committer: Rajesh Battala <ra...@citrix.com>
Committed: Fri Jan 3 17:25:54 2014 +0530

----------------------------------------------------------------------
 .../HypervResource/CloudStackTypes.cs           |  4 ++-
 .../HypervResource/HypervResourceController.cs  | 36 ++++++++++++++++----
 2 files changed, 33 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cd43921f/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/CloudStackTypes.cs
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/CloudStackTypes.cs b/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/CloudStackTypes.cs
index 020f761..314c26b 100644
--- a/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/CloudStackTypes.cs
+++ b/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/CloudStackTypes.cs
@@ -346,6 +346,7 @@ namespace HypervResource
         public PrimaryDataStoreTO primaryDataStore = null;
         public string path;
         public string checksum;
+        public string size;
 
         public static TemplateObjectTO ParseJson(dynamic json)
         {
@@ -360,7 +361,8 @@ namespace HypervResource
                     name = (string)templateObjectTOJson.name,
                     uuid = (string)templateObjectTOJson.uuid,
                     path = (string)templateObjectTOJson.path,
-                    checksum = (string)templateObjectTOJson.checksum
+                    checksum = (string)templateObjectTOJson.checksum,
+                    size = (string)templateObjectTOJson.size
                 };
                 result.s3DataStoreTO = S3TO.ParseJson(templateObjectTOJson.imageDataStore);
                 result.nfsDataStoreTO = NFSTO.ParseJson(templateObjectTOJson.imageDataStore);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cd43921f/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/HypervResourceController.cs
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/HypervResourceController.cs b/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/HypervResourceController.cs
index 54adc7a..1725169 100644
--- a/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/HypervResourceController.cs
+++ b/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/HypervResourceController.cs
@@ -1319,15 +1319,17 @@ namespace HypervResource
                 bool result = false;
                 string details = null;
                 object newData = null;
+                TemplateObjectTO destTemplateObjectTO = null;
+                VolumeObjectTO destVolumeObjectTO = null;
 
                 try
                 {
                     dynamic timeout = cmd.wait;  // TODO: Useful?
 
                     TemplateObjectTO srcTemplateObjectTO = TemplateObjectTO.ParseJson(cmd.srcTO);
-                    TemplateObjectTO destTemplateObjectTO = TemplateObjectTO.ParseJson(cmd.destTO);
+                    destTemplateObjectTO = TemplateObjectTO.ParseJson(cmd.destTO);
                     VolumeObjectTO srcVolumeObjectTO = VolumeObjectTO.ParseJson(cmd.srcTO);
-                    VolumeObjectTO destVolumeObjectTO = VolumeObjectTO.ParseJson(cmd.destTO);
+                    destVolumeObjectTO = VolumeObjectTO.ParseJson(cmd.destTO);
 
                     string destFile = null;
                     if (destTemplateObjectTO != null)
@@ -1469,7 +1471,16 @@ namespace HypervResource
                             {
                                 // TODO: thin provision instead of copying the full file.
                                 File.Copy(srcFile, destFile);
-                                newData = cmd.destTO;
+                                VolumeObjectTO volume = new VolumeObjectTO();
+                                volume.path = destFile;
+                                volume.dataStore = destVolumeObjectTO.dataStore;
+                                volume.name = destVolumeObjectTO.name;
+                                volume.size = ulong.Parse(destVolumeObjectTO.size.ToString());
+                                volume.format = destVolumeObjectTO.format;
+                                volume.nfsDataStore = destVolumeObjectTO.nfsDataStore;
+                                volume.primaryDataStore = destVolumeObjectTO.primaryDataStore;
+                                JObject ansObj = Utils.CreateCloudStackObject(CloudStackTypes.VolumeObjectTO, volume);
+                                newData = ansObj;
                                 result = true;
                             }
                         }
@@ -1501,7 +1512,12 @@ namespace HypervResource
                                 // doesn't do anything if the directory is already present.
                                 Directory.CreateDirectory(Path.GetDirectoryName(destFile));
                                 File.Copy(srcFile, destFile);
-                                newData = cmd.destTO;
+                                // create volumeto object deserialize and send it 
+                                VolumeObjectTO volume = new VolumeObjectTO();
+                                volume.path = destFile;
+                                volume.size = ulong.Parse(destVolumeObjectTO.size.ToString());
+                                JObject ansObj = Utils.CreateCloudStackObject(CloudStackTypes.VolumeObjectTO, volume);
+                                newData = ansObj;
                                 result = true;
                             }
                         }
@@ -1533,7 +1549,15 @@ namespace HypervResource
                                 // doesn't do anything if the directory is already present.
                                 Directory.CreateDirectory(Path.GetDirectoryName(destFile));
                                 File.Copy(srcFile, destFile);
-                                newData = cmd.destTO;
+                                TemplateObjectTO destTemplateObject = new TemplateObjectTO();
+                                destTemplateObject.size = srcVolumeObjectTO.size.ToString();
+                                destTemplateObject.format = srcVolumeObjectTO.format;
+                                destTemplateObject.path = destFile;
+                                destTemplateObject.nfsDataStoreTO = destTemplateObjectTO.nfsDataStoreTO;
+                                destTemplateObject.checksum = destTemplateObjectTO.checksum;
+                                newData = destTemplateObject;
+                                JObject ansObj = Utils.CreateCloudStackObject(CloudStackTypes.TemplateObjectTO, destTemplateObject);
+                                newData = ansObj;
                                 result = true;
                             }
                         }
@@ -1554,7 +1578,7 @@ namespace HypervResource
                 {
                     result = result,
                     details = details,
-                    newData = cmd.destTO,
+                    newData = newData,
                     contextMap = contextMap
                 };
                 return ReturnCloudStackTypedJArray(ansContent, CloudStackTypes.CopyCmdAnswer);


[2/2] git commit: updated refs/heads/master to 28fcd36

Posted by ra...@apache.org.
CLOUDSTACK-5608: HyperV Builtin and System vm template entries missing/need to update in 4.3 upgrade setup


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

Branch: refs/heads/master
Commit: 28fcd362907f80505860b72cef523b1d19fdda1f
Parents: cd43921
Author: Harikrishna Patnala <ha...@citrix.com>
Authored: Mon Dec 23 16:30:42 2013 +0530
Committer: Rajesh Battala <ra...@citrix.com>
Committed: Fri Jan 3 17:29:46 2014 +0530

----------------------------------------------------------------------
 setup/db/db/schema-421to430.sql | 17 +++++++++++++++++
 setup/db/templates.sql          |  4 ++--
 2 files changed, 19 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/28fcd362/setup/db/db/schema-421to430.sql
----------------------------------------------------------------------
diff --git a/setup/db/db/schema-421to430.sql b/setup/db/db/schema-421to430.sql
index 296eb1e..b7b1b2b 100644
--- a/setup/db/db/schema-421to430.sql
+++ b/setup/db/db/schema-421to430.sql
@@ -857,6 +857,23 @@ INSERT IGNORE INTO `cloud`.`configuration` VALUES ('Hidden', 'DEFAULT', 'managem
 INSERT IGNORE INTO `cloud`.`configuration` VALUES ('Hidden', 'DEFAULT', 'management-server', 'hyperv.private.network.device', null, 'Specify the virtual switch on host for private network', NULL, NULL, NULL, 0);
 INSERT IGNORE INTO `cloud`.`configuration` VALUES ('Hidden', 'DEFAULT', 'management-server', 'hyperv.public.network.device', null, 'Specify the public virtual switch on host for public network', NULL, NULL, NULL, 0);
 
+DELETE FROM `cloud`.`configuration` WHERE `name` IN ("xen.update.url", "update.check.interval", "baremetal_dhcp_devices", "host.updates.enable");
+
+INSERT IGNORE INTO `cloud`.`configuration` VALUES ("Advanced", 'DEFAULT', 'VMSnapshotManager', "vmsnapshot.create.wait", "1800", "In second, timeout for create vm snapshot", NULL, NULL,NULL,0);
+INSERT IGNORE INTO `cloud`.`configuration` VALUES ("Advanced", 'DEFAULT', 'VMSnapshotManager', "vmsnapshot.max", "10", "Maximum vm snapshots for a vm", NULL, NULL,NULL,0);
+
+INSERT IGNORE INTO `cloud`.`vm_template` (id, uuid, unique_name, name, public, created, type, hvm, bits, account_id, url, checksum, enable_password, display_text, format, guest_os_id, featured, cross_zones, hypervisor_type, state)
+    VALUES (9, UUID(), 'routing-9', 'SystemVM Template (HyperV)', 0, now(), 'SYSTEM', 0, 64, 1, 'http://download.cloud.com/templates/4.3/systemvm64template-2013-12-23-hyperv.vhd.bz2', '5df45ee6ebe1b703a8805f4e1f4d0818', 0, 'SystemVM Template (HyperV)', 'VHD', 15, 0, 1, 'Hyperv', 'Active' );
+
+UPDATE `cloud`.`vm_template` SET `bits` = "64", `url` = "http://download.cloud.com/templates/4.3/systemvm64template-2013-12-23-hyperv.vhd.bz2", `state` = "Active", `checksum` = "5df45ee6ebe1b703a8805f4e1f4d0818" WHERE `id` = "9";
+
+INSERT IGNORE INTO `cloud`.`vm_template` (id, uuid, unique_name, name, public, created, type, hvm, bits, account_id, url, checksum, enable_password, display_text,  format, guest_os_id, featured, cross_zones, hypervisor_type, extractable, state)
+    VALUES (6, UUID(), 'centos64-x64', 'CentOS 6.4(64-bit) GUI (Hyperv)', 1, now(), 'BUILTIN', 0, 64, 1, 'http://download.cloud.com/releases/4.3/centos6_4_64bit.vhd.bz2', 'eef6b9940ea3ed01221d963d4a012d0a', 0, 'CentOS 6.4 (64-bit) GUI (Hyperv)', 'VHD', 182, 1, 1, 'Hyperv', 1, 'Active');
+
+UPDATE `cloud`.`configuration` SET `component` = 'VMSnapshotManager' WHERE `name` IN ("vmsnapshot.create.wait", "vmsnapshot.max");
+
+ALTER TABLE `cloud`.`external_load_balancer_devices` ADD COLUMN `is_exclusive_gslb_provider` int(1) unsigned NOT NULL DEFAULT 0 COMMENT '1 if load balancer appliance is acting exclusively as gslb service provider in the zone and can not be used for LB';
+
 CREATE TABLE `cloud`.`s2s_customer_gateway_details` (
   `id` bigint unsigned NOT NULL auto_increment,
   `s2s_customer_gateway_id` bigint unsigned NOT NULL COMMENT 'VPC gateway id',

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/28fcd362/setup/db/templates.sql
----------------------------------------------------------------------
diff --git a/setup/db/templates.sql b/setup/db/templates.sql
index 0f7958f..92eab1f 100755
--- a/setup/db/templates.sql
+++ b/setup/db/templates.sql
@@ -37,10 +37,10 @@ INSERT INTO `cloud`.`vm_template` (id, uuid, unique_name, name, public, created,
     VALUES (8, UUID(), 'routing-8', 'SystemVM Template (vSphere)', 0, now(), 'SYSTEM', 0, 32, 1, 'http://download.cloud.com/templates/4.2/systemvmtemplate-4.2-vh7.ova', '8fde62b1089e5844a9cd3b9b953f9596', 0, 'SystemVM Template (vSphere)', 'OVA', 15, 0, 1, 'VMware' );
 
 INSERT INTO `cloud`.`vm_template` (id, uuid, unique_name, name, public, created, type, hvm, bits, account_id, url, checksum, enable_password, display_text, format, guest_os_id, featured, cross_zones, hypervisor_type)
-    VALUES (9, UUID(), 'routing-9', 'SystemVM Template (HyperV)', 0, now(), 'SYSTEM', 0, 64, 1, 'http://download.cloud.com/templates/4.3/systemvm64template-2013-12-04-hyperv.vhd.bz2', 'fb1b6e032a160d86f2c28feb5add6d83', 0, 'SystemVM Template (HyperV)', 'VHD', 15, 0, 1, 'Hyperv' );
+    VALUES (9, UUID(), 'routing-9', 'SystemVM Template (HyperV)', 0, now(), 'SYSTEM', 0, 64, 1, 'http://download.cloud.com/templates/4.3/systemvm64template-2013-12-23-hyperv.vhd.bz2', '5df45ee6ebe1b703a8805f4e1f4d0818', 0, 'SystemVM Template (HyperV)', 'VHD', 15, 0, 1, 'Hyperv' );
 
 INSERT INTO `cloud`.`vm_template` (id, uuid, unique_name, name, public, created, type, hvm, bits, account_id, url, checksum, enable_password, display_text,  format, guest_os_id, featured, cross_zones, hypervisor_type, extractable)
-    VALUES (6, UUID(), 'centos64-x64', 'CentOS 6.4(64-bit) no GUI (Hyperv)', 1, now(), 'BUILTIN', 0, 64, 1, 'http://download.cloud.com/releases/4.3/centos6_4_64bit.vhd.bz2', '89d124c4e7c93b88638b2a0e286c54f2', 0, 'CentOS 6.4 (64-bit) no GUI (Hyperv)', 'VHD', 182, 1, 1, 'Hyperv', 1);
+    VALUES (6, UUID(), 'centos64-x64', 'CentOS 6.4(64-bit) GUI (Hyperv)', 1, now(), 'BUILTIN', 0, 64, 1, 'http://download.cloud.com/releases/4.3/centos6_4_64bit.vhd.bz2', 'eef6b9940ea3ed01221d963d4a012d0a', 0, 'CentOS 6.4 (64-bit) GUI (Hyperv)', 'VHD', 182, 1, 1, 'Hyperv', 1);
 
 INSERT INTO `cloud`.`guest_os_category` (id, uuid, name) VALUES (1, UUID(), 'CentOS');
 INSERT INTO `cloud`.`guest_os_category` (id, uuid, name) VALUES (2, UUID(), 'Debian');