Following changes and improvements:
- Improvements in handling of PingRoutingCommand
1. Added global config - vm.sync.power.state.transitioning, default value: false, to control syncing of power states for transitioning VMs
2. Improved VirtualMachinePowerStateSync to allow power state sync for host VMs in a batch
3. Optimized scanning stalled VMs
- Added caching for account/use role API access with expiration after write set to 60 seconds.
- Added caching for some recurring DB retrievals
1. CapacityManager updateCapacityForHost - beneficial for calculation for host capacities by CapacityChecker, host joins
2. CapacityManager - listing service offerings - beneficial in host capacity calculation
3. LibvirtServerDiscoverer existing host for the cluster - beneficial for host joins
4. DownloadListener - hypervisors for zone - beneficial for host joins
5. VirtualMachineManagerImpl - VMs in progress- beneficial for processing stalled VMs during PingRoutingCommands
- Optimized MS list retrieval for agent connect
- Optimize finding ready systemvm template for zone
- Database retrieval optimisations - fix and refactor for cases where only IDs or counts are used mainly for hosts and other infra entities. Also similar cases for VMs and other entities related to host concerning background tasks
- Changes in agent-manager connection with NIO classes
1. Optimize use of executor service
2. Do SSL handshakes within worker threads
3. Added global configs to finely control the behaviour depending on the infra
4. On agent side backoff and sslhandshake timeout can be controlled by agent properties
- Improvements in StatsCollection - minimize DB retrievals.
- Improvements in DeploymentPlanner to retrieve only desired host fields and lesser retrievals.
- Improvements in resource calculation
- add timeout for CheckNetworkCommand
- use SychnonousQueue for ssl/tls handshake worker
- revert to TLSv1.2
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
* Commit for PR https://github.com/shapeblue/cloudstack-apple/pull/471
This PR adds a flag (customType) to HypervisorType to differentiate if a hypervisor plugin is built-in or customized.
With the customType flag, we can isolate conditional checks for allow the customized hypervisor plugin to proceed.
* Add customType field to HypervisorType to differentiate if the plugin is a customized type
* Address @shwstppr's comments
* Define a enum in HypervisorType to indicate specific functionalities of a hypervisor plugin type
* Refactoring to define if the hypervisor supports the operation during
initialization of the HypervisorType.
* Remove ROOT_DISK_SIZE_OVERRIDE_SUPPORTING_HYPERVISORS
---------
Co-authored-by: Annie Li <ji_li@apple.com>
Retrieving templates with inner join on host table was turning out to be
more expensive than finding distinct hypervisor types for a zone using
hsot table and then finding templates for those types
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>