Skip to content

cpvm: Fix CPVM not releasing CPU after closing console - #7826

Merged
DaanHoogland merged 7 commits into
apache:4.18from
scclouds:fix-console-proxy-not-closing-connection
Aug 18, 2023
Merged

DaanHoogland merged 7 commits into
apache:4.18from
scclouds:fix-console-proxy-not-closing-connection

Conversation

@JoaoJandre

Copy link
Copy Markdown
Contributor

Description

When using VNC over Nio socket, even after closing the console, the CPVM stays in a while true and will not stop using resources until a restart. This PR introduces a new verification to check if the session is still alive.

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

Feature/Enhancement Scale

  • Major
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

How Has This Been Tested?

@JoaoJandre

Copy link
Copy Markdown
Contributor Author

I'm still validating what happens when using vnc over websocket

@GutoVeronezi
GutoVeronezi requested a review from nvazquez August 7, 2023 19:38
@codecov

codecov Bot commented Aug 7, 2023

Copy link
Copy Markdown

Codecov Report

Merging #7826 (b7820b3) into 4.18 (a47a4f4) will increase coverage by 0.01%.
Report is 6 commits behind head on 4.18.
The diff coverage is n/a.

@@             Coverage Diff              @@
##               4.18    #7826      +/-   ##
============================================
+ Coverage     13.02%   13.04%   +0.01%     
- Complexity     9040     9067      +27     
============================================
  Files          2720     2720              
  Lines        257094   257234     +140     
  Branches      40092    40102      +10     
============================================
+ Hits          33491    33552      +61     
- Misses       219398   219472      +74     
- Partials       4205     4210       +5     

see 9 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@yadvr

yadvr commented Aug 8, 2023

Copy link
Copy Markdown
Member

@JoaoJandre can you raise this for 4.18 branch? I hit this issue with VMware recently with 4.18 but didn't know what caused it.

@yadvr yadvr added this to the 4.18.1.0 milestone Aug 8, 2023
@yadvr yadvr added the type:bug label Aug 8, 2023
@yadvr
yadvr changed the base branch from main to 4.18 August 8, 2023 10:28
@yadvr
yadvr changed the base branch from 4.18 to main August 8, 2023 10:28
@yadvr

yadvr commented Aug 8, 2023

Copy link
Copy Markdown
Member

@JoaoJandre could you also check #6970 cc @alexandru-bagu - if this is a better fix?

cc @DaanHoogland @weizhouapache

@yadvr yadvr added the Severity:Critical Critical bug label Aug 8, 2023
@JoaoJandre
JoaoJandre changed the base branch from main to 4.18 August 8, 2023 17:34
@JoaoJandre
JoaoJandre force-pushed the fix-console-proxy-not-closing-connection branch from 140f033 to 128852e Compare August 8, 2023 17:39
@JoaoJandre

Copy link
Copy Markdown
Contributor Author

@JoaoJandre could you also check #6970 cc @alexandru-bagu - if this is a better fix?

@rohityadavcloud, actually there are two adjacent problems happening in the CPVM: the first one is the high CPU consumption on the CPVM; and the second one is processes not being released after closing the console session. This PR aims to fix the second situation; and PR #6970 aims to fix the first situation; therefore, I think that both issues should be treated in separated PRs (as it is currently).

@yadvr

yadvr commented Aug 8, 2023

Copy link
Copy Markdown
Member

Thanks for replying that makes sense. In that case we should aspire to get both merged.

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@rohityadavcloud a [SF] 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 6712

@yadvr

yadvr commented Aug 9, 2023

Copy link
Copy Markdown
Member

Manual test on all supported hypervisors types may be needed cc @weizhouapache
@blueorangutan test

@blueorangutan

Copy link
Copy Markdown

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

@nvazquez nvazquez 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 - thanks @JoaoJandre

@blueorangutan

Copy link
Copy Markdown

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

Test Result Time (s) Test File
test_01_migrate_VM_and_root_volume Error 79.74 test_vm_life_cycle.py
test_02_migrate_VM_with_two_data_disks Error 55.42 test_vm_life_cycle.py

@DaanHoogland

Copy link
Copy Markdown
Contributor

code looks good @JoaoJandre , this is still work in progress?

@JoaoJandre
JoaoJandre marked this pull request as ready for review August 10, 2023 18:49
@JoaoJandre

Copy link
Copy Markdown
Contributor Author

code looks good @JoaoJandre , this is still work in progress?

I was just doing some testing, but the PR is ready now

@github-actions

Copy link
Copy Markdown

This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.

@JoaoJandre

Copy link
Copy Markdown
Contributor Author

@JoaoJandre can you fix the conflicts ? thanks

Done

@DaanHoogland

Copy link
Copy Markdown
Contributor

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@DaanHoogland a [SF] 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 6778

@DaanHoogland

Copy link
Copy Markdown
Contributor

@blueorangutan test rocky8 kvm-rocky8 keepEnv

@yadvr

yadvr commented Aug 15, 2023

Copy link
Copy Markdown
Member

I'm able to reproduce the issue with 4.18, restarting the cloud service on cpvm fixes this as a workaround.
PR LGTM, left some comments - but otherwise we should merge this.

Screenshot 2023-08-15 at 8 19 20 PM

@DaanHoogland

Copy link
Copy Markdown
Contributor

@blueorangutan test rocky8 kvm-rocky8 keepEnv

@blueorangutan

Copy link
Copy Markdown

@DaanHoogland a [SF] Trillian-Jenkins test job (rocky8 mgmt + kvm-rocky8) has been kicked to run smoke tests

@weizhouapache

Copy link
Copy Markdown
Member

@blueorangutan package

@weizhouapache weizhouapache left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

thanks @JoaoJandre
code lgtm

@blueorangutan

Copy link
Copy Markdown

[SF] Trillian test result (tid-7457)
Environment: kvm-rocky8 (x2), Advanced Networking with Mgmt server r8
Total time taken: 45588 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr7826-t7457-kvm-rocky8.zip
Smoke tests completed. 107 look OK, 1 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File
test_01_invalid_upgrade_kubernetes_cluster Failure 0.01 test_kubernetes_clusters.py
test_02_upgrade_kubernetes_cluster Failure 0.01 test_kubernetes_clusters.py
test_03_deploy_and_scale_kubernetes_cluster Failure 0.01 test_kubernetes_clusters.py
test_04_autoscale_kubernetes_cluster Failure 0.00 test_kubernetes_clusters.py
test_05_basic_lifecycle_kubernetes_cluster Failure 0.00 test_kubernetes_clusters.py
test_06_delete_kubernetes_cluster Failure 0.00 test_kubernetes_clusters.py
test_07_deploy_kubernetes_ha_cluster Failure 0.01 test_kubernetes_clusters.py
test_08_upgrade_kubernetes_ha_cluster Failure 0.01 test_kubernetes_clusters.py
test_09_delete_kubernetes_ha_cluster Failure 0.01 test_kubernetes_clusters.py
test_10_vpc_tier_kubernetes_cluster Failure 0.01 test_kubernetes_clusters.py

@weizhouapache

Copy link
Copy Markdown
Member

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@weizhouapache a [SF] 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 6822

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

tested looks good, load is immediately decreasing after closing the console:
image

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