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

Add 'crm sbd' sub-level (jsc#PED-8256) #1491

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

Conversation

liangxin1300
Copy link
Collaborator

@liangxin1300 liangxin1300 commented Jul 17, 2024

Motivation

The main configurations for sbd use cases are scattered among sysconfig,
on-disk meta data, CIB, and even could be related to other OS components
eg. coredump, SCSI, multipath.

It's desirable to reduce the management complexity among them and to
streamline the workflow for the main use case scenarios.

Changed include

Disk-based SBD scenarios

  1. Show usage when syntax error
  2. Completion
  3. Display SBD related configuration (UC4 in PED-8256)
  4. Change the on-disk meta data of the existing sbd disks (UC2.1 in PED-8256)
  5. Add a sbd disk with the existing sbd configuration (UC2.2 in PED-8256)
  6. Remove a sbd disk (UC2.3 in PED-8256)
  7. Remove sbd from cluster
  8. Replace the storage for a sbd disk (UC2.4 in PED-8256)]
  9. display status (focusing on the runtime information only) (UC5 in PED-8256)

Disk-less SBD scenarios

  1. Show usage when syntax error (diskless)
  2. completion (diskless)
  3. Display SBD related configuration (UC4 in PED-8256, diskless)
  4. Manipulate the basic diskless sbd configuration (UC3.1 in PED-8256)

@liangxin1300 liangxin1300 force-pushed the 20240614_crm_sbd_sublevel branch 2 times, most recently from 338ed50 to 2f10c6e Compare July 17, 2024 13:52
@liangxin1300
Copy link
Collaborator Author

liangxin1300 commented Jul 18, 2024

Disk-based SBD scenarios

1. Show usage when syntax error

# crm sbd configure xx
ERROR: Invalid argument: xx
Usage for disk-based SBD:
crm sbd configure show [disk_metadata|sysconfig|property]
crm sbd configure [device=<dev>]... [watchdog-timeout=<integer>] [allocate-timeout=<integer>] [loop-timeout=<integer>] [msgwait-timeout=<integer>] [watchdog-device=<dev>]

Usage for diskless SBD:
crm sbd configure show [sysconfig|property]
crm sbd configure device="" [watchdog-timeout=<integer>] [watchdog-device=<dev>]

More syntax errror cases
See https://github.com/liangxin1300/crmsh/blob/20240614_crm_sbd_sublevel/test/features/sbd_ui.feature

2. Completion

# crm sbd configure 
allocate-timeout=  loop-timeout=      show               watchdog-timeout=  
device=            msgwait-timeout=   watchdog-device=   

# crm sbd configure device=/dev/sda5 
allocate-timeout=  loop-timeout=      watchdog-device=   
device=            msgwait-timeout=   watchdog-timeout=  

# crm sbd configure device=/dev/sda5 watchdog-timeout=5 
allocate-timeout=  loop-timeout=      watchdog-device=   
device=            msgwait-timeout=   

# crm sbd configure show 
disk_metadata   property        sysconfig

3. Display SBD related configuration (UC4 in PED-8256)

# crm sbd configure show disk_metadata 
==Dumping header on disk /dev/sda5
Header version     : 2.1
UUID               : 7f04f327-3073-4121-a0bf-ce3d48723151
Number of slots    : 255
Sector size        : 512
Timeout (watchdog) : 15
Timeout (allocate) : 2
Timeout (loop)     : 1
Timeout (msgwait)  : 30
==Header on disk /dev/sda5 is dumped

# crm sbd configure show sysconfig 
SBD_PACEMAKER=yes
SBD_STARTMODE=always
SBD_DELAY_START=71
SBD_WATCHDOG_DEV=/dev/watchdog0
SBD_WATCHDOG_TIMEOUT=15
SBD_TIMEOUT_ACTION=flush,reboot
SBD_MOVE_TO_ROOT_CGROUP=auto
SBD_SYNC_RESOURCE_STARTUP=yes
SBD_OPTS=
SBD_DEVICE=/dev/sda5

# crm sbd configure show property 
pcmk_delay_max=30s
have-watchdog=true
stonith-enabled=true
stonith-timeout=83
priority-fencing-delay=60
TimeoutStartUSec=90

4. Change the on-disk meta data of the existing sbd disks (UC2.1 in PED-8256)

