Bug 1294956

Summary: set-label returns wrong error message when set the ext3/ext4 filesystem label
Product: Red Hat Enterprise Linux 6 Reporter: Hu Zhang <huzhan>
Component: libguestfsAssignee: Pino Toscano <ptoscano>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.8CC: leiwang, linl, ptoscano, wshi, xchen
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: libguestfs-1.20.11-17.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-05-10 19:56:28 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 1301844    

Description Hu Zhang 2015-12-31 09:35:33 UTC
Description of problem:
set-label returns wrong worning message when set the ext3/ext4 filesystem label. Same result on rhel7.2

Version-Release number of selected component (if applicable):
libguestfs-1.20.11-16.el6.x86_64
libguestfs-winsupport-1.0-7.el6.x86_64

How reproducible:
Always

Steps to Reproduce:
1. # guestfish -a test.raw
><fs> list-filesystems
/dev/sda1: ext3

2. Set the label as "AAAAAAAAAAAAAAAAAA"
><fs> set-label /dev/sda1 "AAAAAAAAAAAAAAAAAA"
libguestfs: error: set_label: AAAAAAAAAAAAAAAAAA: ext2 labels are limited to 16 bytes

3.
><fs> mkfs ext4 /dev/sda1
><fs> set-label /dev/sda1 "AAAAAAAAAAAAAAAAAA"
libguestfs: error: set_label: AAAAAAAAAAAAAAAAAA: ext2 labels are limited to 16 bytes


Actual results:
In step 2, the filesystem format, ext2 in the error message is different from the the actual filesystem format.

Expected results:
In step 2, the error message should be "libguestfs: error: set_label: AAAAAAAAAAAAAAAAAA: ext3 labels are limited to 16 bytes".
In step 3, the error message should be "libguestfs: error: set_label: AAAAAAAAAAAAAAAAAA: ext4 labels are limited to 16 bytes".


Additional info:

Comment 5 errata-xmlrpc 2016-05-10 19:56:28 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2016-0762.html