RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 611442 - Unclear error message is seen when try to start a pool with a non-existent source path.
Summary: Unclear error message is seen when try to start a pool with a non-existent so...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.0
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Osier Yang
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-07-05 10:04 UTC by Johnny Liu
Modified: 2011-12-06 10:46 UTC (History)
12 users (show)

Fixed In Version: libvirt-0.9.4-13.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-12-06 10:46:58 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:1513 0 normal SHIPPED_LIVE libvirt bug fix and enhancement update 2011-12-06 01:23:30 UTC

Description Johnny Liu 2010-07-05 10:04:11 UTC
Description of problem:
When try to start a pool with a non-existent source path, libvirt throw an error message, but the message is unhelpful for user.

Version-Release number of selected component (if applicable):
libvirt-0.8.1-13.el6.x86_64

How reproducible:
Always

Steps to Reproduce:
1. Define a pool on a mapper device.
# virsh pool-dumpxml xx
<pool type='disk'>
  <name>xx</name>
  <uuid>08a0a104-cbc3-0b96-bd6a-b1f8d00d9474</uuid>
  <capacity>0</capacity>
  <allocation>0</allocation>
  <available>0</available>
  <source>
    <device path='/dev/mapper/mymapper'/>
    <format type='dos'/>
  </source>
  <target>
    <path>/dev</path>
    <permissions>
      <mode>0700</mode>
      <owner>-1</owner>
      <group>-1</group>
    </permissions>
  </target>
</pool>
2. List the existent partition on the mapper device.
# ll /dev/mapper/myvm10*
lrwxrwxrwx. 1 root root 7 Jul  5 13:56 /dev/mapper/myvm10 -> ../dm-0
lrwxrwxrwx. 1 root root 7 Jul  5 13:56 /dev/mapper/myvm10p1 -> ../dm-1
3. Try to start the pool
# virsh pool-list --all
Name                 State      Autostart 
-----------------------------------------    
xx                   inactive   yes       
# virsh pool-start xx
error: Failed to start pool xx
error: internal error non-zero exit status from command 2

  
Actual results:
The error message is unhelpful for user.

Expected results:
Libvirt should prompt the user the pool source path - /dev/mapper/mymapper is not existent.

Additional info:
After I edit pool to correct the pool source path, the pool is started successfully.
# virsh pool-edit xx
Pool xx XML configuration edited.

# virsh pool-dumpxml xx
<pool type='disk'>
  <name>xx</name>
  <uuid>08a0a104-cbc3-0b96-bd6a-b1f8d00d9474</uuid>
  <capacity>0</capacity>
  <allocation>0</allocation>
  <available>0</available>
  <source>
    <device path='/dev/mapper/myvm10'/>
    <format type='dos'/>
  </source>
  <target>
    <path>/dev</path>
    <permissions>
      <mode>0700</mode>
      <owner>-1</owner>
      <group>-1</group>
    </permissions>
  </target>
</pool>

# virsh pool-start xx
Pool xx started

Comment 2 Daniel Veillard 2010-07-06 08:05:17 UTC
Yeah it's not ideal but I don't think we should fix this at this late stage,
so reschedulng for 6.1,

Daniel

Comment 5 Osier Yang 2011-09-20 03:24:44 UTC
patch committed to upstream.

commit 891c6fd74f1d485ab81eff34b8a15a79528373f1
Author: Osier Yang <jyang>
Date:   Mon Sep 19 15:35:15 2011 +0800

    storage: Ensure the device path exists before refreshing disk pool
    
    Doing libvirt_parthelper on an not existed device path will get
    an unfriendly error message. This patch is to prohibit it.

Comment 13 Huang Wenlong 2011-09-26 07:20:53 UTC
Verify this bug with libvirt-0.9.4-13.el6.x86_64

1. 
# virsh pool-dumpxml xx
<pool type='disk'>
  <name>xx</name>
  <uuid>08a0a104-cbc3-0b96-bd6a-b1f8d00d9474</uuid>
  <capacity>0</capacity>
  <allocation>0</allocation>
  <available>0</available>
  <source>
    <device path='/dev/mapper/mymapper'/>
    <format type='dos'/>
  </source>
  <target>
    <path>/dev</path>
    <permissions>
      <mode>0700</mode>
      <owner>-1</owner>
      <group>-1</group>
    </permissions>
  </target>
</pool>


2.
#virsh pool-define pool.xml 
Pool xx defined from pool.xml
3.
# virsh pool-start xx
error: Failed to start pool xx
error: invalid argument: device path '/dev/mapper/mymapper' doesn't exist

4.
# ll /dev/mapper/mymapper
ls: cannot access /dev/mapper/mymapper: No such file or directory

Comment 14 errata-xmlrpc 2011-12-06 10:46:58 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.

http://rhn.redhat.com/errata/RHBA-2011-1513.html


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