weizhouapache commented on a change in pull request #5848:
URL: https://github.com/apache/cloudstack/pull/5848#discussion_r839390013
##########
File path: engine/schema/src/main/resources/META-INF/db/schema-41610to41700.sql
##########
@@ -356,6 +371,7 @@ CREATE VIEW `cloud`.`volume_view` AS
left join
`cloud`.`domain` resource_tag_domain ON resource_tag_domain.id =
resource_tags.domain_id;
+
Review comment:
changes on line 374 and line 646 are not needed
##########
File path: engine/schema/src/main/resources/META-INF/db/schema-41610to41700.sql
##########
@@ -220,6 +220,19 @@ CREATE VIEW `cloud`.`service_offering_view` AS
GROUP BY
`service_offering`.`id`;
+
+DELIMITER //
+CREATE PROCEDURE create_external_uuid_in_volumes()
+ BEGIN
+ SELECT count(*) INTO @count FROM INFORMATION_SCHEMA.COLUMNS WHERE
table_name = 'volumes' AND table_schema='cloud' AND column_name =
'external_uuid';
+ IF @count < 1 THEN ALTER TABLE cloud.volumes ADD COLUMN external_uuid
VARCHAR(40) DEFAULT null;
+ END IF;
+ END //
+DELIMITER ;
+CALL create_external_uuid_in_volumes;
+DROP PROCEDURE create_external_uuid_in_volumes;
Review comment:
@DK101010
since 4.17 is not released yet, you just need to add line
```
ALTER TABLE `cloud`.`volumes` ADD COLUMN `external_uuid` VARCHAR(40) DEFAULT
NULL COMMENT 'UUID of the xxxxxx';
```
##########
File path: server/src/main/java/com/cloud/storage/VolumeApiServiceImpl.java
##########
@@ -3819,6 +3819,12 @@ private VolumeVO sendAttachVolumeCommand(UserVmVO vm,
VolumeVO volumeToAttach, L
_volsDao.update(volumeToAttach.getId(),
volumeToAttach);
}
+ if(answer.getContextParam("vdiskUuid") != null){
Review comment:
```suggestion
if (answer.getContextParam("vdiskUuid") != null) {
```
--
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]