Skip to content

resource limit: Fix resource limit check on VM start#5428

Merged
sureshanaparti merged 18 commits into
apache:mainfrom
shapeblue:fix-limit-checks
Sep 24, 2021
Merged

resource limit: Fix resource limit check on VM start#5428
sureshanaparti merged 18 commits into
apache:mainfrom
shapeblue:fix-limit-checks

Conversation

@Pearl1594
Copy link
Copy Markdown
Contributor

@Pearl1594 Pearl1594 commented Sep 9, 2021

Description

This PR addresses #4155 - wherein resource limits for an account aren't checked when a VM's settings i.e., cpuNumber / memory are updated i.e., VM deployed with custom constrained compute offering.

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)

Feature/Enhancement Scale or Bug Severity

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

How Has This Been Tested?

Set resource limit to a low value for domain admin:
image

Deployed a VM using custom constrained compute offering with cpuNumber = 1 and memory = 100MB
image

Updated VM settings with cpuNumber = 4 (max = 2) - Failed as expected:
image

Updated VM settings with memory = 1200 (max = 1000) - Failed as expected:
image

When VM settings for cpuNumber / memory is updated to a value exceeding the limit of the custom service offering used - Fails - check added to verify limits during vm update:
image

@Pearl1594 Pearl1594 added this to the 4.16.0.0 milestone Sep 9, 2021
@Pearl1594 Pearl1594 requested a review from nvazquez September 9, 2021 09:57
@Pearl1594
Copy link
Copy Markdown
Contributor Author

@blueorangutan package

@blueorangutan
Copy link
Copy Markdown

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

@blueorangutan
Copy link
Copy Markdown

Packaging result: ✔️ el7 ✔️ el8 ✔️ debian ✔️ suse15. SL-JID 1195

@Pearl1594
Copy link
Copy Markdown
Contributor Author

@blueorangutan test

@blueorangutan
Copy link
Copy Markdown

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

Comment thread server/src/main/java/com/cloud/vm/UserVmManagerImpl.java
Comment thread server/src/main/java/com/cloud/vm/UserVmManagerImpl.java Outdated
@blueorangutan
Copy link
Copy Markdown

Trillian test result (tid-1999)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 33673 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr5428-t1999-kvm-centos7.zip
Smoke tests completed. 88 look OK, 1 have errors
Only failed tests results shown below:

Test Result Time (s) Test File
test_02_list_snapshots_with_removed_data_store Error 51.24 test_snapshots.py

@Pearl1594
Copy link
Copy Markdown
Contributor Author

@blueorangutan package

@blueorangutan
Copy link
Copy Markdown

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

Comment thread server/src/main/java/com/cloud/vm/UserVmManagerImpl.java Outdated
Comment thread server/src/main/java/com/cloud/vm/UserVmManagerImpl.java Outdated
@blueorangutan
Copy link
Copy Markdown

Packaging result: ✖️ el7 ✖️ el8 ✖️ debian ✖️ suse15. SL-JID 1213

@Pearl1594
Copy link
Copy Markdown
Contributor Author

@blueorangutan package

@blueorangutan
Copy link
Copy Markdown

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

Comment thread server/src/main/java/com/cloud/vm/UserVmManagerImpl.java Outdated
Comment thread server/src/main/java/com/cloud/vm/UserVmManagerImpl.java Outdated
Comment thread server/src/main/java/com/cloud/vm/UserVmManagerImpl.java Outdated
Comment thread server/src/main/java/com/cloud/vm/UserVmManagerImpl.java Outdated
@blueorangutan
Copy link
Copy Markdown

Packaging result: ✖️ el7 ✖️ el8 ✖️ debian ✖️ suse15. SL-JID 1216

@weizhouapache
Copy link
Copy Markdown
Member

@Pearl1594
fyi, there is a component test test/integration/component/test_resource_count_running_vms.py
you can update the test if you like.

@Pearl1594
Copy link
Copy Markdown
Contributor Author

Thanks for the review @weizhouapache I'll address your comments and have a look at the component test.

@Pearl1594
Copy link
Copy Markdown
Contributor Author

@blueorangutan package

@blueorangutan
Copy link
Copy Markdown

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

@blueorangutan
Copy link
Copy Markdown