# crm sbd configure watchdog-timeout=30
WARNING: It's recommended to set msgwait timeout >= 2*watchdog timeout
INFO: Initializing SBD device /dev/sda5
INFO: Update SBD_WATCHDOG_TIMEOUT in /etc/sysconfig/sbd: 30
INFO: Already synced /etc/sysconfig/sbd to all nodes
WARNING: Resource is running, need to restart cluster service manually on each node
WARNING: "priority-fencing-delay" in crm_config is set to 60, it was 0

# crm sbd configure msgwait-timeout=60
INFO: Initializing SBD device /dev/sda5
WARNING: Resource is running, need to restart cluster service manually on each node
INFO: Update SBD_DELAY_START in /etc/sysconfig/sbd: 101
INFO: Already synced /etc/sysconfig/sbd to all nodes
WARNING: "stonith-timeout" in crm_config is set to 119, it was 83

# crm sbd configure show disk_metadata 
==Dumping header on disk /dev/sda5
Header version     : 2.1
UUID               : 15b0a922-ab1b-4abd-b1d1-ab712a12a1ec
Number of slots    : 255
Sector size        : 512
Timeout (watchdog) : 30
Timeout (allocate) : 2
Timeout (loop)     : 1
Timeout (msgwait)  : 60
==Header on disk /dev/sda5 is dumped

# crm sbd configure watchdog-timeout=15
INFO: Initializing SBD device /dev/sda5
INFO: Update SBD_WATCHDOG_TIMEOUT in /etc/sysconfig/sbd: 15
INFO: Already synced /etc/sysconfig/sbd to all nodes
WARNING: Resource is running, need to restart cluster service manually on each node

# crm sbd configure show disk_metadata 
==Dumping header on disk /dev/sda5
Header version     : 2.1
UUID               : d3918be3-8f51-4ca8-aea7-2d3dabdb7fa2
Number of slots    : 255
Sector size        : 512
Timeout (watchdog) : 15
Timeout (allocate) : 2
Timeout (loop)     : 1
Timeout (msgwait)  : 60
==Header on disk /dev/sda5 is dumped

5. Add a sbd disk with the existing sbd configuration (UC2.2 in PED-8256)

# crm sbd configure show disk_metadata 
==Dumping header on disk /dev/sda5
Header version     : 2.1
UUID               : 6299713e-9992-4b12-b822-1383aec1d1ad
Number of slots    : 255
Sector size        : 512
Timeout (watchdog) : 15
Timeout (allocate) : 2
Timeout (loop)     : 1
Timeout (msgwait)  : 60
==Header on disk /dev/sda5 is dumped

# crm sbd configure show sysconfig |grep DEVICE
SBD_DEVICE=/dev/sda5

# crm sbd configure device=/dev/sda7
INFO: Configuring disk-based SBD
INFO: Initializing SBD device /dev/sda7
INFO: Update SBD_DEVICE in /etc/sysconfig/sbd: /dev/sda5;/dev/sda7
INFO: Already synced /etc/sysconfig/sbd to all nodes
WARNING: Resource is running, need to restart cluster service manually on each node

# crm sbd configure show disk_metadata 
==Dumping header on disk /dev/sda5
Header version     : 2.1
UUID               : 6299713e-9992-4b12-b822-1383aec1d1ad
Number of slots    : 255
Sector size        : 512
Timeout (watchdog) : 15
Timeout (allocate) : 2
Timeout (loop)     : 1
Timeout (msgwait)  : 60
==Header on disk /dev/sda5 is dumped

==Dumping header on disk /dev/sda7
Header version     : 2.1
UUID               : 0e783710-1289-40ef-8b3a-965481e41aff
Number of slots    : 255
Sector size        : 512
Timeout (watchdog) : 15
Timeout (allocate) : 2
Timeout (loop)     : 1
Timeout (msgwait)  : 60
==Header on disk /dev/sda7 is dumped

# crm sbd configure show sysconfig |grep DEVICE
SBD_DEVICE="/dev/sda5;/dev/sda7"

6. Remove a sbd disk (UC2.3 in PED-8256)

# crm sbd configure show sysconfig |grep DEVICE
SBD_DEVICE="/dev/sda5;/dev/sda7"

# crm sbd remove /dev/sda
/dev/sda5   /dev/sda7   

# crm sbd remove device=/dev/sda5
INFO: Remove '/dev/sda5' from /etc/sysconfig/sbd
INFO: Update SBD_DEVICE in /etc/sysconfig/sbd: /dev/sda7
INFO: Already synced /etc/sysconfig/sbd to all nodes
INFO: Requires to restart cluster service to take effect

# crm sbd configure show sysconfig |grep DEVICE
SBD_DEVICE=/dev/sda7

