cloudstack/test/integration/smoke
Abhishek Kumar 0b5a5e8043
api,agent,server,engine-schema: scalability improvements (#9840)
* api,agent,server,engine-schema: scalability improvements

Following changes and improvements have been added:

- Improvements in handling of PingRoutingCommand

    1. Added global config - `vm.sync.power.state.transitioning`, default value: true, to control syncing of power states for transitioning VMs. This can be set to false to prevent computation of transitioning state VMs.
    2. Improved VirtualMachinePowerStateSync to allow power state sync for host VMs in a batch
    3. Optimized scanning stalled VMs

- Added option to set worker threads for capacity calculation using config - `capacity.calculate.workers`

- Added caching framework based on Caffeine in-memory caching library, https://github.com/ben-manes/caffeine

- Added caching for account/use role API access with expiration after write can be configured using config - `dynamic.apichecker.cache.period`. If set to zero then there will be no caching. Default is 0.

- 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 - listing service offerings - beneficial in host capacity calculation
    2. LibvirtServerDiscoverer existing host for the cluster - beneficial for host joins
    3. 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-agentmanager connection with NIO client-server classes

    1. Optimized the use of the executor service
    2. Refactore Agent class to better handle connections.
    3. Do SSL handshakes within worker threads
    5. Added global configs to control the behaviour depending on the infra. SSL handshake could be a bottleneck during agent connections. Configs - `agent.ssl.handshake.min.workers` and `agent.ssl.handshake.max.workers` can be used to control number of new connections management server handles at a time. `agent.ssl.handshake.timeout` can be used to set number of seconds after which SSL handshake times out at MS end.
    6. On agent side backoff and sslhandshake timeout can be controlled by agent properties. `backoff.seconds` and `ssl.handshake.timeout` properties can be used.

- Improvements in StatsCollection - minimize DB retrievals.

- Improvements in DeploymentPlanner allow for the retrieval of only desired host fields and fewer retrievals.

- Improvements in hosts connection for a storage pool. Added config - `storage.pool.host.connect.workers` to control the number of worker threads that can be used to connect hosts to a storage pool. Worker thread approach is followed currently only for NFS and ScaleIO pools.

- Minor improvements in resource limit calculations wrt DB retrievals

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

Co-authored-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
Co-authored-by: Rohit Yadav <rohit.yadav@shapeblue.com>

* test1, domaindetails, capacitymanager fix

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* test2 - agent tests

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* capacitymanagertest fix

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* change

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* fix missing changes

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* address comments

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* revert marvin/setup.py

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* fix indent

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* use space in sql

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* address duplicate

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* update host logs

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* revert e36c6a5d07

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* fix npe in capacity calculation

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* move schema changes to 4.20.1 upgrade

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* build fix

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* address comments

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* fix build

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* add some more tests

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* checkstyle fix

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* remove unnecessary mocks

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* build fix

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* replace statics

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* engine/orchestration,utils: limit number of concurrent new agent
connections

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* refactor - remove unused

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* unregister closed connections, monitor & cleanup

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* add check for outdated vm filter in power sync

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* agent: synchronize sendRequest wait

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

---------

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
Co-authored-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2025-02-01 12:28:41 +05:30
..
__init__.py Add Python flake8 linting for W291 trailing whitespace with Super-Linter (#4687) 2022-03-28 11:40:26 -03:00
test_2fa.py User two factor authentication (#6924) 2023-02-13 09:14:17 +01:00
test_account_access.py server, api: account and api entity access improvements 2024-08-06 12:24:19 -03:00
test_accounts.py Fix spelling (#7087) 2023-01-16 10:56:07 +01:00
test_affinity_groups.py Add Python flake8 linting for W291 trailing whitespace with Super-Linter (#4687) 2022-03-28 11:40:26 -03:00
test_affinity_groups_projects.py Add Python flake8 linting for W291 trailing whitespace with Super-Linter (#4687) 2022-03-28 11:40:26 -03:00
test_annotations.py Allow admin/users to add comments to Management Servers (#7379) 2023-04-18 14:16:55 +05:30
test_async_job.py python3: Migrate Marvin and smoketests to python3 (#4727) 2021-05-04 23:19:37 +05:30
test_attach_multiple_volumes.py Fix spelling in docs, logs, exception messages etc (#9076) 2024-05-28 07:41:20 +02:00
test_backup_recovery_dummy.py Add Python flake8 linting for W291 trailing whitespace with Super-Linter (#4687) 2022-03-28 11:40:26 -03:00
test_backup_recovery_veeam.py veeam: fix some issues with restoring volume from backup and attaching it to VM (#8570) 2024-01-29 11:40:43 +01:00
test_bucket.py ObjectStore Framework with MinIO and Simulator plugins (#7752) 2023-12-01 17:51:00 +05:30
test_certauthority_root.py python3: Migrate Marvin and smoketests to python3 (#4727) 2021-05-04 23:19:37 +05:30
test_cluster_drs.py test: fix simulator CI failure test_cluster_drs (#9354) 2024-07-09 01:18:50 +05:30
test_console_endpoint.py console: Console access enhancements (#6577) 2022-09-14 12:39:59 +05:30
test_create_list_domain_account_project.py Add Python flake8 linting for W291 trailing whitespace with Super-Linter (#4687) 2022-03-28 11:40:26 -03:00
test_create_network.py Make displayText in createNetwork optional (#7112) 2023-02-08 14:41:59 +01:00
test_deploy_vgpu_enabled_vm.py Add Python flake8 linting for W291 trailing whitespace with Super-Linter (#4687) 2022-03-28 11:40:26 -03:00
test_deploy_virtio_scsi_vm.py python3: Migrate Marvin and smoketests to python3 (#4727) 2021-05-04 23:19:37 +05:30
test_deploy_vm_extra_config_data.py integration test fixes for 4.18 (#7190) 2023-02-14 08:20:11 +01:00
test_deploy_vm_iso.py CLOUDSTACK-10013: Fixes based on code review and test failures 2017-12-23 17:51:42 +05:30
test_deploy_vm_iso_uefi.py Adding support for RHEL8 binary-compatible variants (#5158) 2021-08-18 10:03:03 +02:00
test_deploy_vm_root_resize.py VM Autoscaling with virtual router (#6571) 2022-12-05 15:23:03 +01:00
test_deploy_vm_with_userdata.py Fix spelling (#6898) 2022-12-13 14:58:14 +01:00
test_deploy_vms_in_parallel.py Resource reservation framework (#6694) 2022-09-16 15:44:35 +05:30
test_deploy_vms_with_varied_deploymentplanners.py python3: Migrate Marvin and smoketests to python3 (#4727) 2021-05-04 23:19:37 +05:30
test_diagnostics.py python3: Migrate Marvin and smoketests to python3 (#4727) 2021-05-04 23:19:37 +05:30
test_direct_download.py Direct download certificates additions and improvements (#6104) 2022-04-11 22:57:23 -03:00
test_disk_offerings.py kvm: volume encryption feature (#6522) 2022-09-27 10:20:59 +05:30
test_disk_provisioning_types.py Added disk provisioning type support for VMWare (#4640) 2021-07-16 22:37:42 -03:00
test_domain_disk_offerings.py python3: Migrate Marvin and smoketests to python3 (#4727) 2021-05-04 23:19:37 +05:30
test_domain_network_offerings.py tests: Fix test failures for Local storage and Basic zones (#5106) 2021-07-01 09:45:21 +05:30
test_domain_service_offerings.py python3: Migrate Marvin and smoketests to python3 (#4727) 2021-05-04 23:19:37 +05:30
test_domain_vpc_offerings.py tests: Fix test failures for Local storage and Basic zones (#5106) 2021-07-01 09:45:21 +05:30
test_dynamicroles.py api,agent,server,engine-schema: scalability improvements (#9840) 2025-02-01 12:28:41 +05:30
test_enable_account_settings_for_domain.py Fix spelling in docs, logs, exception messages etc (#9076) 2024-05-28 07:41:20 +02:00
test_enable_role_based_users_in_projects.py Enable Flake8 rule W391 (#6606) 2022-11-13 11:00:07 +01:00
test_events_resource.py server,test: fix resourceid for VOLUME.DETROY in restore VM (#9032) 2024-05-22 11:02:14 +02:00
test_gateway_on_shared_networks.py Gateways after Nic update on Shared Network tests (#6355) 2022-05-05 19:53:31 -03:00
test_global_acls.py Global ACL for VPCs (#7150) 2023-11-30 14:51:43 +01:00
test_global_settings.py Introducing granular command timeouts global setting (#9659) 2025-01-07 17:06:32 +05:30
test_guest_os.py test: fix test_guest_os.py failure on xcpng82 (#8659) 2024-02-17 09:32:37 +01:00
test_guest_vlan_range.py Add Python flake8 linting for W291 trailing whitespace with Super-Linter (#4687) 2022-03-28 11:40:26 -03:00
test_host_control_state.py Auto Enable/Disable KVM hosts (#7170) 2023-04-04 17:03:37 +05:30
test_host_maintenance.py packaging: Adding Centos8, Ubuntu 20.04, XCPNG8.1 Support (#4068) 2020-08-17 16:28:30 +05:30
test_host_ping.py test: fix test_host_ping.py to restore original host state (#8380) 2023-12-20 11:52:08 +05:30
test_host_tags.py New feature: Implicit host tags (#8929) 2024-05-30 17:21:13 +05:30
test_hostha_kvm.py Adding support for RHEL8 binary-compatible variants (#5158) 2021-08-18 10:03:03 +02:00
test_hostha_simulator.py python3: Migrate Marvin and smoketests to python3 (#4727) 2021-05-04 23:19:37 +05:30
test_human_readable_logs.py Changed test failure to warning (#4264) 2020-08-25 15:29:59 +05:30
test_image_store_object_migration.py Fixup test_image_store_object_migration.py (#8378) 2023-12-20 11:17:41 +05:30
test_import_unmanage_volumes.py New feature: Import/Unamange DATA volume from storage pool (#8808) 2024-04-23 16:05:59 +02:00
test_internal_lb.py VMware: add support for 8.0b (8.0.0.2), 8.0c (8.0.0.3) (#7380) 2023-08-17 10:42:42 +02:00
test_ipv4_routing.py feature: Dynamic and Static Routing (#9470) 2024-09-06 08:55:17 +05:30
test_ipv6_infra.py test: add, refactor ipv6 network, vpc tests (#6338) 2022-07-12 12:54:53 +05:30
test_iso.py python3: Migrate Marvin and smoketests to python3 (#4727) 2021-05-04 23:19:37 +05:30
test_kubernetes_clusters.py pre-commit: enable Python flake8 rule `E271` (#9358) 2024-07-09 10:17:53 +02:00
test_kubernetes_supported_versions.py test: upgrade kubernetes versions to 1.25.0/1.26.0 (#7685) 2023-08-10 09:48:08 +02:00
test_list_accounts.py test: Add e2e tests for listing resources (#8410) 2024-02-07 08:25:55 +01:00
test_list_disk_offerings.py test: Add e2e tests for listing resources (#8410) 2024-02-07 08:25:55 +01:00
test_list_domains.py test: Add e2e tests for listing resources (#8410) 2024-02-07 08:25:55 +01:00
test_list_hosts.py test: Add e2e tests for listing resources (#8410) 2024-02-07 08:25:55 +01:00
test_list_ids_parameter.py xen: Fix volume snapshot deletion when it has child snapshots (#6296) 2022-04-22 14:36:08 -03:00
test_list_service_offerings.py test: Add e2e tests for listing resources (#8410) 2024-02-07 08:25:55 +01:00
test_list_storage_pools.py test: Add e2e tests for listing resources (#8410) 2024-02-07 08:25:55 +01:00
test_list_volumes.py test: Add e2e tests for listing resources (#8410) 2024-02-07 08:25:55 +01:00
test_loadbalance.py Add Python flake8 linting for W291 trailing whitespace with Super-Linter (#4687) 2022-03-28 11:40:26 -03:00
test_login.py util: check JSESSIONID in cookies if user is passed 2024-10-11 17:24:34 +02:00
test_metrics_api.py test: skip check for volume stats history on xenserver (#8661) 2024-02-15 16:32:49 +05:30
test_migration.py docs: fix spelling in code comments (#8690) 2024-02-26 14:16:35 +01:00
test_multipleips_per_nic.py CLOUDSTACK-10193: Fix smoke tests failures with new systemvmtemplate 2017-12-23 09:22:44 +05:30
test_nested_virtualization.py Add Python flake8 linting for W291 trailing whitespace with Super-Linter (#4687) 2022-03-28 11:40:26 -03:00
test_network.py Add support for network data in Config Drive (#9329) 2024-08-26 10:53:42 +02:00
test_network_acl.py python3: Migrate Marvin and smoketests to python3 (#4727) 2021-05-04 23:19:37 +05:30
test_network_ipv6.py feature: Dynamic and Static Routing (#9470) 2024-09-06 08:55:17 +05:30
test_network_permissions.py Enable Flake8 rule W391 (#6606) 2022-11-13 11:00:07 +01:00
test_nic.py python3: Migrate Marvin and smoketests to python3 (#4727) 2021-05-04 23:19:37 +05:30
test_nic_adapter_type.py python3: Migrate Marvin and smoketests to python3 (#4727) 2021-05-04 23:19:37 +05:30
test_non_contigiousvlan.py Enable Flake8 rule W391 (#6606) 2022-11-13 11:00:07 +01:00
test_nonstrict_affinity_group.py new plugins: Add non-strict affinity groups (#6845) 2022-12-20 15:09:52 +01:00
test_object_stores.py ObjectStore Framework with MinIO and Simulator plugins (#7752) 2023-12-01 17:51:00 +05:30
test_outofbandmanagement.py test: Frix travis failure - test_outofbandmanagement.py (#5346) 2021-08-20 13:00:34 +02:00
test_outofbandmanagement_nestedplugin.py Use lowercase HTTP header field names so we are compatible with HTTP/2 (#7006) 2023-01-23 11:17:54 +01:00
test_over_provisioning.py python3: Migrate Marvin and smoketests to python3 (#4727) 2021-05-04 23:19:37 +05:30
test_password_server.py Add Python flake8 linting for W291 trailing whitespace with Super-Linter (#4687) 2022-03-28 11:40:26 -03:00
test_persistent_network.py Enable flake8 rule W292 No newline at end of file (#6274) 2022-06-30 12:08:27 +05:30
test_portable_publicip.py python3: Migrate Marvin and smoketests to python3 (#4727) 2021-05-04 23:19:37 +05:30
test_portforwardingrules.py python3: Migrate Marvin and smoketests to python3 (#4727) 2021-05-04 23:19:37 +05:30
test_primary_storage.py utils,framework/db: Introduce new database encryption cipher based on AesGcmJce (#7003) 2023-02-02 16:25:49 +01:00
test_primary_storage_scope.py test_primary_storage_scope.py should only run with kvm, vmware and simulator (#9323) 2024-07-04 13:29:05 +05:30
test_private_roles.py create parameter to determine whether roles are public or private (#6960) 2023-05-01 15:26:10 +02:00
test_privategw_acl.py pre-commit: enable Python flake8 rule `E271` (#9358) 2024-07-09 10:17:53 +02:00
test_privategw_acl_ovs_gre.py pre-commit: enable Python flake8 rule `E271` (#9358) 2024-07-09 10:17:53 +02:00
test_projects.py server: allow updating project name (#7149) 2023-04-25 15:29:13 +05:30
test_public_ip_range.py server: fix cannot get systemvm ips in dedicated ranges (#7144) 2023-08-25 11:36:39 +02:00
test_purge_expunged_vms.py test: improve purge expunged resources b/g task testcase (#9426) 2024-07-29 15:49:45 +05:30
test_pvlan.py Fix spelling (#6860) 2022-11-13 10:56:15 +01:00
test_quarantined_ips.py Public IP quarantine feature (#7378) 2023-11-15 10:29:22 +01:00
test_regions.py python3: Migrate Marvin and smoketests to python3 (#4727) 2021-05-04 23:19:37 +05:30
test_register_userdata.py test: fix test/integration/smoke/test_register_userdata.py which caused networks not to be deleted (#9244) 2024-06-14 09:05:57 +02:00
test_reset_configuration_settings.py Fix spelling (#6272) 2022-07-05 09:08:53 +02:00
test_reset_vm_on_reboot.py Add Python flake8 linting for W291 trailing whitespace with Super-Linter (#4687) 2022-03-28 11:40:26 -03:00
test_resource_accounting.py CLOUDSTACK-3009: Fix resource calculation CPU, RAM for accounts. (#3012) 2018-11-13 06:29:08 +05:30
test_resource_detail.py Add Python flake8 linting for W291 trailing whitespace with Super-Linter (#4687) 2022-03-28 11:40:26 -03:00
test_resource_names.py Support user resource name / displaytext with emoji, unicode chars, and some sql exception msg improvements (#9340) 2024-08-07 14:50:29 +05:30
test_restore_vm.py Fix exceeding of resource limits with powerflex (#9008) 2024-05-08 20:55:19 +05:30
test_router_dhcphosts.py cleanup of unused code and cleanup of cleanup procedure (#5562) 2021-12-23 10:10:38 +05:30
test_router_dns.py CLOUDSTACK-10193: Fix smoke tests failures with new systemvmtemplate 2017-12-23 09:22:44 +05:30
test_router_dnsservice.py Add Python flake8 linting for W291 trailing whitespace with Super-Linter (#4687) 2022-03-28 11:40:26 -03:00
test_routers.py Upgrade to JRE17 and Upgrade System VMs/VRs to Python3 and Debian 12 (#8497) 2024-02-26 18:07:50 +05:30
test_routers_iptables_default_policy.py Add Python flake8 linting for W291 trailing whitespace with Super-Linter (#4687) 2022-03-28 11:40:26 -03:00
test_routers_network_ops.py Upgrade to JRE17 and Upgrade System VMs/VRs to Python3 and Debian 12 (#8497) 2024-02-26 18:07:50 +05:30
test_safe_shutdown.py Run startServer in tearDown for test_safe_shutdown to ensure management server is up even if the tests fail (#7767) 2023-07-25 03:41:31 +02:00
test_scale_vm.py pre-commit: enable Python Flake8 rule `E713` (#9016) 2024-07-08 09:00:18 +02:00
test_secondary_storage.py test: Add e2e tests for listing resources (#8410) 2024-02-07 08:25:55 +01:00
test_service_offerings.py test: fix test failure on ubuntu 24.04: "top: unknown option 'n'" (#9262) 2024-06-21 10:46:06 +05:30
test_set_sourcenat.py test: fix ci failures on main branch (#7733) 2023-07-12 09:19:28 +02:00
test_sharedfs_lifecycle.py feature: Shared Storage Filesystem as a First Class Feature (#9208) 2024-09-05 17:22:32 +05:30
test_snapshots.py test: add test for standalone snapshot (#8104) 2023-10-19 09:48:16 +05:30
test_ssvm.py Add Service Offering to listSystemVMs and fix link from VR to its offering (#7938) 2023-09-28 09:10:03 +02:00
test_staticroles.py python3: Migrate Marvin and smoketests to python3 (#4727) 2021-05-04 23:19:37 +05:30
test_storage_policy.py network: fix vm can be deployed on L2 network of other accounts (#5784) 2022-01-11 12:16:00 +05:30
test_templates.py test: Add e2e tests for listing resources (#8410) 2024-02-07 08:25:55 +01:00
test_update_security_group.py Fix spelling (#6597) 2022-08-03 15:43:47 +05:30
test_usage.py Fix ISO url in test_usage.py (#9739) 2024-09-28 08:54:45 +02:00
test_usage_events.py python3: Migrate Marvin and smoketests to python3 (#4727) 2021-05-04 23:19:37 +05:30
test_vm_autoscaling.py test: fix test_vm_autoscaling.py which does not work due to userdata improvement (#7921) 2023-08-30 23:51:52 +02:00
test_vm_deployment_planner.py test_vm_deployment_planner: fix using wrong hypervisor (#7718) 2023-08-07 10:20:42 +05:30
test_vm_life_cycle.py Feature: Allow adding delete protection for VMs & volumes (#9633) 2024-09-09 14:44:50 +02:00
test_vm_lifecycle_unmanage_import.py test: fix failure on non-VMware env (#6969) 2022-12-12 10:32:29 +05:30
test_vm_schedule.py Add extra checks for test_vm_schedule to avoid intermittent failures (#8036) 2023-10-05 11:48:37 +05:30
test_vm_snapshot_kvm.py .github/linters: Enable flake8 W293 blank line contains whitespace (#6268) 2022-04-15 20:32:52 +05:30
test_vm_snapshots.py Fix spelling (#6609) 2022-11-01 08:30:01 +01:00
test_vm_strict_host_tags.py server: Enforce strict host tag check (#9017) 2024-06-25 14:42:17 +05:30
test_vnf_templates.py New feature: VNF templates and appliances integration (#8022) 2023-10-27 10:23:00 +02:00
test_volumes.py Feature: Allow adding delete protection for VMs & volumes (#9633) 2024-09-09 14:44:50 +02:00
test_vpc_ipv6.py feature: Dynamic and Static Routing (#9470) 2024-09-06 08:55:17 +05:30
test_vpc_redundant.py Add Python flake8 linting for W291 trailing whitespace with Super-Linter (#4687) 2022-03-28 11:40:26 -03:00
test_vpc_router_nics.py Add Python flake8 linting for W291 trailing whitespace with Super-Linter (#4687) 2022-03-28 11:40:26 -03:00
test_vpc_vpn.py Upgrade to JRE17 and Upgrade System VMs/VRs to Python3 and Debian 12 (#8497) 2024-02-26 18:07:50 +05:30
test_webhook_delivery.py feature: webhooks (#8674) 2024-06-10 10:40:12 +05:30
test_webhook_lifecycle.py feature: webhooks (#8674) 2024-06-10 10:40:12 +05:30