Packaging result: ✔️ el7 ✔️ el8 ✔️ debian ✔️ suse15. SL-JID 1336

@sureshanaparti
Copy link
Copy Markdown
Contributor

@blueorangutan test

@blueorangutan
Copy link
Copy Markdown

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

@DaanHoogland
Copy link
Copy Markdown
Contributor

@Pearl1594 the resource limit test in travis job 15 failed. I restarted it, can you keep an eye on it?

@Pearl1594
Copy link
Copy Markdown
Contributor Author

Sure @DaanHoogland - will keep an eye on it - seems like the following set of tests from that job are failing across other PRs too

+--------------------------------------+---------+-------+----------------+

|                 Test                 | Result  | Time  |   Test file    |

+======================================+=========+=======+================+

| test_02_list_publicip_domain_admin   | Failure | 0.146 | test_public_ip |

+--------------------------------------+---------+-------+----------------+

| test_03_list_publicip_user_domain    | Failure | 0.404 | test_public_ip |

+--------------------------------------+---------+-------+----------------+

| test_04_list_publicip_all_subdomains | Failure | 0.397 | test_public_ip |

+--------------------------------------+---------+-------+----------------+

| test_05_list_publicip_user_domain    | Failure | 2.632 | test_public_ip |

+--------------------------------------+---------+-------+----------------+

@weizhouapache
Copy link
Copy Markdown
Member

Sure @DaanHoogland - will keep an eye on it - seems like the following set of tests from that job are failing across other PRs too

+--------------------------------------+---------+-------+----------------+

|                 Test                 | Result  | Time  |   Test file    |

+======================================+=========+=======+================+

| test_02_list_publicip_domain_admin   | Failure | 0.146 | test_public_ip |

+--------------------------------------+---------+-------+----------------+

| test_03_list_publicip_user_domain    | Failure | 0.404 | test_public_ip |

+--------------------------------------+---------+-------+----------------+

| test_04_list_publicip_all_subdomains | Failure | 0.397 | test_public_ip |

+--------------------------------------+---------+-------+----------------+

| test_05_list_publicip_user_domain    | Failure | 2.632 | test_public_ip |

+--------------------------------------+---------+-------+----------------+

@Pearl1594
this seems to be caused by #5464 . I will look into it.

@Pearl1594
Copy link
Copy Markdown
Contributor Author

Alright @DaanHoogland Thanks!

@weizhouapache
Copy link
Copy Markdown
Member

@Pearl1594
I have created #5486 to fix the issue. let's see if travis passes.

@Pearl1594
Copy link
Copy Markdown
Contributor Author

@Pearl1594
I have created #5486 to fix the issue. let's see if travis passes.
Thanks @weizhouapache!

@blueorangutan
Copy link
Copy Markdown

Trillian test result (tid-2139)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 36154 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr5428-t2139-kvm-centos7.zip
Smoke tests completed. 89 look OK, 0 have errors
Only failed tests results shown below:

Test Result Time (s) Test File

@nvazquez nvazquez closed this Sep 23, 2021
@nvazquez nvazquez reopened this Sep 23, 2021
Comment thread server/src/main/java/com/cloud/vm/UserVmManagerImpl.java Outdated
@Pearl1594
Copy link
Copy Markdown
Contributor Author

@blueorangutan package

@blueorangutan
Copy link
Copy Markdown

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

@blueorangutan
Copy link
Copy Markdown

Packaging result: ✔️ el7 ✔️ el8 ✔️ debian ✔️ suse15. SL-JID 1369

@Pearl1594
Copy link
Copy Markdown
Contributor Author

@blueorangutan test

@blueorangutan
Copy link
Copy Markdown

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

@blueorangutan
Copy link
Copy Markdown

Trillian Build Failed (tid-2176)

@sureshanaparti
Copy link
Copy Markdown
Contributor

@blueorangutan test

@blueorangutan
Copy link
Copy Markdown

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

@blueorangutan
Copy link
Copy Markdown

Trillian test result (tid-2178)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 40219 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr5428-t2178-kvm-centos7.zip
Smoke tests completed. 89 look OK, 0 have errors
Only failed tests results shown below:

Test Result Time (s) Test File

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants