RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1645603 - dmstats report never displays report data
Summary: dmstats report never displays report data
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: lvm2
Version: 7.6
Hardware: Unspecified
OS: Unspecified
high
unspecified
Target Milestone: rc
: ---
Assignee: Bryn M. Reeves
QA Contact: cluster-qe@redhat.com
URL:
Whiteboard:
Depends On:
Blocks: 1645617 1647718
TreeView+ depends on / blocked
 
Reported: 2018-11-02 15:43 UTC by Bryn M. Reeves
Modified: 2021-09-03 12:55 UTC (History)
13 users (show)

Fixed In Version: lvm2-2.02.184-1.el7
Doc Type: If docs needed, set a value
Doc Text:
Previously, the "dmstats report" command did not print statistics for any registered regions. With this update, the problem has been fixed, and the "dmstats report" command now lists all registered regions correctly.
Clone Of:
: 1645617 1647718 (view as bug list)
Environment:
Last Closed: 2019-08-06 13:10:41 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2019:2253 0 None None None 2019-08-06 13:11:12 UTC

Description Bryn M. Reeves 2018-11-02 15:43:48 UTC
Description of problem:
When one or more dmstats regions exist on any device mapper device, the 'dmstats report' command should print a row of output for each registered region. 

A regression in dmsetup's _display_info_cols() causes statistics reports to skip all rows of output due to an incorrect use of the dm_stats_get_nr_regions() function: this can only be used on a bound handle that has already been initialised with data from the kernel. When called on an unbound or uninitialised handle, it will always return zero, causing the reporting code to assume there are never any regions to report, and to skip every device in the output.

Version-Release number of selected component (if applicable):
lvm2-2.02.180-*.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1. dmstats create --alldevices
2. dmstats report

Actual results:
No output rows after header.

Expected results:
One row of output per existing dm device

Additional info:
Fixed upstream in two commits:

613466aa8 dmsetup: fix stats report command output
813a83b2d libdm-stats: move no regions warning after dm_stats_list()

Comment 3 Corey Marthaler 2018-11-07 19:32:32 UTC
FWIW: It appears this was brought up in bug 1596129.

https://bugzilla.redhat.com/show_bug.cgi?id=1596129#c16

Comment 8 Corey Marthaler 2019-05-30 18:50:54 UTC
Fix verified in the latest rpms.

[root@hayes-03 ~]# df -h
Filesystem                                                Size  Used Avail Use% Mounted on
/dev/mapper/black_bird-non_synced_primary_raid10_3legs_1  9.8G   66M  9.2G   1% /mnt/non_synced_primary_raid10_3legs_1

May 30 13:43:10 hayes-03 qarshd[35593]: Running cmdline: dmstats create --filemap /mnt/non_synced_primary_raid10_3legs_1/hayes-03_load

May 30 13:43:10 hayes-03 qarshd[35599]: Running cmdline: dmstats create black_bird-non_synced_primary_raid10_3legs_1

# Do I/O
May 30 13:43:11 hayes-03 qarshd[35603]: Running cmdline: /usr/tests/sts-rhel7.7/bin/checkit -w /mnt/non_synced_primary_raid10_3legs_1/checkit -f /tmp/checkit_non_synced_primary_raid10_3legs_1 -v

May 30 13:43:12 hayes-03 qarshd[35607]: Running cmdline: dmstats report

[root@hayes-03 ~]# dmstats report
Name                                         GrpID RgID ObjType ArID ArStart ArSize  RMrg/s WMrg/s R/s  W/s    RSz/s WSz/s  AvgRqSz QSize Util%  AWait RdAWait WrAWait
hayes-03_load                                    0    0 area       0 133.00m 980.00k   0.00   0.00 0.00 288.00     0 17.23m  61.00k  2.67  74.60  9.27    0.00    9.27
black_bird-non_synced_primary_raid10_3legs_1     -    1 area       0       0  10.01g   0.00   0.00 0.00 363.00     0 17.52m  49.00k  3.57 100.00  9.84    0.00    9.84
hayes-03_load                                    0    0 group      0 133.00m 980.00k   0.00   0.00 0.00 288.00     0 17.23m  61.00k  2.67  74.60  9.27    0.00    9.27


3.10.0-1046.el7.x86_64

lvm2-2.02.185-1.el7    BUILT: Mon May 13 04:36:30 CDT 2019
lvm2-libs-2.02.185-1.el7    BUILT: Mon May 13 04:36:30 CDT 2019
lvm2-lockd-2.02.185-1.el7    BUILT: Mon May 13 04:36:30 CDT 2019
device-mapper-1.02.158-1.el7    BUILT: Mon May 13 04:36:30 CDT 2019
device-mapper-libs-1.02.158-1.el7    BUILT: Mon May 13 04:36:30 CDT 2019
device-mapper-event-1.02.158-1.el7    BUILT: Mon May 13 04:36:30 CDT 2019
device-mapper-event-libs-1.02.158-1.el7    BUILT: Mon May 13 04:36:30 CDT 2019
device-mapper-persistent-data-0.8.1-1.el7    BUILT: Sat May  4 14:53:53 CDT 2019

Comment 10 errata-xmlrpc 2019-08-06 13:10:41 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, 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-2019:2253


Note You need to log in before you can comment on or make changes to this bug.