Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev: migration: implement corosync.conf migration for corosync 3 (jsc#PED-8252) #1422

Draft
wants to merge 26 commits into
base: master
Choose a base branch
from

Conversation

nicholasyang2022
Copy link
Collaborator

@nicholasyang2022 nicholasyang2022 commented May 16, 2024

This pull request implements migrating corosync.conf from corosync 2 to corosync 3, including:

  • migrate deprecated transport udpu and udp to knet
  • replace removed feature RRP with knet multilink
  • if crypto_hash is set to sha1, which is the default value in corosync 2, upgrades it to the new default in corosync 3, sha256.

Use Cases

Check When cluster services are running

> sudo crm cluster health sles16
------ localhost ------
[INFO] Checking dependency version...
[INFO] Checking service status...
[PASS]

------ ha-2-2 ------
[FAIL] Cluster services are running
       * corosync
       * pacemaker

Check When All Green for Migration

> sudo crm cluster health sles16
------ localhost ------
[INFO] Checking dependency version...
[INFO] Checking service status...
[PASS]

------ ha-2-2 ------
[PASS]

Run Migration

> sudo crm cluster health sles16 --fix
------ localhost ------
[INFO] Checking dependency version...
[INFO] Checking service status...
[PASS]

------ ha-2-2 ------
[PASS]
INFO: Starting migration...
INFO: Migrating corosync configuration...
INFO: Upgrade totem.transport to knet.
INFO: Upgrade totem.crypto_hash from "sha1" to "sha256".
INFO: Finish migrating corosync configuration.
INFO: Finished migration.

Copy link

codecov bot commented May 16, 2024

Codecov Report

Attention: Patch coverage is 66.17336% with 160 lines in your changes missing coverage. Please review.

Project coverage is 69.66%. Comparing base (325350b) to head (7226465).
Report is 4 commits behind head on master.

Files with missing lines Patch % Lines
crmsh/migration.py 63.59% 150 Missing ⚠️
crmsh/ui_cluster.py 73.68% 10 Missing ⚠️
Additional details and impacted files
Flag Coverage Δ
integration 53.76% <65.75%> (+0.21%) ⬆️
unit 52.63% <23.67%> (-0.48%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
crmsh/cibquery.py 100.00% <100.00%> (ø)
crmsh/corosync.py 87.64% <100.00%> (ø)
crmsh/prun/runner.py 64.86% <100.00%> (+0.97%) ⬆️
crmsh/sh.py 92.50% <ø> (+0.41%) ⬆️
crmsh/xmlutil.py 69.35% <100.00%> (+0.03%) ⬆️
crmsh/ui_cluster.py 74.33% <73.68%> (-0.82%) ⬇️
crmsh/migration.py 63.59% <63.59%> (ø)

... and 2 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@nicholasyang2022 nicholasyang2022 force-pushed the ped-8252-20240516 branch 5 times, most recently from 3c620cf to 2d4c6db Compare May 27, 2024 08:05
@nicholasyang2022 nicholasyang2022 force-pushed the ped-8252-20240516 branch 2 times, most recently from fdcdc65 to c6cd605 Compare October 23, 2024 03:52
@nicholasyang2022 nicholasyang2022 force-pushed the ped-8252-20240516 branch 3 times, most recently from 04ea10f to 69020cc Compare November 1, 2024 04:21
@nicholasyang2022 nicholasyang2022 force-pushed the ped-8252-20240516 branch 5 times, most recently from fa10732 to 68bd445 Compare January 2, 2025 09:14
@liangxin1300
Copy link
Collaborator

In

# crm cluster health sles16
------ localhost ------
[INFO] Checking dependency version...
[FAIL] Pacemaker version not supported
       Supported version: 3 <= Pacemaker
       Actual version:    Pacemaker == 2.1.9

Supported version: 3 <= Pacemaker better changed similar as Supported version: Pacemaker >= 3

@liangxin1300
Copy link
Collaborator

# crm cluster health sles16
------ localhost ------
[INFO] Checking dependency version...
[FAIL] Pacemaker version not supported
       Supported version: 3 <= Pacemaker
       Actual version:    Pacemaker == 2.1.9
[INFO] Checking service status...
[FAIL] Cluster services are running
       * corosync
       * pacemaker
[INFO] Checking used corosync features...

------ alp-3 ------



------ alp-2 ------

No output for remote nodes

@zzhou1
Copy link
Contributor

zzhou1 commented Jan 6, 2025

[FAIL] Cluster services are running
* corosync
* pacemaker

FAIL as the fatal error sounds too strong to me.

No matter it is corosync2 or corosync3 environment, nothing wrong to run crm cluster health sles16 no matter the cluster is running or not.

@nicholasyang2022 nicholasyang2022 force-pushed the ped-8252-20240516 branch 2 times, most recently from 486020b to 16cd739 Compare January 23, 2025 07:31
so that it can run in a seperated thread
…PED-11808)

should use recursive queries

(cherry picked from commit 4b7e42d)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants