Skip to content

Change vm.stats.remove.batch.size to delete.batch.query.size & allow delete of volume_stats in batches - #9283

Merged
sureshanaparti merged 6 commits into
apache:4.19from
shapeblue:make-vm-stat-remove-config-generic
Jun 28, 2024
Merged

Change vm.stats.remove.batch.size to delete.batch.query.size & allow delete of volume_stats in batches#9283
sureshanaparti merged 6 commits into
apache:4.19from
shapeblue:make-vm-stat-remove-config-generic

Conversation

@vishesh92

@vishesh92vishesh92 commented Jun 21, 2024

Copy link
Copy Markdown
Member

Description

This PR changes vm.stats.remove.batch.size configuration parameter to delete.batch.query.size to make it more generic.

Changes also allow deletion of volume_stats in batches using the delete.batch.query.size global setting.

For context, please check the conversation in PR: #8740

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)
  • build/CI
  • test (unit or integration test code)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

How Has This Been Tested?

How did you try to break this feature and the system with this change?

@vishesh92

Copy link
Copy Markdown
MemberAuthor

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@vishesh92 a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

@vishesh92vishesh92 added this to the 4.19.1.0 milestone Jun 21, 2024
@blueorangutan

Copy link
Copy Markdown

Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 10068

@shwstpprshwstppr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code LGTM

@vishesh92
vishesh92force-pushed the make-vm-stat-remove-config-generic branch from d42560b to e562cb0CompareJune 24, 2024 10:09
@codecov

codecovBot commented Jun 24, 2024

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 11.76471% with 15 lines in your changes missing coverage. Please review.

Project coverage is 14.97%. Comparing base (0b857de) to head (745b212).
Report is 160 commits behind head on 4.19.

FilesPatch %Lines
...java/com/cloud/storage/dao/VolumeStatsDaoImpl.java0.00%12 Missing ⚠️
...src/main/java/com/cloud/server/StatsCollector.java33.33%2 Missing ⚠️
.../cloud/configuration/ConfigurationManagerImpl.java50.00%1 Missing ⚠️
Additional details and impacted files
@@ Coverage Diff @@## 4.19 #9283 +/- ##
=============================================
- Coverage 30.70% 14.97% -15.74% + Complexity 34232 11046 -23186 
=============================================
Files 5376 5390 +14 Lines 378222 470973 +92751 Branches 55053 57438 +2385 =============================================
- Hits 116135 70512 -45623 - Misses 246719 392627 +145908 + Partials 15368 7834 -7534 
FlagCoverage Δ
simulator-marvin-tests?
uitests4.27% <ø> (-0.04%)⬇️
unittests15.68% <11.76%> (-0.97%)⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@vishesh92

Copy link
Copy Markdown
MemberAuthor

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@vishesh92 a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

@blueorangutan

Copy link
Copy Markdown

Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 10094

@JoaoJandre

JoaoJandre commented Jun 24, 2024

Copy link
Copy Markdown
Contributor

Hey @vishesh92,
As I said on #8740, I do not think that it makes sense to have a configuration with a generic name that only applies to a single scenario. This misleads the users into thinking that ACS will apply it everywhere, even if you add a note at the end of the description saying otherwise. My point on #8740 was that if we are applying the same concept on other deletes, then we can create a generic configuration. Just renaming a specific configuration to be generic and changing nothing else does not seem to make much sense.

@vishesh92

Copy link
Copy Markdown
MemberAuthor

Hey @vishesh92, As I said on #8740, I do not think that it makes sense to have a configuration with a generic name that only applies to a single scenario. This misleads the users into thinking that ACS will apply it everywhere, even if you add a note at the end of the description saying otherwise. My point on #8740 was that if we are applying the same concept on other deletes, then we can create a generic configuration. Just renaming a specific configuration to be generic and changing nothing else does not seem to make much sense.

@JoaoJandre I think I misunderstood what you meant. I thought you didn't want to increase the scope of your PR. As I mentioned earlier in PR #8740, I know it doesn't make sense now. But I am assuming we will be doing this for other tables as well in the future. Do you have any plan on how to deprecate the global settings in the future when we have similar global setting for different tables?

@vishesh92
vishesh92force-pushed the make-vm-stat-remove-config-generic branch from 22060c3 to 96c3a08CompareJune 24, 2024 12:57
@vishesh92
vishesh92force-pushed the make-vm-stat-remove-config-generic branch from 96c3a08 to dea2467CompareJune 24, 2024 13:06
@vishesh92vishesh92 changed the title Change vm.stats.remove.batch.size to delete.batch.query.sizeChange vm.stats.remove.batch.size to delete.batch.query.size & allow delete of volume_stats in batchesJun 24, 2024
@vishesh92

Copy link
Copy Markdown
MemberAuthor

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@vishesh92 a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

@sureshanaparti

Copy link
Copy Markdown
Contributor

