Skip to content

Improvement: management server peer states - #9885

Merged
yadvr merged 9 commits into
apache:4.20from
weizhouapache:4.20-mgmt-server-peers
Dec 2, 2024
Merged

Improvement: management server peer states#9885
yadvr merged 9 commits into
apache:4.20from
weizhouapache:4.20-mgmt-server-peers

Conversation

@weizhouapache

@weizhouapacheweizhouapache commented Nov 4, 2024

Copy link
Copy Markdown
Member

Description

This PR improves the peers management servers and provides better peer states based on the mgmt server statistics sync.

Old diagram:
 FR80 - Mgmt server heartbeat-old drawio

new diagram:
 FR80 - Mgmt server heartbeat-new drawio

Test results:

ActionsCurrentNew
stop cloudstack-managementmshost.state is Down immediately,
mshost_peer.peer_state is Down after 3mins
Same as current
restart cloudstack-managementmshost.state is Down immediately and Up later.
mshost_peer.peer_state is Up during the period.
There are some leftover peers with old peer_runid.
mshost.state is Down immediately and Up later.
mshost_peer.peer_state is Up during the period.
records with old peer_runid is removed.
pkill javasame as "stop cloudstack-management"Same as current
kill -9 `pid of java process`mshost.state is still Up.
mshost_peer.peer_state is Down after 3 mins.
mshost.state and mshost_peer.peer_state are Down after 3-4 mins.
hard shutdown (echo o > /proc/sysrq-trigger)same as "kill -9"mshost.state and mshost_peer.peer_state are Down after 3-4 mins.
hard reset (echo b > /proc/sysrq-trigger)same as "kill -9"mshost.state and mshost_peer.peer_state are Down after 3-4 mins.
cannot write to dbsame as "kill -9". When link is recovered, exit with code 219mshost.state and mshost_peer.peer_state are Down after 3-4 mins.
When link is recovered, exit with code 219
cannot communicate with other mgmt nodesnothing changedSame as current
mgmt link is downsame as "kill -9" as eth0 is also used to connect to db.
otherwise it should be same as "cannot communicate with other nodes"
Same as current

New tab "Peers" for each management server on UI.

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
  • test (unit or integration test code)

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?

@weizhouapache

Copy link
Copy Markdown
MemberAuthor

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

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

@weizhouapache

Copy link
Copy Markdown
MemberAuthor

@blueorangutan package

@codecov

codecovBot commented Nov 4, 2024

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 0% with 231 lines in your changes missing coverage. Please review.

Project coverage is 15.98%. Comparing base (f7b7339) to head (880c3d9).
Report is 22 commits behind head on 4.20.

Files with missing linesPatch %Lines
.../cloud/cluster/ManagementServerHostPeerJoinVO.java0.00%60 Missing ⚠️
...ain/java/com/cloud/cluster/ClusterManagerImpl.java0.00%50 Missing ⚠️
...api/response/PeerManagementServerNodeResponse.java0.00%28 Missing ⚠️
...d/cluster/dao/ManagementServerHostPeerDaoImpl.java0.00%27 Missing ⚠️
...ain/java/com/cloud/api/query/QueryManagerImpl.java0.00%22 Missing ⚠️
...src/main/java/com/cloud/server/StatsCollector.java0.00%12 Missing ⚠️
...udstack/api/response/ManagementServerResponse.java0.00%11 Missing ⚠️
...uster/dao/ManagementServerHostPeerJoinDaoImpl.java0.00%11 Missing ⚠️
...m/cloud/server/ManagementServerHostStatsEntry.java0.00%6 Missing ⚠️
...ack/api/command/admin/management/ListMgmtsCmd.java0.00%3 Missing ⚠️
... and 1 more
Additional details and impacted files
@@ Coverage Diff @@## 4.20 #9885 +/- ##
============================================
+ Coverage 15.80% 15.98% +0.17% - Complexity 12586 12772 +186 
============================================
Files 5627 5631 +4 Lines 492294 499767 +7473 Branches 62198 63247 +1049 ============================================
+ Hits 77824 79869 +2045 - Misses 405946 411052 +5106 - Partials 8524 8846 +322 
FlagCoverage Δ
uitests4.04% <ø> (-0.01%)⬇️
unittests16.62% <0.00%> (-0.01%)⬇️

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.

@blueorangutan

Copy link
Copy Markdown

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

@weizhouapache

Copy link
Copy Markdown
MemberAuthor

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@weizhouapache 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]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 11495

@weizhouapache

Copy link
Copy Markdown
MemberAuthor

@blueorangutan test

@blueorangutan

Copy link
Copy Markdown

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

@blueorangutan

Copy link
Copy Markdown

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

TestResultTime (s)Test File

@weizhouapache

Copy link
Copy Markdown
MemberAuthor

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@weizhouapache 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]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 11507

@weizhouapache

Copy link
Copy Markdown
MemberAuthor

@blueorangutan test

@blueorangutan

Copy link
Copy Markdown

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

@blueorangutan

Copy link
Copy Markdown

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

TestResultTime (s)Test File
test_01_secure_vm_migrationError134.23test_vm_life_cycle.py
test_01_secure_vm_migrationError134.23test_vm_life_cycle.py

@blueorangutan

Copy link
Copy Markdown

@weizhouapache 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]: ✖️ el8 ✖️ el9 ✔️ debian ✖️ suse15. SL-JID 11619

@weizhouapache

Copy link
Copy Markdown
MemberAuthor

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@weizhouapache 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]: ✖️ el8 ✖️ el9 ✖️ debian ✖️ suse15. SL-JID 11627

@blueorangutan

Copy link
Copy Markdown

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

@blueorangutan

Copy link
Copy Markdown

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

@weizhouapache

Copy link
Copy Markdown
MemberAuthor

@blueorangutan test

@blueorangutan

Copy link
Copy Markdown

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

@blueorangutan

Copy link
Copy Markdown

[SF] Trillian Build Failed (tid-11812)

@yadvr
yadvr marked this pull request as ready for review November 29, 2024 07:31
@yadvr

Copy link
Copy Markdown
Member

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

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

@weizhouapache

Copy link
Copy Markdown
MemberAuthor

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@weizhouapache 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]: ✖️ el8 ✖️ el9 ✖️ debian ✖️ suse15. SL-JID 11646

@blueorangutan

Copy link
Copy Markdown

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

@weizhouapache

Copy link
Copy Markdown
MemberAuthor

@blueorangutan test

@blueorangutan

Copy link
Copy Markdown

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

@blueorangutan

Copy link
Copy Markdown

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

TestResultTime (s)Test File

@yadvr
yadvr merged commit 34056d9 into apache:4.20Dec 2, 2024
@DaanHoogland
DaanHoogland deleted the 4.20-mgmt-server-peers branch December 2, 2024 07:55
dhslove pushed a commit to ablecloud-team/ablestack-cloud that referenced this pull request Dec 12, 2024
* Improvement: management server peer states
* Update pr9885: consider new mgmt server node which has msId=managementServerNodeId
* Update pr9885: update global config description
* Update pr9885: update label on UI
* framework: Do not update mshost_peer when mgmt server is Up as it will be updated by status update
* mgmt: Update state to Up when mgmt server writes heartbeat to db
* mgmt: change Service IP to Management IP
---------
Co-authored-by: Boris Stoyanov - a.k.a Bobby <bss.stoyanov@gmail.com>
@Pearl1594Pearl1594 moved this to Done in ACS 4.20.1Mar 17, 2025
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

6 participants

@weizhouapache@blueorangutan@borisstoyanov@yadvr@DaanHoogland@Pearl1594