7. Remove sbd from cluster

# crm sbd remove
INFO: Stop sbd resource 'stonith-sbd'(stonith:fence_sbd)
INFO: Remove sbd resource 'stonith-sbd'
INFO: Disable sbd.service on node alp-1
INFO: Disable sbd.service on node alp-2
INFO: Delete cluster property "stonith-timeout" in crm_config
INFO: Delete cluster property "priority-fencing-delay" in crm_config
WARNING: "stonith-enabled" in crm_config is set to false, it was true
INFO: Requires to restart cluster service to take effect

8. Replace the storage for a sbd disk (UC2.4 in PED-8256)

# crm sbd configure show disk_metadata 
==Dumping header on disk /dev/sda5
Header version     : 2.1
UUID               : 92eee6ea-5bfe-4e27-9761-89ba8411e333
Number of slots    : 255
Sector size        : 512
Timeout (watchdog) : 15
Timeout (allocate) : 2
Timeout (loop)     : 1
Timeout (msgwait)  : 30
==Header on disk /dev/sda5 is dumped

==Dumping header on disk /dev/sda6
Header version     : 2.1
UUID               : c0f851ee-7227-49f6-8a4f-0b110a42a65f
Number of slots    : 255
Sector size        : 512
Timeout (watchdog) : 15
Timeout (allocate) : 2
Timeout (loop)     : 1
Timeout (msgwait)  : 30
==Header on disk /dev/sda6 is dumped

# crm sbd remove device=/dev/sda6
INFO: Remove '/dev/sda6' from /etc/sysconfig/sbd
INFO: Update SBD_DEVICE in /etc/sysconfig/sbd: /dev/sda5
INFO: Already synced /etc/sysconfig/sbd to all nodes
INFO: Requires to restart cluster service to take effect

# crm sbd configure device=/dev/sda10
INFO: Configuring disk-based SBD
INFO: Initializing SBD device /dev/sda10
INFO: Update SBD_DEVICE in /etc/sysconfig/sbd: /dev/sda5;/dev/sda10
INFO: Already synced /etc/sysconfig/sbd to all nodes
WARNING: Resource is running, need to restart cluster service manually on each node

# crm sbd configure show disk_metadata 
==Dumping header on disk /dev/sda5
Header version     : 2.1
UUID               : 92eee6ea-5bfe-4e27-9761-89ba8411e333
Number of slots    : 255
Sector size        : 512
Timeout (watchdog) : 15
Timeout (allocate) : 2
Timeout (loop)     : 1
Timeout (msgwait)  : 30
==Header on disk /dev/sda5 is dumped

==Dumping header on disk /dev/sda10
Header version     : 2.1
UUID               : e898c95f-c849-4421-b7b6-862448e0b5ba
Number of slots    : 255
Sector size        : 512
Timeout (watchdog) : 15
Timeout (allocate) : 2
Timeout (loop)     : 1
Timeout (msgwait)  : 30
==Header on disk /dev/sda10 is dumped

# crm sbd configure show sysconfig |grep DEVICE
SBD_DEVICE="/dev/sda5;/dev/sda10"

9. display status (focusing on the runtime information only) (UC5 in PED-8256)

# crm sbd status
sbd.service status: (active|enabled|since)
alp-1: YES |YES |active since Mon 2024-07-22 09:26:37 CST
alp-2: YES |YES |active since Mon 2024-07-22 09:27:27 CST

watchdog info: (device|driver|kernel timeout)
alp-1: /dev/watchdog0|iTCO_wdt|10
alp-2: /dev/watchdog0|iTCO_wdt|10

fence_sbd status: 
resource stonith-sbd is running on: alp-1

10. Newly setup disk-based SBD on a running cluster

# crm sbd status
sbd.service status: (active|enabled|since)
alp-1: NO  |NO  |disactive since: N/A
alp-2: NO  |NO  |disactive since: N/A

watchdog info: (device|driver|kernel timeout)
ERROR: Failed to get watchdog info from alp-1
ERROR: Failed to get watchdog info from alp-2