Hi @JoaoJandre Can you review/check if your comments are addressed. It seems the config is applied for vm and volume stats now, this can be extended to other stats/tables later if required without any new config.

@blueorangutan

Copy link
Copy Markdown

Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 10108

@vishesh92vishesh92 reopened this Jun 25, 2024
@apacheapache deleted a comment from blueorangutanJun 27, 2024
@apacheapache deleted a comment from vishesh92Jun 27, 2024
Comment threadserver/src/main/java/com/cloud/configuration/ConfigurationManagerImpl.java Outdated
…gerImpl.java
Co-authored-by: Suresh Kumar Anaparti <sureshkumar.anaparti@gmail.com>
Comment threadserver/src/main/java/com/cloud/configuration/ConfigurationManagerImpl.java Outdated
…gerImpl.java
Co-authored-by: Suresh Kumar Anaparti <sureshkumar.anaparti@gmail.com>
Comment threadserver/src/main/java/com/cloud/configuration/ConfigurationManagerImpl.java Outdated
@apacheapache deleted a comment from blueorangutanJun 27, 2024
@sureshanaparti

Copy link
Copy Markdown
Contributor

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@sureshanaparti a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

@blueorangutan

Copy link
Copy Markdown

Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 10162

@sureshanaparti

Copy link
Copy Markdown
Contributor

@blueorangutan test

@blueorangutan

Copy link
Copy Markdown

@sureshanaparti a [SL] Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests

@blueorangutan

Copy link
Copy Markdown

[SF] Trillian Build Failed (tid-10657)

@JoaoJandreJoaoJandre left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but I think we should change the name to delete.query.batch.size instead of delete.batch.query.size. I did not test it.

Comment threadserver/src/main/java/com/cloud/configuration/ConfigurationManagerImpl.java Outdated
@vishesh92

Copy link
Copy Markdown
MemberAuthor

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@vishesh92 a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

@blueorangutan

Copy link
Copy Markdown

Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 10172

@sureshanaparti

Copy link
Copy Markdown
Contributor

@blueorangutan test

@blueorangutan

Copy link
Copy Markdown

@sureshanaparti a [SL] Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests

@blueorangutan

Copy link
Copy Markdown

[SF] Trillian test result (tid-10664)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 35009 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr9283-t10664-kvm-centos7.zip
Smoke tests completed. 97 look OK, 34 have errors, 0 did not run
Only failed and skipped tests results shown below:

