Added inline load balancer nic map table to 2.2.11 -> 2.2.12 upgrade script.

This commit is contained in:
keshav 2011-09-16 10:15:31 -07:00
parent 43810508e4
commit 0569b51764
1 changed files with 16 additions and 4 deletions

View File

@ -12,10 +12,10 @@ INSERT IGNORE INTO configuration VALUES ('Premium', 'DEFAULT', 'management-serve
ALTER IGNORE TABLE `cloud`.`user_vm_details` DROP FOREIGN KEY `fk_user_vm_details__vm_id`;
ALTER TABLE `cloud`.`user_vm_details` ADD CONSTRAINT `fk_user_vm_details__vm_id` FOREIGN KEY `fk_user_vm_details__vm_id`(`vm_id`) REFERENCES `vm_instance`(`id`) ON DELETE CASCADE;
ALTER TABLE `cloud`.`domain_router` ADD COLUMN `is_priority_bumpup` int(1) unsigned NOT NULL DEFAULT 0 COMMENT 'if the priority has been bumped up';
ALTER TABLE `cloud`.`domain_router` ADD COLUMN `stop_pending` int(1) unsigned NOT NULL DEFAULT 0 COMMENT 'if this router would be stopped after we can connect to it';
ALTER TABLE `cloud`.`domain_router` ADD COLUMN `is_priority_bumpup` int(1) unsigned NOT NULL DEFAULT 0 COMMENT 'if the priority has been bumped up';
ALTER TABLE `cloud`.`domain_router` ADD COLUMN `stop_pending` int(1) unsigned NOT NULL DEFAULT 0 COMMENT 'if this router would be stopped after we can connect to it';
DELETE FROM `cloud`.`configuration` where name='vmware.guest.nic.device.type';
INSERT IGNORE INTO configuration VALUES ('Advanced', 'DEFAULT', 'management-server', 'agent.lb.enabled', 'true', 'If agent load balancing enabled in cluster setup');
@ -28,3 +28,15 @@ ALTER TABLE `cloud`.`resource_count` ADD UNIQUE `i_resource_count__type_accountI
ALTER TABLE `cloud`.`resource_count` ADD UNIQUE `i_resource_count__type_domaintId`(`type`, `domain_id`);
UPDATE configuration set description='Load Balancer(haproxy) stats visibilty, the value can be one of the following six parameters : global,guest-network,link-local,disabled,all,default' WHERE name='network.loadbalancer.haproxy.stats.visibility' ;
CREATE TABLE IF NOT EXISTS `cloud`.`inline_load_balancer_nic_map` (
`id` bigint unsigned NOT NULL auto_increment,
`load_balancer_id` bigint unsigned NOT NULL,
`public_ip_address` char(40) NOT NULL,
`nic_id` bigint unsigned NULL COMMENT 'nic id',
PRIMARY KEY (`id`),
UNIQUE KEY (`nic_id`),
CONSTRAINT `fk_inline_load_balancer_nic_map__load_balancer_id` FOREIGN KEY(`load_balancer_id`) REFERENCES `load_balancing_rules`(`id`) ON DELETE CASCADE,
CONSTRAINT `fk_inline_load_balancer_nic_map__nic_id` FOREIGN KEY(`nic_id`) REFERENCES `nics`(`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;