# crm sbd configure device="/dev/sda5;/dev/sda6"
INFO: Loading "default" profile from /etc/crm/profiles.yml
INFO: No watchdog timeout specified, use advised value: 15
INFO: No msgwait timeout specified, use 2*watchdog timeout: 30
INFO: Configuring disk-based SBD
INFO: Initializing SBD device /dev/sda6
INFO: Initializing SBD device /dev/sda5
INFO: Update SBD_WATCHDOG_DEV in /etc/sysconfig/sbd: /dev/watchdog0
INFO: Update SBD_DEVICE in /etc/sysconfig/sbd: /dev/sda5;/dev/sda6
INFO: Update SBD_WATCHDOG_TIMEOUT in /etc/sysconfig/sbd: 15
INFO: Already synced /etc/sysconfig/sbd to all nodes
INFO: Enable sbd.service on node alp-1
INFO: Enable sbd.service on node alp-2
INFO: Restarting cluster service
INFO: BEGIN Waiting for cluster
...........                                                                                                                                                                   
INFO: END Waiting for cluster
WARNING: "stonith-enabled" in crm_config is set to true, it was false
INFO: Update SBD_DELAY_START in /etc/sysconfig/sbd: 71
INFO: Already synced /etc/sysconfig/sbd to all nodes
WARNING: "stonith-timeout" in crm_config is set to 83, it was 60s
WARNING: "priority-fencing-delay" in crm_config is set to 60, it was 0

# crm sbd configure show property 
pcmk_delay_max=30s
have-watchdog=true
stonith-enabled=true
stonith-timeout=83
priority-fencing-delay=60
TimeoutStartUSec=90

# crm sbd configure show disk_metadata 
==Dumping header on disk /dev/sda5
Header version     : 2.1
UUID               : d12b4391-8585-474e-9ed8-261f7e06a427
Number of slots    : 255
Sector size        : 512
Timeout (watchdog) : 15
Timeout (allocate) : 2
Timeout (loop)     : 1
Timeout (msgwait)  : 30
==Header on disk /dev/sda5 is dumped

==Dumping header on disk /dev/sda6
Header version     : 2.1
UUID               : 46dd6ebc-1a46-415f-87d4-13ffd09471c1
Number of slots    : 255
Sector size        : 512
Timeout (watchdog) : 15
Timeout (allocate) : 2
Timeout (loop)     : 1
Timeout (msgwait)  : 30
==Header on disk /dev/sda6 is dumped

Disk-less SBD scenarios

1. Show usage when syntax error (diskless)

# crm sbd configure xx
ERROR: Invalid argument: xx
Usage for disk-based SBD:
crm sbd configure show [disk_metadata|sysconfig|property]
crm sbd configure [device=<dev>]... [watchdog-timeout=<integer>] [allocate-timeout=<integer>] [loop-timeout=<integer>] [msgwait-timeout=<integer>] [watchdog-device=<dev>]

Usage for diskless SBD:
crm sbd configure show [sysconfig|property]
crm sbd configure device="" [watchdog-timeout=<integer>] [watchdog-device=<dev>]

2. completion (diskless)

# crm sbd configure 
show               watchdog-device=   watchdog-timeout=  
# crm sbd configure show 
property    sysconfig

3. Display SBD related configuration (UC4 in PED-8256, diskless)

# crm sbd configure show sysconfig 
SBD_PACEMAKER=yes
SBD_STARTMODE=always
SBD_DELAY_START=41
SBD_WATCHDOG_DEV=/dev/watchdog0
SBD_WATCHDOG_TIMEOUT=15
SBD_TIMEOUT_ACTION=flush,reboot
SBD_MOVE_TO_ROOT_CGROUP=auto
SBD_SYNC_RESOURCE_STARTUP=yes
SBD_OPTS=

# crm sbd configure show property 
have-watchdog=true
stonith-enabled=true
stonith-watchdog-timeout=-1
stonith-timeout=71
TimeoutStartUSec=90

4. Newly setup diskless SBD on a running cluster

# crm sbd status
sbd.service status: (active|enabled|since)
alp-1: NO  |NO  |disactive since: N/A
alp-2: NO  |NO  |disactive since: N/A

watchdog info: (device|driver|kernel timeout)
ERROR: Failed to get watchdog info from alp-1
ERROR: Failed to get watchdog info from alp-2

