Bug 680976 - lvm2 pvmove test mode "Command failed with status code 5"
Summary: lvm2 pvmove test mode "Command failed with status code 5"
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: lvm2
Version: 6.0
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: rc
: ---
Assignee: Milan Broz
QA Contact: Corey Marthaler
URL:
Whiteboard:
Depends On: 680973
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-02-28 17:02 UTC by Debbie Johnson
Modified: 2016-04-18 05:55 UTC (History)
11 users (show)

Fixed In Version: lvm2-2.02.83-2.el6
Doc Type: Bug Fix
Doc Text:
Clone Of: 680973
Environment:
Last Closed: 2011-05-30 12:35:23 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Debbie Johnson 2011-02-28 17:02:11 UTC
+++ This bug was initially created as a clone of Bug #680973 +++
Cloning as I checked the source and this issue is also in RHEL6

Description of problem:
When using test mode with the lvm2 command, pvmove (and probably others),
you get an error:

Command failed with status code 5


Version-Release number of selected component (if applicable):
RHEL 6.0



How reproducible:  every time

Example:

root@bbnfs ~]# pvmove -tv /dev/mapper/mpath3p2 /dev/mapper/mpath2p1
Test mode: Metadata will NOT be updated.
Finding volume group "nfsVG"
Test mode: Skipping archiving of volume group.
Creating logical volume pvmove0
Moving 1599 extents of logical volume nfsVG/bbnfs
Found volume group "nfsVG"
Updating volume group metadata
Test mode: Skipping volume group backup.
Found volume group "nfsVG"
Found volume group "nfsVG"
Found volume group "nfsVG"
Test mode: Wiping internal cache
Wiping internal VG cache
Command failed with status code 5. 


Actual results:
Appears the test command failed because of the error

Expected results:
No Command failed message outputed


Additional info:

In looking at the code it appears the problem is at:

        if ((ret != ECMD_PROCESSED) && !error_message_produced()) {
                log_debug(INTERNAL_ERROR "Failed command did not use log_error");
                log_error("Command failed with status code %d.", ret);
        }


We are not testing to see if we are in test mod before printing the message.
This is in lvm2_main() and lvm_shell().  So I believe the if statement should be:

        if ((ret != ECMD_PROCESSED) && !error_message_produced() && !test_mode()) {

to avoid printing the Command failed message.

Comment 1 Milan Broz 2011-03-07 12:22:45 UTC
I am really not sure which version you are testing.
lvm2-2.02.82-1.el6.i686

# pvmove -vt /dev/sdb2 /dev/sdb1 ; echo $?
  Test mode: Metadata will NOT be updated and volumes will not be (de)activated.
    Finding volume group "vg_test"
    Test mode: Skipping archiving of volume group.
    Creating logical volume pvmove0
    Moving 10 extents of logical volume vg_test/lv
    Found volume group "vg_test"
    activation/volume_list configuration setting not defined, checking only host tags for vg_test/lv
    Updating volume group metadata
    Found volume group "vg_test"
    Found volume group "vg_test"
    Found volume group "vg_test"
    Test mode: Skipping volume group backup.
    Test mode: Wiping internal cache
    Wiping internal VG cache
0

Anyway, there seems to be anothe problem with cluster locking:

# lvmconf --enable-cluster
# pvmove -vt /dev/sdb2 /dev/sdb1 ; echo $?
  Test mode: Metadata will NOT be updated and volumes will not be (de)activated.
    Finding volume group "vg_test"
    Test mode: Skipping archiving of volume group.
    Creating logical volume pvmove0
    Moving 10 extents of logical volume vg_test/lv
    Updating volume group metadata
  Error locking on node bar-01: Input/output error
    Test mode: Skipping volume group backup.
    Test mode: Wiping internal cache
    Wiping internal VG cache
0

Comment 2 RHEL Program Management 2011-04-04 01:52:55 UTC
Since RHEL 6.1 External Beta has begun, and this bug remains
unresolved, it has been rejected as it is not proposed as
exception or blocker.

Red Hat invites you to ask your support representative to
propose this request, if appropriate and relevant, in the
next release of Red Hat Enterprise Linux.

Comment 3 Milan Broz 2011-05-30 12:35:23 UTC
According to my analysis in clone bug #680973 closing this as fixed in current release.

Please reopen if you still see problems here and add exact version of lvm2 package you are using, thank you.


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