Skip to content

Fix exceeding of resource limits with powerflex - #9008

Merged
yadvr merged 4 commits into
apache:mainfrom
shapeblue:fixup-limits-exceed-scaleio
May 8, 2024
Merged

Fix exceeding of resource limits with powerflex#9008
yadvr merged 4 commits into
apache:mainfrom
shapeblue:fixup-limits-exceed-scaleio

Conversation

@vishesh92

Copy link
Copy Markdown
Member

Description

Because we have the condition that a powerflex/scaleio volume can be a size /8 the user can exploit this and request a smaller number without exceeding the limit, but eventually PF will deploy a volume of size [req-size ]< and /8, thus allowing the user to break the limit

STEPS TO REPRODUCE

  1. Set a tag limit of 6GB
  2. Deploy a volume with the offering of the tag limit and override the size to '5'
  3. Cloudstack will consider correctly that request is within the tag limit 5<6, but will eventually deploy a volume with 8 GB exceeding the limit
  4. After syncing resource counts this the error becomes evident.
    image

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

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?

@vishesh92vishesh92 changed the title Fixup limits exceed scaleioFixup resource limits exceeding with scaleioApr 30, 2024
@vishesh92vishesh92 changed the title Fixup resource limits exceeding with scaleioFix exceeding of resource limits with powerflexApr 30, 2024
@vishesh92
vishesh92force-pushed the fixup-limits-exceed-scaleio branch 2 times, most recently from 09183d3 to b3b53a7CompareApril 30, 2024 10:29
@vishesh92

Copy link
Copy Markdown
MemberAuthor

@blueorangutan package

Comment threadserver/src/main/java/com/cloud/vm/UserVmManagerImpl.java Outdated

@sureshanapartisureshanaparti 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.

clgtm

@codecov-commenter

codecov-commenter commented Apr 30, 2024

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 11.11111% with 96 lines in your changes are missing coverage. Please review.

Project coverage is 15.28%. Comparing base (e9ff270) to head (09f188e).

❗ Current head 09f188e differs from pull request most recent head f9e96af. Consider uploading reports for the commit f9e96af to get more accurate results

FilesPatch %Lines
.../src/main/java/com/cloud/vm/UserVmManagerImpl.java12.00%35 Missing and 9 partials ⚠️
...stack/engine/orchestration/VolumeOrchestrator.java0.00%26 Missing ⚠️
...n/java/com/cloud/storage/VolumeApiServiceImpl.java0.00%11 Missing ⚠️
.../cloud/resourcelimit/ResourceLimitManagerImpl.java0.00%10 Missing ⚠️
.../subsystem/api/storage/PrimaryDataStoreDriver.java0.00%3 Missing ⚠️
...n/java/com/cloud/vm/VirtualMachineManagerImpl.java0.00%1 Missing ⚠️
...atastore/driver/ScaleIOPrimaryDataStoreDriver.java85.71%0 Missing and 1 partial ⚠️
Additional details and impacted files
@@ Coverage Diff @@## main #9008 +/- ##
============================================
+ Coverage 4.26% 15.28% +11.01% - Complexity 0 11528 +11528 
============================================
Files 363 5425 +5062 Lines 29565 474074 +444509 Branches 5190 61618 +56428 ============================================
+ Hits 1262 72462 +71200 - Misses 28160 393553 +365393 - Partials 143 8059 +7916 
FlagCoverage Δ
uitests4.26% <ø> (ø)
unittests16.01% <11.11%> (?)

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.

@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 9487

@vishesh92

Copy link
Copy Markdown
MemberAuthor

@blueorangutan test

@blueorangutan

Copy link
Copy Markdown

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

@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

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

TestResultTime (s)Test File
test_01_events_resourceError435.40test_events_resource.py
test_create_pvlan_networkError0.07test_pvlan.py
test_01_restore_vmError0.20test_restore_vm.py
test_02_restore_vm_with_disk_offeringError0.14test_restore_vm.py
test_03_restore_vm_with_disk_offering_custom_sizeError0.14test_restore_vm.py
test_04_restore_vm_allocated_rootError0.14test_restore_vm.py
ContextSuite context=TestRestoreVM>:teardownError1.24test_restore_vm.py
test_01_create_redundant_VPC_2tiers_4VMs_4IPs_4PF_ACLFailure390.50test_vpc_redundant.py
test_01_redundant_vpc_site2site_vpnFailure442.61test_vpc_vpn.py

@blueorangutan

Copy link
Copy Markdown

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

@vishesh92

Copy link
Copy Markdown
MemberAuthor

@blueorangutan test

@blueorangutan

Copy link
Copy Markdown

@vishesh92 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-10140)

@vishesh92

Copy link
Copy Markdown
MemberAuthor

@blueorangutan test

@blueorangutan

Copy link
Copy Markdown

@vishesh92 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-10148)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 53386 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr9008-t10148-kvm-centos7.zip
Smoke tests completed. 127 look OK, 4 have errors, 0 did not run
Only failed and skipped tests results shown below:

TestResultTime (s)Test File
test_01_events_resourceError432.41test_events_resource.py
ContextSuite context=TestRestoreVM>:setupError0.00test_restore_vm.py
test_02_trigger_shutdownFailure346.72test_safe_shutdown.py
test_02_list_cpvm_vmFailure0.05test_ssvm.py
test_04_cpvm_internalsFailure0.05test_ssvm.py
test_12_destroy_cpvmError3.19test_ssvm.py

@vishesh92
vishesh92force-pushed the fixup-limits-exceed-scaleio branch from dc000a9 to 09f188eCompareMay 7, 2024 05:05
@apacheapache deleted a comment from blueorangutanMay 7, 2024
@apacheapache deleted a comment from blueorangutanMay 7, 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.

@blueorangutan

Copy link
Copy Markdown

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

@vishesh92
vishesh92force-pushed the fixup-limits-exceed-scaleio branch from 09f188e to f9e96afCompareMay 7, 2024 07:51
@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 9559

@borisstoyanov

Copy link
Copy Markdown
Contributor

@blueorangutan test keepEnv

@blueorangutan

Copy link
Copy Markdown

@borisstoyanov 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-10180)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 51401 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr9008-t10180-kvm-centos7.zip
Smoke tests completed. 130 look OK, 1 have errors, 0 did not run
Only failed and skipped tests results shown below:

TestResultTime (s)Test File
test_01_events_resourceError418.47test_events_resource.py

@borisstoyanovborisstoyanov 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, manually checked that the limit is honoured when producing larger volume with Powerflex

@yadvr
yadvr marked this pull request as ready for review May 8, 2024 15:24
@yadvr
yadvr merged commit 21af134 into apache:mainMay 8, 2024
@yadvr
yadvr deleted the fixup-limits-exceed-scaleio branch May 8, 2024 15:25
@yadvryadvr added this to the 4.20.0.0 milestone May 8, 2024
dhslove pushed a commit to ablecloud-team/ablestack-cloud that referenced this pull request May 17, 2024
* Fix exceeding of resource limits with powerflex
* Add e2e tests
* Update server/src/main/java/com/cloud/vm/UserVmManagerImpl.java
Co-authored-by: Suresh Kumar Anaparti <sureshkumar.anaparti@gmail.com>
* fixup
---------
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

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

@vishesh92@codecov-commenter@sureshanaparti@blueorangutan@borisstoyanov@yadvr