From 890e71cb5c2f80b09cd4db7947d94e325d7bd182 Mon Sep 17 00:00:00 2001 From: ynojima Date: Tue, 1 Jul 2014 13:55:41 -0600 Subject: [PATCH] CLOUDSTACK-7032 bugfix: listVolumes throws an error Since schema change made on 4.4 is not applied to the upgrade script from 4.4 to 4.5, listVolumes api throws an error. This commit fix the issue. --- setup/db/db/schema-440to450.sql | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/setup/db/db/schema-440to450.sql b/setup/db/db/schema-440to450.sql index 77445a9d5e1..c88a18afa30 100644 --- a/setup/db/db/schema-440to450.sql +++ b/setup/db/db/schema-440to450.sql @@ -178,6 +178,12 @@ CREATE VIEW `cloud`.`volume_view` AS vm_template.uuid template_uuid, vm_template.extractable, vm_template.type template_type, + vm_template.name template_name, + vm_template.display_text template_display_text, + iso.id iso_id, + iso.uuid iso_uuid, + iso.name iso_name, + iso.display_text iso_display_text, resource_tags.id tag_id, resource_tags.uuid tag_uuid, resource_tags.key tag_key, @@ -215,7 +221,9 @@ CREATE VIEW `cloud`.`volume_view` AS left join `cloud`.`cluster` ON storage_pool.cluster_id = cluster.id left join - `cloud`.`vm_template` ON volumes.template_id = vm_template.id OR volumes.iso_id = vm_template.id + `cloud`.`vm_template` ON volumes.template_id = vm_template.id + left join + `cloud`.`vm_template` iso ON iso.id = volumes.iso_id left join `cloud`.`resource_tags` ON resource_tags.resource_id = volumes.id and resource_tags.resource_type = 'Volume'