sureshanaparti commented on code in PR #13907:
URL: https://github.com/apache/cloudstack/pull/13907#discussion_r3894072271
##########
engine/schema/src/main/resources/META-INF/db/schema-42210to42300.sql:
##########
@@ -651,3 +651,91 @@ WHERE `name`='user.vm.readonly.details' AND `value` IS NOT
NULL;
-- usage records introduced in 4.22.1 (cumulative and per-VM) can coexist. See
#13399.
CALL `cloud_usage`.`IDEMPOTENT_DROP_INDEX`('id', 'cloud_usage.usage_volume');
CALL `cloud_usage`.`IDEMPOTENT_ADD_UNIQUE_INDEX`('cloud_usage.usage_volume',
'id', '(volume_id ASC, created ASC, vm_id ASC)');
+
+-- InstanceBootGroup: ordered boot sequencing for VMs and InstanceGroups
+CREATE TABLE IF NOT EXISTS `cloud`.`instance_boot_group` (
+ `id` bigint unsigned NOT NULL UNIQUE AUTO_INCREMENT,
+ `uuid` varchar(40) NOT NULL,
+ `name` varchar(255) NOT NULL,
+ `description` varchar(4096) DEFAULT NULL,
+ `account_id` bigint unsigned NOT NULL COMMENT 'owner; foreign key to
account table',
+ `domain_id` bigint unsigned NOT NULL,
+ `created` datetime NOT NULL,
+ `removed` datetime DEFAULT NULL COMMENT 'date the group was
soft-deleted',
+ PRIMARY KEY (`id`),
+ CONSTRAINT `uc_instance_boot_group__uuid` UNIQUE (`uuid`),
+ CONSTRAINT `fk_instance_boot_group__account_id` FOREIGN KEY (`account_id`)
REFERENCES `account` (`id`),
+ CONSTRAINT `fk_instance_boot_group__domain_id` FOREIGN KEY (`domain_id`)
REFERENCES `domain` (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
+
+CREATE TABLE IF NOT EXISTS `cloud`.`instance_boot_group_member` (
+ `id` bigint unsigned NOT NULL AUTO_INCREMENT,
+ `uuid` varchar(40) NOT NULL,
+ `boot_group_id` bigint unsigned NOT NULL,
+ `member_type` varchar(32) NOT NULL COMMENT 'VirtualMachine or
InstanceGroup',
+ `member_id` bigint unsigned NOT NULL,
+ `order` int NOT NULL DEFAULT 0,
+ `created` datetime NOT NULL,
+ PRIMARY KEY (`id`),
+ CONSTRAINT `uc_instance_boot_group_member__uuid` UNIQUE (`uuid`),
+ CONSTRAINT `uq_instance_boot_group_member__member` UNIQUE (`member_type`,
`member_id`),
+ CONSTRAINT `fk_instance_boot_group_member__group_id` FOREIGN KEY
(`boot_group_id`) REFERENCES `instance_boot_group` (`id`) ON DELETE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
+
+-- InstanceBootGroupReadinessRule: a readiness rule always belongs to exactly
one boot group and
+-- references either a VirtualMachine or InstanceGroup item within it
+CREATE TABLE IF NOT EXISTS `cloud`.`instance_boot_group_readiness_rule` (
+ `id` bigint unsigned NOT NULL UNIQUE AUTO_INCREMENT,
+ `uuid` varchar(40) NOT NULL,
+ `name` varchar(255) NOT NULL,
+ `boot_group_id` bigint unsigned NOT NULL,
+ `item_type` varchar(32) NOT NULL COMMENT 'VirtualMachine or
InstanceGroup',
+ `item_id` bigint unsigned NOT NULL,
+ `rule_type` varchar(64) NOT NULL,
+ `enabled` tinyint(1) NOT NULL DEFAULT 1,
+ `created` datetime NOT NULL,
+ `removed` datetime DEFAULT NULL COMMENT 'date the rule was
soft-deleted',
+ PRIMARY KEY (`id`),
+ CONSTRAINT `uc_instance_boot_group_readiness_rule__uuid` UNIQUE
(`uuid`),
+ CONSTRAINT `fk_instance_boot_group_readiness_rule__group_id` FOREIGN KEY
(`boot_group_id`) REFERENCES `instance_boot_group` (`id`) ON DELETE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
+
Review Comment:
@shwstppr Are the rules tagged to boot_group_id always? Can there be any
global rules (with one entry on the db) like ping, port 22 check, etc and can
be set for the multiple VirtualMachines or InstanceGroups?
--
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]