trove resize-volume fails with resize2fs error

Bug #1391639 reported by Simon Chang
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack DBaaS (Trove)
Fix Released
High
Simon Chang

Bug Description

When resizing the volume of an instance with the following command:
trove resize-volume <instance_id> <size>

The instance remains in RESIZE status and never return to ACTIVE.

The guestagent log contain this error:
trove.guestagent.volume Error resizing file system.
trove.guestagent.volume Traceback (most recent call last):
trove.guestagent.volume File "/home/stack/trove/trove/guestagent/volume.py", line 124, in resize_fs
trove.guestagent.volume run_as_root=True, root_helper="sudo")
trove.guestagent.volume File "/home/stack/trove/trove/openstack/common/processutils.py", line 200, in execute
trove.guestagent.volume cmd=sanitized_cmd)
trove.guestagent.volume ProcessExecutionError: Unexpected error while running command.
trove.guestagent.volume Command: sudo resize2fs /dev/vdb
trove.guestagent.volume Exit code: 1
trove.guestagent.volume Stdout: u''
trove.guestagent.volume Stderr: u"resize2fs 1.42 (29-Nov-2011)\nPlease run 'e2fsck -f /dev/vdb' first.\n\n"

Changing the following line in trove/guestagent/volume.py from ..
utils.execute("e2fsck", "-f", "-n", self.device_path,
              run_as_root=True, root_helper="sudo")

to ..

utils.execute("e2fsck", "-f", "-p", self.device_path,
              run_as_root=True, root_helper="sudo")

.. resolved the issue.

The e2fsck flag was changed from -p to -n in this patch:
https://review.openstack.org/#/c/127629/

We need to revisit the patch.

Simon Chang (changsimon)
Changed in trove:
assignee: nobody → Simon Chang (changsimon)
Amrith Kumar (amrith)
Changed in trove:
importance: Undecided → High
milestone: none → kilo-1
Revision history for this message
Nikhil Manchanda (slicknik) wrote :

Any updates on this?
If not, I will probably end up moving this out to kilo-2.

Changed in trove:
milestone: kilo-1 → kilo-2
Revision history for this message
Simon Chang (changsimon) wrote :

Nikhil, I don't have a patch for this one yet. Ubuntu has this issue, but Centos don't, and I'm trying to test with Debian now.

Simon Chang (changsimon)
description: updated
summary: - trove resize-volume fails with resize2fs error on devstack
+ trove resize-volume fails with resize2fs error
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to trove (master)

Fix proposed to branch: master
Review: https://review.openstack.org/140488

Changed in trove:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to trove (master)

Reviewed: https://review.openstack.org/140488
Committed: https://git.openstack.org/cgit/openstack/trove/commit/?id=a13112599dd20e890d8d70babb0015052796aa09
Submitter: Jenkins
Branch: master

commit a13112599dd20e890d8d70babb0015052796aa09
Author: Simon Chang <email address hidden>
Date: Tue Dec 9 16:49:03 2014 -0500

    Fix trove resize-volume resize2fs error

    trove resize-volume works by calling the e2fsck and resize2fs
    commands. When resize2fs detect errors in the volume, it will
    abort with an error: "Please run 'e2fsck -f /dev/vdb' first".

    The e2fsck command is currently called with the -n flag, meaning
    not to fix any volume errors, which cause the subsequent resize2fs
    command to fail. As a result, the trove instance being resized
    remain stuck in the RESIZE status.

    This patch reverts the e2fsck -n flag back to the -p flag, which
    enables auto correction of volume errors, thus allowing resize2fs
    to complete the resize-volume operation.

    Change-Id: I14b43966d4e7f047a5859bd4a463f2838f03b01f
    Closes-Bug: #1391639

Changed in trove:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in trove:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in trove:
milestone: kilo-2 → 2015.1.0
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.