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 986747 - ssm: ssm -f doesn't work when creating or adding
Summary: ssm: ssm -f doesn't work when creating or adding
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: system-storage-manager
Version: 7.0
Hardware: All
OS: All
unspecified
medium
Target Milestone: rc
: ---
Assignee: Lukáš Czerner
QA Contact: Petr Beňas
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-07-22 02:41 UTC by Jimmy Pan
Modified: 2015-07-20 00:55 UTC (History)
4 users (show)

Fixed In Version: system-storage-manager-0.4-1.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-06-13 09:46:08 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Jimmy Pan 2013-07-22 02:41:33 UTC
Description of problem:
ssm -f should answer y to interactive questions, but it doesn't work when in create or add command when removing device from existent pool

Version-Release number of selected component (if applicable):
system-storage-manager-0.2-2.el7

How reproducible:
Always

Steps to Reproduce:
1. setup loop devices with dd (/dev/loop0, /dev/loop1, /dev/loop2)
2. ssm add /dev/loop{0,1,2}
3. ssm -f create -p pool2 /dev/loop1
4. ssm -f add -p pool3 /dev/loop2

Actual results:
ssm still ask user to confirm whether remove device from another pool when use create or add command

ssm -f create -p pool2 /dev/loop1
Device '/dev/loop1' is already used in the 'lvm_pool'! Remove (N/y/q) ? N
Device '/dev/loop1' can not be used!!
"Error (2001): Device '/dev/loop1' can not be used!!"

ssm -f add -p pool3 /dev/loop2
Device '/dev/loop2' is already used in the 'lvm_pool'! Remove (N/y/q) ? N
No devices available to use for the 'pool3' pool!
Traceback (most recent call last):
  File "/usr/bin/ssm", line 33, in <module>
    sys.exit(main.main())
  File "/usr/lib/python2.7/site-packages/ssmlib/main.py", line 1485, in main
    args.func(args)
  File "/usr/lib/python2.7/site-packages/ssmlib/main.py", line 1008, in add
    PR.check(PR.NO_DEVICES, args.pool.name)
  File "/usr/lib/python2.7/site-packages/ssmlib/problem.py", line 275, in check
    raise exc(message)
  File "/usr/lib/python2.7/site-packages/ssmlib/problem.py", line 108, in __init__
    super(NoDevice, self).__init__(msg, errcode)
NameError: global name 'NoDevice' is not defined


Expected results:
Devices should be removed without confirmation and used to create the new pool

Additional info:

Comment 2 Lukáš Czerner 2013-07-31 11:12:04 UTC
This was fixed upstream with ea0d52abdfaa90b727f31bb81770951738281439.

-Lukas

Comment 3 Lukáš Czerner 2013-07-31 11:17:17 UTC
Correction, the trace was fixed by that commit. However you'll be still prompted even though -f has been provided.

Problem with making 'force' to work for everything is that we're actually using stack of tools and in this case you usually want to 'force' only the removal. However what if you're creating a file system, do you want to force it as well ? There is actually no way to tell.

No sure how to resolve this right now...

-Lukas

Comment 4 Lukáš Czerner 2013-08-06 13:40:56 UTC
Fixed upstream with https://sourceforge.net/p/storagemanager/code/ci/bb76641a30ff428021df6f99b0f3e32211e1e9a6/

-Lukas

Comment 5 Lukáš Czerner 2013-08-08 12:29:59 UTC
Building in system-storage-manager-0.4-1.el7

Comment 8 Petr Beňas 2013-10-31 16:14:35 UTC
Reproduced in system-storage-manager-0.3-1.el7.noarch and verified in system-storage-manager-0.4-1.el7.noarch.

Comment 9 Ludek Smid 2014-06-13 09:46:08 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.


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