This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 1462660 - cockpit logical volume resize fails with error message
cockpit logical volume resize fails with error message
Status: CLOSED DUPLICATE of bug 1464953
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: cockpit (Show other bugs)
7.4
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Dominik Perpeet
qe-baseos-daemons
: Extras, Reopened
Depends On:
Blocks: 1459279
  Show dependency treegraph
 
Reported: 2017-06-19 04:13 EDT by Dominik Perpeet
Modified: 2017-06-28 12:22 EDT (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-06-28 04:29:35 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)
Screenshot of error from tests (102.52 KB, image/png)
2017-06-19 04:13 EDT, Dominik Perpeet
no flags Details

  None (edit)
Description Dominik Perpeet 2017-06-19 04:13:32 EDT
Created attachment 1289046 [details]
Screenshot of error from tests

Description of problem:
During Cockpit upstream integration testing, a test to resize a logical volume fails unexpectedly.

First found in https://fedorapeople.org/groups/cockpit/logs/pull-6360-20170615-152828-dd09a8ca-verify-rhel-7-4/log.html

Version-Release number of selected component (if applicable):
Cockpit 142.x

storaged:
Arch        : x86_64
Version     : 2.5.2
Release     : 3.el

How reproducible:
Always

Steps to Reproduce:
Run integration tests for volume resize https://github.com/cockpit-project/cockpit/blob/0177950a4be3abaff3545a92f62e094956b2caa3/test/verify/check-storage-resize#L57

Actual results:
Error message, see screenshot. Trace in issue: https://github.com/cockpit-project/cockpit/issues/6960
Comment 2 Marius Vollmer 2017-06-19 08:18:17 EDT
This is caused by this change in lvm2 / fsadm:

https://sourceware.org/git/?p=lvm2.git;a=commit;h=1fe4f80e45a6bfcceed5aaab97fc0e27dfcf2b88

This change might break usage from scripts in general, as it did for Cockpit.
Comment 3 Zdenek Kabelac 2017-06-22 14:44:12 EDT
lvm2 fixed long-term bug.

We cannot let 'script' running automatically in '--yes' mode.
Such option must be always given on command line and is also logged in metadata archive for analysis in case things went wrong somewhere.

So if  lvm2 users do want to apply --yes automatically - such option needs to be passed in.

i.e.  'lvresize --yes....'


This BZ is essentially duplicate of bug 1462696 - where we have resolved this 'yes' issue for both 'lvresize' and 'fsadm'.

*** This bug has been marked as a duplicate of bug 1462696 ***
Comment 4 Marius Vollmer 2017-06-26 04:53:00 EDT
This is not a duplicate of bug 1462696.

This bug is about changing the default behavior of fsadm (nd indirectly lvresize): When stdin is connected to /dev/null, it used to unmount the filesystem if needed, now it fails.

To resolve this bug, we would need to either revert the default behavior of fsadm back to the old one, or decide that the new default behavior is correct and then close this bug as NOTABUG.

Closing this bug as NOTABUG means accepting that all uses of lvresize and fsadm need to be reviewed and possibly changed to pass "--yes".


Bug 1462696 is about the implementation of the new default behavior being broken.
Comment 5 Zdenek Kabelac 2017-06-26 05:32:56 EDT
It's been bug and inconsistency in fsadm letting it work in '--yes' mode without terminal without specifying --yes on command line - causing seriously ill behavior as unconfirmed actions may have destabilize user's system.

Lvm2 does not support/handle backward compatibility for bugs - such bug should have been reported immediately and not been abused. Writing software on top of buggy logic will simply stop working the day the bug is fixed.

There is no 'new default' as mentioned in a comment 4. There is always only one consistent default behavior in lvm2 tools.

With terminal by default - prompt waits for answer.
With no terminal - answer 'N' is selected  (...was a bug in fsadm doing Y)
If user gives '--yes'  -  automatically answer 'Y'

If any software using lvm2 tools wants '--yes' answering for prompts it specifies '--yes' - it works this way for last decade.

There is no plan to reintroduce such bug back to lvm2.

If Cocpit needs '--yes' answering  'fsadm' and cannot simply add passing --yes - it maybe can switch to calling a 'wrapper' script  i.e.   'fsadm_yes' which will exec  system's fsadm and will add --yes argument this way.  Eventually create it's own hidden 'fsadm' in private binary PATH which will be found and  called instead of system's version of fsadm


As Lvm2 can't do any more here - passing this BZ to cocpit for more fixes.
Comment 7 Marius Vollmer 2017-06-28 04:29:35 EDT
Story continues in bug 1464953

*** This bug has been marked as a duplicate of bug 1464953 ***

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