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 1571896 - lsmcli [command] --file / --fileas proceeds even with nonexistent file
Summary: lsmcli [command] --file / --fileas proceeds even with nonexistent file
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libstoragemgmt
Version: 7.5
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Tony Asleson
QA Contact: Jakub Krysl
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-04-25 15:55 UTC by Jakub Krysl
Modified: 2021-09-03 14:12 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-12-10 17:41:00 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Jakub Krysl 2018-04-25 15:55:15 UTC
Description of problem:
When using arguments --file or --fileas with value of nonexistent file (let's say "nonexistent"), the command does not do any checking and probably ignores the argument instead. The command succeeds.

# lsmcli -u "sim://" fs-create --pool POOL_ID_00001 --name test --size 1G
ID          | Name | Total Space | Free Space | Pool ID       | System ID
-------------------------------------------------------------------------
FS_ID_00001 | test | 1073741824  | 1073741824 | POOL_ID_00001 | sim-01
# lsmcli -u "sim://" fs-dependants --fs FS_ID_00001
False
# lsmcli -u "sim://" fs-dependants --fs FS_ID_00001 --file "nonexistent"
False
# echo $?
0

Note: lsmcli fs-snap-restore has the same bahaviour.

Version-Release number of selected component (if applicable):
libstoragemgmt-1.6.1-2.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1. lsmcli -u "sim://" fs-create --pool POOL_ID_00001 --name test --size 1G
2. lsmcli -u "sim://" fs-dependants --fs FS_ID_00001 --file "nonexistent"


Actual results:
False

Expected results:
lsmcli error: --file "nonexistent" does not exist

Additional info:

Comment 2 Tony Asleson 2018-12-10 17:41:00 UTC
The simulator has limitations, this is one of them.  To support this feature we would need the ability to simulate the FS too and allow some type of interface outside lsmcli to create files etc. so that the sim plugin would have something to check against.


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