cloudstack icon indicating copy to clipboard operation
cloudstack copied to clipboard

Fixes #6621 - Update host memory stats

Open Rubueno opened this issue 2 years ago • 25 comments

Description

This PR ensures that when getMemStat() is called in KVM environments, the hosts actual used memory is returned, and not a static value that was retrieved when the cloudstack-agent was started.

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)
  • [x] Enhancement (improves an existing feature and functionality)
  • [ ] Cleanup (Code refactoring and cleanup, that may add test cases)

Feature/Enhancement Scale

Feature/Enhancement Scale

  • [ ] Major
  • [x] Minor

Screenshots (if appropriate):

How Has This Been Tested?

We have applied this patch into our own environment, built the packages and installed them on the managers and hosts. We then migrated VMs between hosts and saw the host memory usage being updated, instead of remaining static until the cloudstack-agent was restarted.

Rubueno avatar Aug 09 '22 18:08 Rubueno

Found UI changes, kicking a new UI QA build @blueorangutan ui

acs-robot avatar Aug 09 '22 18:08 acs-robot

@acs-robot a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.

blueorangutan avatar Aug 09 '22 18:08 blueorangutan

UI build: :heavy_check_mark: Live QA URL: http://qa.cloudstack.cloud:8080/client/pr/6622 (SL-JID-2118)

blueorangutan avatar Aug 09 '22 18:08 blueorangutan

@Rubueno can you change the base branch of this PR to 4.17 and rebase your PR branch on 4.17?

rohityadavcloud avatar Aug 09 '22 18:08 rohityadavcloud

Found UI changes, kicking a new UI QA build @blueorangutan ui

acs-robot avatar Aug 09 '22 18:08 acs-robot

component:networking was added by mistake

Rubueno avatar Aug 09 '22 18:08 Rubueno

Found UI changes, kicking a new UI QA build @blueorangutan ui

acs-robot avatar Aug 09 '22 18:08 acs-robot

@acs-robot a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.

blueorangutan avatar Aug 09 '22 18:08 blueorangutan

Found UI changes, kicking a new UI QA build @blueorangutan ui

acs-robot avatar Aug 09 '22 18:08 acs-robot

@acs-robot a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.

blueorangutan avatar Aug 09 '22 19:08 blueorangutan

@Rubueno can you change the base branch of this PR to 4.17 and rebase your PR branch on 4.17?

Done as requested. Please let me know if there's something missing or done incorrect.

Rubueno avatar Aug 09 '22 19:08 Rubueno

UI build: :heavy_check_mark: Live QA URL: http://qa.cloudstack.cloud:8080/client/pr/6622 (SL-JID-2119)

blueorangutan avatar Aug 09 '22 19:08 blueorangutan

UI build: :heavy_check_mark: Live QA URL: http://qa.cloudstack.cloud:8080/client/pr/6622 (SL-JID-2120)

blueorangutan avatar Aug 09 '22 19:08 blueorangutan

Codecov Report

Merging #6622 (f12cdc6) into 4.17 (6842583) will decrease coverage by 0.00%. The diff coverage is 0.00%.

@@             Coverage Diff              @@
##               4.17    #6622      +/-   ##
============================================
- Coverage      5.86%    5.86%   -0.01%     
  Complexity     3918     3918              
============================================
  Files          2451     2451              
  Lines        242238   242239       +1     
  Branches      37902    37902              
============================================
  Hits          14207    14207              
- Misses       226461   226462       +1     
  Partials       1570     1570              
Impacted Files Coverage Δ
...ervisor/kvm/resource/LibvirtComputingResource.java 16.00% <0.00%> (-0.01%) :arrow_down:

:mega: Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

codecov-commenter avatar Aug 09 '22 19:08 codecov-commenter

@blueorangutan package

rohityadavcloud avatar Aug 09 '22 19:08 rohityadavcloud

@rohityadavcloud a 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 avatar Aug 09 '22 19:08 blueorangutan

Packaging result: :heavy_check_mark: el7 :heavy_check_mark: el8 :heavy_check_mark: debian :heavy_check_mark: suse15. SL-JID 3954

blueorangutan avatar Aug 09 '22 20:08 blueorangutan

Rebased onto a missing commit. Please restart required workflows.

Rubueno avatar Aug 09 '22 21:08 Rubueno

@blueorangutan package

rohityadavcloud avatar Aug 10 '22 04:08 rohityadavcloud

@rohityadavcloud a 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 avatar Aug 10 '22 04:08 blueorangutan

Packaging result: :heavy_check_mark: el7 :heavy_check_mark: el8 :heavy_check_mark: debian :heavy_check_mark: suse15. SL-JID 3957

blueorangutan avatar Aug 10 '22 05:08 blueorangutan

@blueorangutan test

shwstppr avatar Aug 10 '22 11:08 shwstppr

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

blueorangutan avatar Aug 10 '22 11:08 blueorangutan

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

Test Result Time (s) Test File
test_08_upgrade_kubernetes_ha_cluster Failure 572.22 test_kubernetes_clusters.py

blueorangutan avatar Aug 10 '22 22:08 blueorangutan