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 1471095 - "Unknown command" when trying to run 'thin_trim'
Summary: "Unknown command" when trying to run 'thin_trim'
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: device-mapper-persistent-data
Version: 7.4
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: rc
: ---
Assignee: Joe Thornber
QA Contact: Jakub Krysl
URL:
Whiteboard:
Depends On:
Blocks: 1469559
TreeView+ depends on / blocked
 
Reported: 2017-07-14 12:18 UTC by Jakub Krysl
Modified: 2021-09-03 12:05 UTC (History)
8 users (show)

Fixed In Version: device-mapper-persistent-data-0.7.3-1.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-04-10 13:17:29 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Proposed patch to reinstate trim and show_duplicates to rpm (4.84 KB, patch)
2017-07-17 11:49 UTC, Alasdair Kergon
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2018:0776 0 None None None 2018-04-10 13:18:06 UTC

Description Jakub Krysl 2017-07-14 12:18:53 UTC
Description of problem:
When trying to run 'thin_trim' I get: 
Unknown command 'thin_trim'
This tool is in "rpm -ql device-mapper-persistent-data" and there is a working manpage for it.
This was working in RHEL 7.3 (0.6.3-1.el7.x86_64)

Version-Release number of selected component (if applicable):
0.7.0-0.1.rc6.el7.x86_64 

How reproducible:
100%

Steps to Reproduce:
1.'thin_trim'


Actual results:
Unknown command 'thin_trim'

Expected results:
Usage: thin_trim [options] --metadata-dev {device|file} --data-dev {device|file}
Options:
  {-h|--help}
  {-V|--version}

Additional info:

Comment 3 Alasdair Kergon 2017-07-14 13:54:30 UTC
Reproduced.

Comment 4 Jonathan Earl Brassow 2017-07-14 17:04:56 UTC
I consider this to be a 7.5 + 7.4.z bug - not a 7.4 blocker.

We currently don't have a way to activate sub-LVs (metadata and data areas) in LVM that would make it simple to use tools like thin_repair/thin_trim manually.  Thus the number of people impacted by this before we can get a 7.4.z fix out for it would be very small.

Priority may be higher if other dmpd tools were affected, like 'thin_repair', 'thin_dump', etc.

Comment 5 Mike Snitzer 2017-07-14 17:52:57 UTC
thin_show_duplicates also doesn't working.

# for bin in `rpm -ql device-mapper-persistent-data | grep /usr/sbin`; do $bin ; done 2>&1 | grep "Unknown command"
Unknown command 'thin_show_duplicates'
Unknown command 'thin_trim'

Comment 6 Mike Snitzer 2017-07-14 18:15:01 UTC
Seems the quickest "fix" is to update the spec file to %configure using --enable-dev-tools.

Reassigning to Peter to see if he could enable that configure flag and respin for 7.5 (and 7.4.z).  Peter what do you think?

Comment 8 Alasdair Kergon 2017-07-14 23:51:15 UTC
Just changing the flag is insufficient.

Also needs: BuildRequires: ncurses-devel

Installed (but unpackaged) file(s) found:
   /usr/sbin/thin_generate_metadata
   /usr/sbin/thin_ll_dump
   /usr/sbin/thin_scan

Should those be shipped too?

Alternatively - the smallest fix - is perhaps just to adjust the #ifdef selection in the source file so that thin_trim and thin_show_duplicates work again.

Comment 10 Alasdair Kergon 2017-07-17 11:49:47 UTC
Created attachment 1299797 [details]
Proposed patch to reinstate trim and show_duplicates to rpm

Comment 14 Marian Csontos 2017-07-17 13:16:07 UTC
Oh, I see! It's the links are there, but support is not compiled.

Comment 15 Jakub Krysl 2017-07-18 06:58:16 UTC
Check BZ1469178, it is about thin_show_duplicates. It was filed before this and is related to this as thin_show_duplicates got added here. The difference between trim and show_duplicates bug is, show _duplicates is not a regression plus it is also missing a manpage.
There is a part duplicity and I believe it should be resolved based on how this bug will be solved.

Comment 16 Marian Csontos 2017-07-19 09:04:14 UTC
IMO the question is shall we drop them or keep pushing forward basically an useless patch?

Given it is not easy to use these, the simplest fix is to remove the "dangling" symlinks.

If we ever decide to ship these binaries, shall we move them to a subpackage?

As for ZStream eligibility, shall we wait for a request from customer? It does not work in Rawhide, and no one complained yet.

According to commit message 5f879237f5738ec1a66a5ab80eb60bda12256030:

    This builds tools that I want to keep in the same code base, but not
    intended for general release.

thin_trim moved to dev-tools in 03499560152967392a6ee6c1e418d21083eda5e9.

I am submitting a pull request to Joe, to install the symlinks only if configured so rpmdiff would spot the change.

Comment 17 Marian Csontos 2017-09-22 08:40:14 UTC
thin_trim moved to devtools in commit fd02dfa5bf65c5ba127a3da0aad853a88ace47fd and back in f7d79339e8da664d82f32e276a38744f050be9be. Joe, is that intentional?

Comment 18 Marian Csontos 2017-09-22 08:43:30 UTC
thin_show_duplicates half is Bug 1469178

Comment 22 Jakub Krysl 2017-10-09 09:02:07 UTC
Fixed in device-mapper-persistent-data-0.7.3-1.el7.

Comment 25 errata-xmlrpc 2018-04-10 13:17:29 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/RHEA-2018:0776


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