# crm sbd configure device=""
INFO: Loading "default" profile from /etc/crm/profiles.yml
INFO: No watchdog timeout specified, use advised value: 15
INFO: Configuring diskless SBD
WARNING: Diskless SBD requires cluster with three or more nodes. If you want to use diskless SBD for 2-node cluster, should be combined with QDevice.
INFO: Update SBD_WATCHDOG_TIMEOUT in /etc/sysconfig/sbd: 15
INFO: Update SBD_WATCHDOG_DEV in /etc/sysconfig/sbd: /dev/watchdog0
INFO: Already synced /etc/sysconfig/sbd to all nodes
INFO: Enable sbd.service on node alp-1
INFO: Enable sbd.service on node alp-2
INFO: Restarting cluster service
INFO: BEGIN Waiting for cluster
...........                                                                                                                                                                   INFO: END Waiting for cluster
INFO: Update SBD_DELAY_START in /etc/sysconfig/sbd: 41
INFO: Already synced /etc/sysconfig/sbd to all nodes
WARNING: "stonith-timeout" in crm_config is set to 71, it was 60s
WARNING: "stonith-watchdog-timeout" in crm_config is set to -1, it was 0
WARNING: "stonith-enabled" in crm_config is set to true, it was false


# crm sbd status
sbd.service status: (active|enabled|since)
alp-1: YES |YES |active since: Mon 2024-08-19 16:31:03 CST
alp-2: YES |YES |active since: Mon 2024-08-19 16:31:06 CST

watchdog info: (device|driver|kernel timeout)
alp-1: /dev/watchdog0|iTCO_wdt|10
alp-2: /dev/watchdog0|iTCO_wdt|10

5. Manipulate the basic diskless sbd configuration (UC3.1 in PED-8256)

# crm sbd configure device="" watchdog-timeout=30
INFO: Configuring diskless SBD
WARNING: Diskless SBD requires cluster with three or more nodes. If you want to use diskless SBD for 2-node cluster, should be combined with QDevice.
INFO: Update SBD_WATCHDOG_TIMEOUT in /etc/sysconfig/sbd: 30
INFO: Already synced /etc/sysconfig/sbd to all nodes
INFO: Restarting cluster service
INFO: BEGIN Waiting for cluster
...........                                                                                                                                                                   INFO: END Waiting for cluster
INFO: Update SBD_DELAY_START in /etc/sysconfig/sbd: 71
INFO: Already synced /etc/sysconfig/sbd to all nodes
WARNING: "stonith-timeout" in crm_config is set to 83, it was 71

# crm sbd configure show 
property    sysconfig   

# crm sbd configure show sysconfig 
SBD_PACEMAKER=yes
SBD_STARTMODE=always
SBD_DELAY_START=71
SBD_WATCHDOG_DEV=/dev/watchdog0
SBD_WATCHDOG_TIMEOUT=30
SBD_TIMEOUT_ACTION=flush,reboot
SBD_MOVE_TO_ROOT_CGROUP=auto
SBD_SYNC_RESOURCE_STARTUP=yes
SBD_OPTS=

# crm sbd configure show property 
have-watchdog=true
stonith-enabled=true
stonith-watchdog-timeout=-1
stonith-timeout=83
TimeoutStartUSec=90

6. Remove diskless sbd from cluster

# crm sbd remove
INFO: Disable sbd.service on node alp-1
INFO: Disable sbd.service on node alp-2
INFO: Delete cluster property "stonith-watchdog-timeout" in crm_config
INFO: Delete cluster property "stonith-timeout" in crm_config
WARNING: "stonith-enabled" in crm_config is set to false, it was true
INFO: Requires to restart cluster service to take effect

@liangxin1300 liangxin1300 force-pushed the 20240614_crm_sbd_sublevel branch 9 times, most recently from a19a863 to cc0d52a Compare July 23, 2024 13:34
@liangxin1300 liangxin1300 force-pushed the 20240614_crm_sbd_sublevel branch 9 times, most recently from 1456931 to e8f53af Compare August 1, 2024 03:16
@liangxin1300 liangxin1300 force-pushed the 20240614_crm_sbd_sublevel branch 2 times, most recently from bc2a1fa to 229de46 Compare August 2, 2024 02:50
@liangxin1300 liangxin1300 force-pushed the 20240614_crm_sbd_sublevel branch 6 times, most recently from 77c1c4f to 5d17668 Compare August 20, 2024 02:07
@liangxin1300 liangxin1300 force-pushed the 20240614_crm_sbd_sublevel branch 3 times, most recently from feef68b to d3dd973 Compare September 18, 2024 07:53
@liangxin1300
Copy link
Collaborator Author

crm sbd status

Readability is not so good. YES and NO are confusing at 1st sight. Better to use TAB to align the fields.

> sudo crm sbd status
sbd.service status: (active|enabled|since)
ha-3-1: YES |NO  |active since: Tue 2024-09-10 16:26:31 CST
ha-3-2: YES |NO  |active since: Tue 2024-09-10 16:26:31 CST

