https://bugzilla.redhat.com/show_bug.cgi?id=755729
This bug reports that the error message printed by the resize2fs API
calls (which comes directly from the resize2fs command) says:
Please run 'e2fsck -f /dev/vda1' first.
That command is not possible from guestfish (where it would be
'e2fsck-f' or 'e2fsck ... forceall:true').
Fixing that bug caused this bug:
https://bugzilla.redhat.com/show_bug.cgi?id=801640
By replacing the error message, we inadvertently replaced an important
(and different) error message:
Please run 'e2fsck -fy /dev/vda1' to fix the filesystem
after the aborted resize operation.
which occurs *after* a resize operation fails.
I proposed that we don't try editing error messages at all, even when
(as in 755729) this leads to some slightly inappropriate text being
printed in guestfish.
Trying to replace error messages is an open-ended task. It risks
causing more bugs, and it obscures what the underlying utility is
trying to say. Google exists, and people can use it to resolve
these problems.
This patch series starts by reverting the original fix.
Patch 4/5 causes the resize2fs* APIs to automatically run 'e2fsck -f'
when necessary, both simplifying the API and avoiding 755729.
Patch 5/5 documents the whole mess.
Rich.