| Summary: | LVM vgcreate fails if hostname is invalid | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 6 | Reporter: | Frank Lin PIAT <fpiat> |
| Component: | lvm2 | Assignee: | Peter Rajnoha <prajnoha> |
| Status: | CLOSED ERRATA | QA Contact: | Corey Marthaler <cmarthal> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 6.0 | CC: | agk, dwysocha, heinzm, jbrassow, mbroz, prajnoha, prockai, thornber, zkabelac |
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | lvm2-2.02.86-1.el6 | Doc Type: | Bug Fix |
| Doc Text: |
A hostname containing '/' character caused LVM commands to fail while generating an archive of current metadata. Since the hostname is part of the temporary archive filename, we ended up with a file path that was ambiguous and it caused the whole archive operation to fail. To fix this, we replace any '/' character with '?' character in the hostname string and then we use it to compose the temporary archive filename.
|
Story Points: | --- |
| Clone Of: | Environment: | ||
| Last Closed: | 2011-12-06 16:57:02 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
|
Description
Frank Lin PIAT
2011-06-07 14:27:08 UTC
Well, we definitely need to escape such characters. OK, this is only a temporary file name creation. Also, we can't set the hostname containing '/' with recent versions of the 'hostname' command (I don't know the exact version, but the Fedora rawhide version if 'hostname' already checks that). Though we can still set it directly using 'sethostname' from unistd.h. Since this is really a corner case, I think we don't need any complex escape sequences here. We'll simply replace the '/' with '?'. Patch is upstream now (v2.02.86).
Technical note added. If any revisions are required, please edit the "Technical Notes" field
accordingly. All revisions will be proofread by the Engineering Content Services team.
New Contents:
A hostname containing '/' character caused LVM commands to fail while generating an archive of current metadata. Since the hostname is part of the temporary archive filename, we ended up with a file path that was ambiguous and it caused the whole archive operation to fail. To fix this, we replace any '/' character with '?' character in the hostname string and then we use it to compose the temporary archive filename.
Adding QA ack for 6.2. Devel will need to provide unit testing results however before this bug can be ultimately verified by QA. Fixed verified in the latest rpms. [root@grant-01 ~]# hostname foo/bar [root@foo/bar ~]# vgcreate TEST /dev/sd[bc][12] Volume group "TEST" successfully created 2.6.32-193.el6.x86_64 lvm2-2.02.87-1.el6 BUILT: Fri Aug 12 06:11:57 CDT 2011 lvm2-libs-2.02.87-1.el6 BUILT: Fri Aug 12 06:11:57 CDT 2011 lvm2-cluster-2.02.87-1.el6 BUILT: Fri Aug 12 06:11:57 CDT 2011 udev-147-2.37.el6 BUILT: Wed Aug 10 07:48:15 CDT 2011 device-mapper-1.02.66-1.el6 BUILT: Fri Aug 12 06:11:57 CDT 2011 device-mapper-libs-1.02.66-1.el6 BUILT: Fri Aug 12 06:11:57 CDT 2011 device-mapper-event-1.02.66-1.el6 BUILT: Fri Aug 12 06:11:57 CDT 2011 device-mapper-event-libs-1.02.66-1.el6 BUILT: Fri Aug 12 06:11:57 CDT 2011 cmirror-2.02.87-1.el6 BUILT: Fri Aug 12 06:11:57 CDT 2011 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. http://rhn.redhat.com/errata/RHBA-2011-1522.html |