TestResultTime (s)Test File
ContextSuite context=TestTemplateHierarchy>:setupError8.40test_accounts.py
test_01_events_resourceFailure0.02test_events_resource.py
ContextSuite context=TestDeployVmWithAffinityGroup>:setupError0.00test_affinity_groups.py
ContextSuite context=TestMultipleVolumeAttach>:setupError0.00test_attach_multiple_volumes.py
ContextSuite context=TestDummyBackupAndRecovery>:setupError0.00test_backup_recovery_dummy.py
ContextSuite context=TestVeeamBackupAndRecovery>:setupError0.00test_backup_recovery_veeam.py
test_01_condensed_drs_algorithmError0.00test_cluster_drs.py
test_02_balanced_drs_algorithmError0.00test_cluster_drs.py
ContextSuite context=TestConsoleEndpoint>:setupError0.00test_console_endpoint.py
test_01_deploy_vm_with_extraconfig_throws_exception_kvmError0.09test_deploy_vm_extra_config_data.py
test_02_deploy_vm_with_extraconfig_kvmError0.07test_deploy_vm_extra_config_data.py
test_03_update_vm_with_extraconfig_kvmError0.07test_deploy_vm_extra_config_data.py
ContextSuite context=TestDeployVmRootSize>:setupError0.00test_deploy_vm_root_resize.py
ContextSuite context=TestHostControlState>:setupError27.26test_host_control_state.py
ContextSuite context=TestImportAndUnmanageVolumes>:setupError0.00test_import_unmanage_volumes.py
test_11_test_unmanaged_cluster_lifecycleError3.26test_kubernetes_clusters.py
ContextSuite context=TestListVolumes>:setupError0.00test_list_volumes.py
ContextSuite context=TestNetworkMigration>:setupError0.00test_migration.py
test_03_network_operations_on_created_vm_of_otheruserError1.22test_network_permissions.py
test_04_deploy_vm_for_other_user_and_test_vm_operationsFailure0.05test_network_permissions.py
ContextSuite context=TestSharedNetwork>:setupError46.45test_network.py
test_01_nicError0.06test_nic.py
test_01_non_strict_host_anti_affinityError2.25test_nonstrict_affinity_group.py
test_02_non_strict_host_affinityError1.16test_nonstrict_affinity_group.py
ContextSuite context=TestL2PersistentNetworks>:setupError0.00test_persistent_network.py
test_01_add_primary_storage_disabled_hostFailure0.06test_primary_storage.py
test_01_primary_storage_iscsiFailure0.06test_primary_storage.py
test_01_primary_storage_nfsFailure0.06test_primary_storage.py
ContextSuite context=TestStorageTags>:setupError0.13test_primary_storage.py
ContextSuite context=TestPrivateGwACLOvsGRE>:setupError0.00test_privategw_acl_ovs_gre.py
ContextSuite context=TestTemplates>:setupError34.65test_templates.py
test_01_positive_tests_usageFailure3.07test_usage_events.py
ContextSuite context=TestLBRuleUsage>:setupError2.27test_usage.py
ContextSuite context=TestNatRuleUsage>:setupError2.33test_usage.py
ContextSuite context=TestPublicIPUsage>:setupError2.39test_usage.py
ContextSuite context=TestSnapshotUsage>:setupError2.45test_usage.py
ContextSuite context=TestTemplateUsage>:setupError2.51test_usage.py
ContextSuite context=TestVmUsage>:setupError2.56test_usage.py
ContextSuite context=TestVolumeUsage>:setupError2.67test_usage.py
ContextSuite context=TestVpnUsage>:setupError2.73test_usage.py
ContextSuite context=TestVmAutoScaling>:setupError0.00test_vm_autoscaling.py
test_01_deploy_vm_on_specific_hostError0.04test_vm_deployment_planner.py
test_02_deploy_vm_on_specific_clusterError0.03test_vm_deployment_planner.py
test_03_deploy_vm_on_specific_podError0.07test_vm_deployment_planner.py
test_04_deploy_vm_on_host_override_pod_and_clusterError0.09test_vm_deployment_planner.py
test_05_deploy_vm_on_cluster_override_podError0.06test_vm_deployment_planner.py
ContextSuite context=TestDeployVM>:setupError0.00test_vm_life_cycle.py
ContextSuite context=TestKVMLiveMigration>:setupError0.00test_vm_life_cycle.py
ContextSuite context=TestMigrateVMwithVolume>:setupError0.00test_vm_life_cycle.py
ContextSuite context=TestSecuredVmMigration>:setupError0.00test_vm_life_cycle.py
ContextSuite context=TestVMLifeCycle>:setupError0.06test_vm_life_cycle.py
ContextSuite context=TestUnmanageVM>:setupError0.00test_vm_lifecycle_unmanage_import.py
ContextSuite context=TestVMSchedule>:setupError0.00test_vm_schedule.py
ContextSuite context=TestVmSnapshot>:setupError0.06test_vm_snapshots.py
ContextSuite context=TestVnfTemplates>:setupError0.00test_vnf_templates.py
ContextSuite context=TestCreateVolume>:setupError0.00test_volumes.py
ContextSuite context=TestVolumeEncryption>:setupError0.00test_volumes.py
ContextSuite context=TestVolumes>:setupError0.00test_volumes.py
test_02_cancel_host_maintenace_with_migration_jobsFailure0.12test_host_maintenance.py
test_03_cancel_host_maintenace_with_migration_jobs_failureError0.20test_host_maintenance.py
ContextSuite context=TestHostMaintenanceAgents>:setupError0.28test_host_maintenance.py

@sureshanaparti

Copy link
Copy Markdown
Contributor

@blueorangutan LLtest

@blueorangutan

Copy link
Copy Markdown

@sureshanaparti a [LL] Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests

@sureshanaparti

Copy link
Copy Markdown
Contributor

[SF] Trillian test result (tid-10664) Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7 Total time taken: 35009 seconds Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr9283-t10664-kvm-centos7.zip Smoke tests completed. 97 look OK, 34 have errors, 0 did not run

these failures are due to templates listing issue & builtin template deleted during the tests.

@sureshanaparti

Copy link
Copy Markdown
Contributor

Manually verified the config change.

@sureshanaparti
sureshanaparti merged commit a4e9d7f into apache:4.19Jun 28, 2024
@vishesh92
vishesh92 deleted the make-vm-stat-remove-config-generic branch June 28, 2024 10:02
dhslove pushed a commit to ablecloud-team/ablestack-cloud that referenced this pull request Jul 2, 2024
…delete of volume_stats in batches (apache#9283)
* Change vm.stats.remove.batch.size to delete.batch.query.size
* Add support for deletion of volume stats in batches
* Update server/src/main/java/com/cloud/configuration/ConfigurationManagerImpl.java
Co-authored-by: Suresh Kumar Anaparti <sureshkumar.anaparti@gmail.com>
* Update server/src/main/java/com/cloud/configuration/ConfigurationManagerImpl.java
Co-authored-by: Suresh Kumar Anaparti <sureshkumar.anaparti@gmail.com>
* Update configkey description
* Address comments
Co-authored-by: Suresh Kumar Anaparti <sureshkumar.anaparti@gmail.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

6 participants

@vishesh92@blueorangutan@JoaoJandre@sureshanaparti@yadvr@shwstppr