...
Author | Description | Date |
|---|
Sateesh Chodapuneedi | Initial Revision | 04/09/2013 |
Sateesh Chodapuneedi | Proposed Feature Specification | 04/21/2013 |
Glossary
DC - VMware vCenter Data Center.
zone - CloudStack zone.
N1kv - Cisco Nexus 1000v Distributed Virtual Switch
ASA1kv - Cisco Adaptive Security Appliance 1000v
vDS - VMware vNetwork Distributed Virtual Switch.
vSwitch - VMware vNetwork Standard Virtual Switch
dvPortgroup - VMware vNetwork Distributed Virtual Portgroup
Portgroup - VMware vNetwork Standard Virtual Portgroup
...
- 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 tableImplement Dao & VO for 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 String encapsulating VMware datacenter and vCenter',
PRIMARY `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'.'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 tableForeign key id from data_center table
- Implement Dao & VO for this 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_zone_map__vmware_data_zonecenter_id` FOREIGN KEY (`zone`vmware_data_center_id`) REFERENCES `data`vmware_data_center`(`id`) ON DELETE CASCADE,
CONSTRAINT `fk_zone_vmware_data_center_map__vmware_data_center_id` FOREIGN KEY (`vmware_data_center_id`) REFERENCES `vmware_data_center`(`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
Web Services APIs
) 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_legacy_zones__zone_id` FOREIGN KEY (`zone_id`) REFERENCES `data_center`(`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
Web Services APIs
- addCluster will be modified
- Interface perspective -
- No change
- If the zone is legacy, then hide Datacenter/DC text field in UI. Hence cluster url becomes http://vcenterhost/cluster
- addVmwareDc -
- 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 parameter validation throw InvalidParameterValueException
- Parameters are,
- zoneId - required
- name - required
- vcenter - required
- username - required
- password - required
- removeVmwareDc -
- Removes and unmaps the VMWare DC that is added to specified zone.
- 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.
- 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 - required
- vCenterHost - required
- vCenterUser - required
- vCenterPassword - required
- disAssocaiteZoneWithDc -
- Unmaps a cloudstack zone from a VMWare DC that is associated with it earlier.
- 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
- listVmwareDcs -
- Lists VMware DCs associated with specified zone.
- If no association exists already, then returns empty list
- Parameter is,
- 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
- Considering a model where a CloudStack deployment will have some zones with multiple DCs and some zones with single DC. This comes from the fact that existing CloudStack deployment has zones with multiple DCs. But after upgrade to the new newest version, customer would like to have existing zones to operate as-is. But all new CloudStack zones would be having single DC. In this model, the existing zone with multiple DCs is termed as Legacy zone and it will not support the zone wide features are requires a zone to have only 1 DC. Also operations on legacy zone should be seamless (like adding a cluster etc.) as they were before upgrade. This means the code base doesn't apply any new logic, that affects the functionality, over legacy zone. For example, constraint checks that happen while adding a cluster to new zone should not be done if the zone is legacy zone.
Impact on other areas/features
- Impact of this feature on New features like zone wide primary storage doesn't go well with zones having multiple hypervisors. How upgrade handled for such zones?
Impact on other areas/features
- Impact of this feature on zone wide primary storage support - support - vmware.
- Impact of this feature on storage live migration - vmware.
- Cisco Nexus 1000v support needs changes. 1 cluster to 1 Nexus mapping to be removed. Allow Nexus 1000v VSM instance to be associated/dis-associated with zone.
- Impact of this feature on ASA feature needs check.
- Impact of this feature on refactoring in Vmsync.
Upgrade
- During CloudStack upgrade operation, 'cloud'.'legacy_zones' table is populated. This table will legacy zones in cloudstack deployment.
- Migration support
- Existing CloudStack Deployments - Existing cloudstack deployments with multiple DC's in a zone
- Decide a DC as the final DC that contains all clusters.
- Move all clusters to the chosen DC.
- For each cluster create cluster with same name in target DC.
- Edit the field 'cloud'.'cluster'.'name' in database to reflect new DC name in cluster name.
- Edit the field 'cloud'.'cluster_details'.'url' in database to reflect new DC name in cluster name.
- Options to migrate VM across datacenters
- Cold migrate each of the instance to this new cluster in chosen DC.
- Hot migrate the VMs by using disconnecting all hosts from source cluster followed by deletion of source cluster from source DC and adding all hosts to cluster in target DC.
- Hot migrate the VMs after suspending the VMs. Need to power on (mean resume) VMs after migration is complete. This needs the virtual disks of VM to be placed on shared storage before triggering the migration operation.
- Pre-requisite checker tool - This tool should go through existing CloudStack deployment and VMware deployment to check if pre-requisites are met. Following are list of pre-requisites before going to upgrade to new version with this feature built-in,
- A CloudStack zone should encompass only 1 VMware DC
- The VMware DC encompassed by CloudStack zone should not be shared by multiple CloudStack deployments.
- deployments with clusters from multiple DCs/vCenters require consolidation of clusters into single DC.
- Following are options to migrate VM across datacenters
- Cold migrate each of the instance to this new cluster in chosen DC.
- Hot migrate the VMs by using disconnecting all hosts from source cluster followed by deletion of source cluster from source DC and adding all hosts to cluster in target DC.
- Hot migrate the VMs after suspending the VMs. Need to power on (mean resume) VMs after migration is complete. This needs the virtual disks of VM to be placed on shared storage before triggering the migration operation.
- Pre-requisite checker tool - This tool should go through existing CloudStack deployment and VMware deployment to check if prerequisites are met. Following are list of prerequisites would be convered during upgrade to new version of product with this feature built-in,
- A CloudStack zone should encompass only 1 VMware DC
- The VMware DC encompassed by CloudStack zone should not be shared by multiple CloudStack deployments.
- Guidelines of CloudStack version upgrade
- Migration would be offline operation before CloudStack version upgrade operation.
- Prerequisite checker tool would be run as part of CloudStack upgrade
- Choice of migration procedure is above option 1.b.(ii
Guidelines of CloudStack version upgrade - Migration would be offline operation before CloudStack version upgrade operation.
- Choice of migration procedure is option (2) - migration of host across DC by disconnecting from cluster in source DC, followed by connecting it to target cluster in another DC. Following are detailed steps,
- Handle the case of clusters from multiple vCenter
- Investigation pendingTo be investigated.
- Handle the case of clusters from single vCenter but different DCs
- Handle the case of deployment using distributed virtual switch (Nexus 1000v or vDS)
- Deploy Nexus 1000v or vDS on target DC with same credentials (user/password)
- Ensure if 'cloud'.'virtual_supervisor_module' table has the new IP of Nexus 1000v VSM instance.
- Create all dvPortgroups required by VMs on the host that is moving across DCs. Make sure all properties of dvPortGroups are in sync, e.g. shaping policy should be same as that of original dvPortGroup in source DC. External switch configuration for trunking/routes is assumed to be taken care of by admin.
- Decide a DC as the final DC that contains all clusters.
- Create a cluster, in target DC, with same properties as that of original cluster
- Unmanage the cluster in CloudStack
- Disconnect each host in source cluster
- Remove each host from source cluster
- Add each host to target cluster
- Create all custom properties
- Each VM will have custom properties like cloud.nic.mask. This will be lost during above migration operations. Hence need to re-create after adding to target cluster
- Each template (user VM and system VM templates) will have custom properties like cloud.uuid. This need to be restored.
- Add the target cluster to CloudStack
- Make sure that guid field of 'cloud'.'host' table has the valid reference because when host is added to target cluster, it will acquire new unique reference.
- Investigation pending for migration of primary/secondary datastore across DCs.
- Pre-requisite checker should run successfully before CloudStack upgrade operation.
- Run CloudStack version upgrade to complete the upgrade.
Assumptions
- Sharing of resources (datastores, virtual switches like vDS, N1kv and ASA1kv etc.) with other entity (cloudstack or non-cloudstack entity) is not allowed.
- Cloudstack zone doesn't contain multiple hypervisors. A cloudstack zone will have only 1 hypervisor.
Out of scope
- Make sure the field 'cloud'.'cluster'.'name' in database reflect new DC name in cluster name.
- Make sure the field 'cloud'.'cluster_details'.'url' in database reflect new DC name in cluster name.
Assumptions
- Sharing of resources (datastores, virtual switches like vDS, N1kv and ASA1kv etc.) with other entity (cloudstack or non-cloudstack entity) is not allowed.
- Cloudstack zone doesn't contain multiple hypervisors. A cloudstack zone will have only 1 hypervisor.
Out of scope
- Support zone level Cisco Nexus 1000v VSM instance.
- Support Zone level Cisco ASA 1000v instance.
- Mapping of Nexus VSM instance with zone
- Bring in new APIs to support associate / dis-associate a Nexus VSM instance with a zone
- While adding a cluster, let user choose which Nexus VSM to be used for virtual network orchestration. Actually Nexus VSM doesn't care about the cluster but it manages host. So to make the operation valid, it required (a pre-requisite) that all hosts in a cluster should be part of single Nexus VSM instance.
- Allow multiple Nexus VSM instances to be associated with single cloudstack zone.
- Architecture
- While adding a cluster, if N1kv instance is specified, update table cloud.virtual_supervisor_module and cloud.zone_vsm_map to assocaite N1kv VSM instance with zone
- Allow multiple N1kv VSM instances to be added to zone.
- Avoid cascaded removal of VSM instance upon cluster deletion as the association is now at zone level.
- Change cleanup code of N1kv VSM instances as cleanup should happen automatically with zone removal instead of cluster removal earlier.
- Constraint checks
- Only N1kv VSM of the associated DC can be added to a zone.
- N1kv's vCenter server connection's properties would need to be checked to retrieve the association of N1kv with a vCenter and a DC. Compare the retrieved vCenter IP and DC name with vCenter IP and DC name of current zone
- DB changes
- 'cloud'.'cluster_vsm_map' would be removed.
- 'cloud'.'zone_vsm_map' would be added. Also a zone can be associated with more than 1 VSM instances.
- Columns in this table are id, zone_id & vsm_id where id is Primary key of this table.
- Foreign key vsm_id from virtual_supervisor_module table.
- Implement Dao & VO classes for this table.
- Zone level Cisco ASA 1000v instance.
- CloudStack should be able to add/manage following DC level resources in scope of zone.
- Distributed virtual switches for zone wide virtual networks.
- Nexus 1000v DVS
- VMware DVS - this is already realized by zone wide traffic labels.
- UI Flow
- Support add/removal of Nexus 1000v device to a zone
- Support add/removal of ASA 1000v to a zone.
- Track relationship between resources (DC <-> DVS <> N1kv <-> ASA etc.) in cloudstack database