watchdog info: (device|driver|kernel timeout)
ha-3-1: /dev/watchdog|iTCO_wdt|10
ha-3-2: /dev/watchdog|iTCO_wdt|10

Now the output:

# crm sbd status
# Status of sbd.service:
Node   |Active  |Enabled |Since
alp-1  |YES     |YES     |active since: Wed 2024-09-18 15:53:55 CST
alp-2  |YES     |YES     |active since: Wed 2024-09-18 15:53:55 CST

# Watchdog info:
Node   |Device          |Driver    |Kernel Timeout
alp-1  |/dev/watchdog0  |iTCO_wdt  |10
alp-2  |/dev/watchdog0  |iTCO_wdt  |10

# Status of fence_sbd:
resource stonith-sbd is running on: alp-1

@liangxin1300 liangxin1300 force-pushed the 20240614_crm_sbd_sublevel branch 5 times, most recently from 133cb6e to ad2e9c2 Compare September 20, 2024 01:50
@liangxin1300
Copy link
Collaborator Author

modify properties

Fore diskless use case, why do I have to specify device= when trying to modify properties?

> crm sbd configure watchdog-timeout=30
ERROR: No device specified

Changed, no need to specify device= when diskless sbd is running

Copy link

codecov bot commented Sep 20, 2024

Codecov Report

Attention: Patch coverage is 35.06494% with 450 lines in your changes missing coverage. Please review.

Project coverage is 68.64%. Comparing base (c4ce88e) to head (8cd7705).

Files with missing lines Patch % Lines
crmsh/ui_sbd.py 15.36% 292 Missing ⚠️
crmsh/sbd.py 47.19% 141 Missing ⚠️
crmsh/bootstrap.py 74.07% 7 Missing ⚠️
crmsh/utils.py 60.00% 6 Missing ⚠️
crmsh/watchdog.py 85.71% 3 Missing ⚠️
crmsh/ui_root.py 75.00% 1 Missing ⚠️
Additional details and impacted files
Flag Coverage Δ
integration 54.67% <24.67%> (-0.54%) ⬇️
unit 51.34% <30.88%> (-1.38%) ⬇️

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

Files with missing lines Coverage Δ
crmsh/constants.py 100.00% <100.00%> (ø)
crmsh/ocfs2.py 100.00% <100.00%> (ø)
crmsh/qdevice.py 98.74% <100.00%> (ø)
crmsh/report/collect.py 97.49% <100.00%> (+<0.01%) ⬆️
crmsh/report/utils.py 99.32% <100.00%> (ø)
crmsh/ui_root.py 82.95% <75.00%> (-0.38%) ⬇️
crmsh/watchdog.py 97.11% <85.71%> (-2.89%) ⬇️
crmsh/utils.py 67.42% <60.00%> (-0.24%) ⬇️
crmsh/bootstrap.py 88.39% <74.07%> (-0.26%) ⬇️
crmsh/sbd.py 40.91% <47.19%> (-51.10%) ⬇️
... and 1 more

... and 1 file with indirect coverage changes

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

** Motivation
The main configurations for sbd use cases are scattered among sysconfig,
on-disk meta data, CIB, and even could be related to other OS components
eg. coredump, SCSI, multipath.

It's desirable to reduce the management complexity among them and to
streamline the workflow for the main use case scenarios.

** Changed include
**** Disk-based SBD scenarios
1. Show usage when syntax error
2. Completion
3. Display SBD related configuration (UC4 in PED-8256)
4. Change the on-disk meta data of the existing sbd disks (UC2.1 in
   PED-8256)
5. Add a sbd disk with the existing sbd configuration (UC2.2 in
   PED-8256)
6. Remove a sbd disk (UC2.3 in PED-8256)
7. Remove sbd from cluster
8. Replace the storage for a sbd disk (UC2.4 in PED-8256)]
9. display status (focusing on the runtime information only) (UC5 in
   PED-8256)

**** Disk-less SBD scenarios
1. Show usage when syntax error (diskless)
2. completion (diskless)
3. Display SBD related configuration (UC4 in PED-8256, diskless)
4. Manipulate the basic diskless sbd configuration (UC3.1 in PED-8256)
…re show

After PR#1540 got merged, crmsh will load CIB_file env before calling
above readonly command.
since crm_resource command will direct message to stderr when resource
is not running
Changes:
- Check at the beginning of the bootstrap process
- Check at configure sbd stage in the interactive mode
- Put the sbd not installed message in the constants.py
- Split the method into smaller methods
- Enhance the readability of output
- Print the type of SBD
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