...
- All VMware test cases need to be covered, as new mapping of DC to CloudStack zone is a change in critical path of VMware hypervisor plugin.
- Test upgrade to new product (with this feature) when the deployment already has multiple zones, where clusters in each zone encompasses one or more of following,
- Single DC
- Multiple DCs
- Multiple vCenters
- After upgrade, test adding new cluster to existing/new zone, where the cluster belongs to a DC/vCenter that is,
- Already part of zone
- Not part of zone
- Test new creation of new zone
Hypervisor support
...
- 'cloud'.'vmware_data_center' table to track all DC specific information along with details of resources & vCenter.
- Columns in this table are id, uuid, DC name, guid, vCenter host, username & password. The 'guid' field encapsulates 'vCenter host/ip' and DC mor. E.g. 'vcenterDatacenter:datacenter-101@vcenter.abc.com@dc-101com'
- id is primary key field of this table
- Schema definition
- CREATE TABLE `cloud`.`vmware_data_center` (
`id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT 'id',
`uuid` varchar(255) UNIQUE,
`name` varchar(255) NOT NULL COMMENT 'id Name of CloudStack zoneVMware datacenter',
`guid` varchar(255) NOT NULL UNIQUE COMMENT 'id of VMware datacenter',
PRIMARY KEY (`id`) ENGINE=InnoDB DEFAULT CHARSET=utf8; `vcenter_host` varchar(255) NOT NULL COMMENT 'vCenter host containing this VMware datacenter',
`username` varchar(255) NOT NULL COMMENT 'Name of vCenter host user',
`password` varchar(255) NOT NULL COMMENT 'Password of vCenter host user',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
- 'cloud'.''cloud'.'zone_vmware_data_center_zone_map' table will be added to persist the mapping of zone to with DC.
- Columns in this table are id, vmware_dcdata_center_id, zone_id
- Foreign key id from vmware_dc table
- Foreign key id from data_center table
- Foreign key zone_id from data_center table.
- Schema definition
- CREATE TABLE `cloud`.`zone_vmware`vmware_data_center_zone_map` (
`id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT 'id',
`zone_id` bigint unsigned NOT NULL UNIQUE COMMENT 'id of CloudStack zone',
`vmware_data_center_id` bigint unsigned NOT NULL UNIQUE COMMENT 'id of VMware datacenter',
PRIMARY KEY (`id`),
CONSTRAINT `fk_zone_vmware_data_center_map__zone_id` FOREIGN KEY (`zone_id`) REFERENCES `data_center`KEY (`id`) ON DELETE CASCADE,
CONSTRAINT `fk_zone_vmware_data_center_zone_map__vmware_data_center_id` FOREIGN KEY (`vmware_data_center_id`) REFERENCES `vmware_data_center`(`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
- 'cloud'.'legacy_zones' table to track legacy zones in cloudstack deployment. During CloudStack upgrade, this table is populated.
- Columns in this table are id, zone id
- id is primary key field of this table
- Foreign key zone_id refers id from data_center table
- Schema definition
- CREATE TABLE `cloud`.`legacy_zones` (
`id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT 'id',
`zone_id` bigint unsigned NOT NULL UNIQUE COMMENT 'id of CloudStack zone',
PRIMARY KEY (`id`),
CONSTRAINT `fk_zone_vmware_data_center_maplegacy_zones__zone_id` FOREIGN KEY (`zone_id`) REFERENCES `data_center`(`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
...
- addCluster will be modified
- Interface perspective - Remove parameters vCenter host/ip, username, password and DC name optional based on zone id's presence in zone_dc_map.
- Only required parameter is cluster name.
- No change
- If the zone is legacy, then hide Datacenter/DC text field in UI. Hence url becomes http://vcenterhost/cluster
Image Added
- addVmwareDc associateZoneWithDc -
- Maps a cloudstack zone with specified VMware DC.
- Throws RemoteException if vCenter is not reachable or any other server side Exception caught.
- Upon failure in successful parameter validation throw InvalidParameterValueException
- Parameters are,
- zoneId - required
- dcName name - required
- vCenterHost url - required
- vCenterUser username - required
- vCenterPassword password - required
- disAssocaiteZoneWithDc removeVmwareDc -
- Unmaps a cloudstack zone from a Removes and unmaps the VMWare DC that is associated with it earlieradded to specified zone.
- If no association exists already, then throw CloudRuntimeException.
- If no such zone exists, throw InvalidParameterValueException
- If zone is have one or more clusters / elements, then throw ResourceInUseException - Zone should be empty (no clusters or other elements like Nexus 1000v VSM instance)
- Parameter are,
- zoneId - required
UI Flow
- Changes required in UI
- Associate zone with DC
- Add VMware DC to zone
- Remove VMware DC from zone
Dis-associate zone with DC- Add Cluster form in zone wizard
- Add Cluster wizard
- Changes to support legacy zones.
Open Issues
...
{"serverDuration": 176, "requestCorrelationId": "3dfab5b3e176d984"}