Bug 2043815

Summary: dlm_tool ls shows no lockspaces if there are more than 128 lockspaces
Product: Red Hat Enterprise Linux 9 Reporter: Reid Wahl <nwahl>
Component: dlmAssignee: Alexander Aring <aahringo>
Status: CLOSED ERRATA QA Contact: cluster-qe <cluster-qe>
Severity: medium Docs Contact:
Priority: medium    
Version: CentOS StreamCC: aahringo, cluster-maint, devin, gfs2-maint, teigland
Target Milestone: rcKeywords: Triaged
Target Release: 9.2Flags: pm-rhel: mirror+
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: dlm-4.2.0-2.el9 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-05-09 07:43:23 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 2133827    
Bug Blocks:    

Description Reid Wahl 2022-01-22 04:47:51 UTC
Description of problem:

`dlm_tool ls [-n]` has a hard-coded max of 128 lockspaces. If there are more than 128 lockspaces, then the output is completely empty (except for the header "dlm lockspaces").

1. This max is not documented in the dlm_tool man page or help output.
2. There are no warnings or errors in the output to indicate that there are lockspaces that exist but that are not shown.
3. This max is not configurable.


I presume the max exists to limit the size of replies.

The ideal solution would be to get rid of the max or to make it user-configurable via a command-line option. If this is not possible for some reason, then we should at least document the max in the help output and man page.

Note: If we decide to leave some max value in place (whether as a hard-coded value, or as a user-configurable option with a hard-coded default), then we probably should write something to stderr to inform the user when the number of lockspaces is greater than the max. We might also consider truncating the output in that situation, instead of printing nothing.

-----

Version-Release number of selected component (if applicable):

dlm-4.1.0-1.el8

-----

How reproducible:

Presumably always. I've tried to reproduce the issue by joining 129 lockspaces, but I'm unable to join more than 59. I can't find any hard caps at 60 in the dlm userspace or kernel code, so I don't know what's going on here. I'd appreciate any insight.

[root@fastvm-rhel-8-0-23 pacemaker]# dlm_tool ls | grep -c name
59
[root@fastvm-rhel-8-0-23 pacemaker]# dlm_tool join ls60
Joining lockspace "ls60" permission 600 
dlm_new_lockspace ls60 error 16

-----

Steps to Reproduce:
1. Create 129 DLM lockspaces.
2. Run `dlm_tool ls [-n]`

-----

Actual results:

# dlm_tool ls -n
dlm lockspaces

-----

Expected results:

# dlm_tool ls -n
dlm lockspaces
<all lockspaces>

Comment 9 Alexander Aring 2022-08-18 17:23:29 UTC
This patch is already upstream in dlm userspace software to solve it and will be available in the next user space software release.

Comment 17 errata-xmlrpc 2023-05-09 07:43:23 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (dlm bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2023:2288