Bug 989957 - ssm: can't check ext2 filesystem when used noninteactively
ssm: can't check ext2 filesystem when used noninteactively
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: system-storage-manager (Show other bugs)
7.0
All All
unspecified Severity medium
: rc
: ---
Assigned To: Lukáš Czerner
Jimmy Pan
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-30 04:18 EDT by Jimmy Pan
Modified: 2015-07-19 20:55 EDT (History)
2 users (show)

See Also:
Fixed In Version: system-storage-manager-0.4-1.el7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-06-13 08:04:02 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jimmy Pan 2013-07-30 04:18:03 EDT
Description of problem:
If ssm check is used in a script and output directed to a file, then check on ext2 filesystem can't proceed and ssm doesn't return an error exit status

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

How reproducible:
Always

Steps to Reproduce:
1. use dd and losetup to create a loop device(/dev/loop0)
2. ssm create --fs ext2 -p lvm_pool -n lvol001 /dev/loop0
3. run test.sh like this:
   #!/bin/bash
   ssm check /dev/lvm_pool/lvol001 >outputfile
   echo $?

Actual results:
ssm check on ext2 filesystem says:
e2fsck 1.42.7 (21-Jan-2013)
e2fsck: need terminal for interactive repairs
Warning: Some file system(s) contains errors. Please run the appropriate fsck utility!

and the exit status is 0.


Expected results:
Able to accept noninteractive check like fsck -n or return a nonzero exit status

Additional info:
Comment 2 Lukáš Czerner 2013-08-08 08:40:06 EDT
Building in system-storage-manager-0.4-1.el7
Comment 3 Jimmy Pan 2013-09-29 02:57:04 EDT
reproduced with system-storage-manager-0.2-2.el7
use steps in comment0, result:
[root@hp-dl388g8-15 ~]# ./test.sh 
e2fsck 1.42.7 (21-Jan-2013)
e2fsck: need terminal for interactive repairs
Warning: Some file system(s) contains errors. Please run the appropriate fsck utility!
0

verified with system-storage-manager-0.4-1.el7
use steps in comment0, result:
[root@hp-dl388g8-15 ~]# ./test.sh 
e2fsck 1.42.7 (21-Jan-2013)
0
Comment 4 Ludek Smid 2014-06-13 08:04:02 EDT
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.