RosiKyu commented on code in PR #14192:
URL: https://github.com/apache/cloudstack/pull/14192#discussion_r4679968204
##########
engine/schema/src/main/resources/META-INF/db/schema-42300to2400.sql:
##########
@@ -239,3 +239,25 @@ CREATE TABLE IF NOT EXISTS
`cloud`.`instance_boot_group_details` (
PRIMARY KEY (`id`),
CONSTRAINT `fk_instance_boot_group_details__group_id` FOREIGN KEY
(`boot_group_id`) REFERENCES `instance_boot_group` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
+
+-- Re-tag NetApp ONTAP iSCSI storage pools to the dedicated 'OntapiSCSI' pool
type.
+UPDATE `cloud`.`storage_pool`
+SET `pool_type` = 'OntapiSCSI'
+WHERE `storage_provider_name` = 'NetApp ONTAP'
+ AND `pool_type` = 'Iscsi';
+
+-- The denormalized copy on every volume that lives on such a pool.
+UPDATE `cloud`.`volumes` v
+ JOIN `cloud`.`storage_pool` sp ON sp.`id` = v.`pool_id`
+ SET v.`pool_type` = 'OntapiSCSI'
+WHERE sp.`storage_provider_name` = 'NetApp ONTAP'
+ AND sp.`pool_type` IN ('Iscsi', 'OntapiSCSI')
+ AND v.`pool_type` = 'Iscsi';
+
+-- Volume format realignment.
+UPDATE `cloud`.`volumes` v
+ JOIN `cloud`.`storage_pool` sp ON sp.`id` = v.`pool_id`
+ SET v.`format` = 'RAW'
+WHERE sp.`storage_provider_name` = 'NetApp ONTAP'
+ AND sp.`pool_type` IN ('Iscsi', 'OntapiSCSI')
+ AND (v.`format` IS NULL OR v.`format` <> 'RAW');
Review Comment:
Answered by the author above, and the upgrade rows were checked by
Damans227; the upgrade only changes NetApp ONTAP pools and their volumes.
Resolving.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]