Skip to content

Conversation

@ustcweizhou
Copy link
Contributor

Description

vm.serviceoffering.cpu.cores.max and vm.serviceoffering.ram.size.max

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)

Screenshots (if appropriate):

How Has This Been Tested?

@ustcweizhou ustcweizhou changed the title Add global configuration for cpu/ram limitation in service offerings Add global configuration for max cpu/ram in service offerings Oct 6, 2020
Copy link
Contributor

@DaanHoogland DaanHoogland left a comment

Choose a reason for hiding this comment

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

code looks good, will need some testing

@DaanHoogland DaanHoogland requested a review from Pearl1594 October 6, 2020 11:28
@Pearl1594
Copy link
Contributor

@blueorangutan package

@blueorangutan
Copy link

@Pearl1594 a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.

@blueorangutan
Copy link

Packaging result: ✔centos7 ✖centos8 ✔debian. JID-2129

Copy link
Contributor

@Pearl1594 Pearl1594 left a comment

Choose a reason for hiding this comment

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

LGTM
Verified the fix:

  1. Set "vm.serviceoffering.cpu.cores.max" to 2 and attempted to create a compute offering with CPU cores set to 4 - Failed (as expected)
    image

  2. Set "vm.serviceoffering.ram.size.max" to 200 and attempted to create a service offering with memory of 500 MB - Failed (as expected)
    image

  3. Created a service offering within the defined limits of vm.serviceoffering.cpu.cores.max = 2 and vm.serviceoffering.ram.size.max = 200 - Passed (as expected)

@Pearl1594
Copy link
Contributor

@blueorangutan test

@blueorangutan
Copy link

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

@weizhouapache
Copy link
Member

LGTM
Verified the fix:

  1. Set "vm.serviceoffering.cpu.cores.max" to 2 and attempted to create a compute offering with CPU cores set to 4 - Failed (as expected)
    image
  2. Set "vm.serviceoffering.ram.size.max" to 200 and attempted to create a service offering with memory of 500 MB - Failed (as expected)
    image
  3. Created a service offering within the defined limits of vm.serviceoffering.cpu.cores.max = 2 and vm.serviceoffering.ram.size.max = 200 - Passed (as expected)

thanks @Pearl1594 !
Could you also test dynamic offerings (constrained and unconstrained) ?

@Pearl1594
Copy link
Contributor

@ustcweizhou Custom Constrained and Custom Unconstrained service offerings do not adhere to the set global settings, and get created successfully despite having the the min and/or max cpu cores and memory values set above configured threshold - which is what is expected (I reckon).

However, with Custom Constrained Compute offering type - when the min cpu cores / min memory is set above its max values - it still successfully creates the offering - shouldn't this ideally fail?
image

@weizhouapache
Copy link
Member

@ustcweizhou Custom Constrained and Custom Unconstrained service offerings do not adhere to the set global settings, and get created successfully despite having the the min and/or max cpu cores and memory values set above configured threshold - which is what is expected (I reckon).

However, with Custom Constrained Compute offering type - when the min cpu cores / min memory is set above its max values - it still successfully creates the offering - shouldn't this ideally fail?
image

@Pearl1594 yes, you are right.
However, when you create vm with dynamic offerings, or update vm to new offerings, cpu/ram should be checked as well.

@blueorangutan
Copy link

Trillian test result (tid-2900)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 37774 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr4379-t2900-kvm-centos7.zip
Intermittent failure detected: /marvin/tests/smoke/test_loadbalance.py
Intermittent failure detected: /marvin/tests/smoke/test_vpc_redundant.py
Intermittent failure detected: /marvin/tests/smoke/test_hostha_kvm.py
Smoke tests completed. 83 look OK, 2 have error(s)
Only failed tests results shown below:

Test Result Time (s) Test File
test_05_rvpc_multi_tiers Failure 292.84 test_vpc_redundant.py
test_hostha_kvm_host_fencing Error 168.22 test_hostha_kvm.py

@Pearl1594
Copy link
Contributor

Thanks @ustcweizhou , the check does happen when the offering is consumed during VM deployment.

@rohityadavcloud rohityadavcloud added this to the 4.15.0.0 milestone Oct 14, 2020
@rohityadavcloud rohityadavcloud merged commit 2acd87c into apache:master Oct 14, 2020
Sign up for free to 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.

7 participants