JoaoJandre commented on code in PR #14499:
URL: https://github.com/apache/cloudstack/pull/14499#discussion_r4393102348
##########
engine/schema/src/main/resources/META-INF/db/schema-42300to2400.sql:
##########
@@ -239,3 +239,5 @@ 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;
+
+ALTER TABLE `cloud`.`disk_offering` ADD COLUMN `error_policy` VARCHAR(16)
DEFAULT 'report' COMMENT 'disk error policy (report/stop/ignore/enospace) used
by KVM hypervisor';
Review Comment:
We should use the `IDEMPOTENT_ADD_COLUMN` procedure here
##########
api/src/main/java/com/cloud/offering/DiskOffering.java:
##########
@@ -51,6 +51,21 @@ public String toString() {
}
};
+ enum DiskErrorPolicy {
+ REPORT("report"), STOP("stop"), IGNORE("ignore"), ENOSPACE("enospace");
+
+ private final String _diskErrorPolicy;
Review Comment:
I hate to be that guy, but could we avoid using underscore for
attribute/variable names?
##########
plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/LibvirtVMDef.java:
##########
@@ -926,6 +926,20 @@ public String toString() {
}
}
+ public enum DiskErrorPolicy {
Review Comment:
Since this is just a copy of the other enum, could we move this somewhere in
common and deduplicate this?
##########
server/src/main/java/com/cloud/configuration/ConfigurationManagerImpl.java:
##########
@@ -9412,6 +9457,15 @@ protected void validateCacheMode(String cacheMode){
}
}
+ protected void validateErrorPolicy(String errorPolicy){
+ if(errorPolicy != null &&
Review Comment:
```suggestion
if (errorPolicy != null &&
```
##########
plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/LibvirtVMDef.java:
##########
@@ -926,6 +926,20 @@ public String toString() {
}
}
+ public enum DiskErrorPolicy {
+ REPORT("report"), STOP("stop"), IGNORE("ignore"),
ENOSPACE("enospace");
+ String _diskErrorPolicy;
Review Comment:
same here about the underscore
--
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]