Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1104993 - Garbage characters show in the output of pool-name with no-exist pool UUID
Garbage characters show in the output of pool-name with no-exist pool UUID
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt (Show other bugs)
7.0
Unspecified Unspecified
medium Severity medium
: rc
: ---
Assigned To: Peter Krempa
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2014-06-05 03:42 EDT by Shanzhi Yu
Modified: 2015-03-05 02:37 EST (History)
7 users (show)

See Also:
Fixed In Version: libvirt-1.2.7-1.el7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-03-05 02:37:26 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2015:0323 normal SHIPPED_LIVE Low: libvirt security, bug fix, and enhancement update 2015-03-05 07:10:54 EST

  None (edit)
Description Shanzhi Yu 2014-06-05 03:42:29 EDT
Description of problem:

Garbage characters show in the output of pool-name with no-exist pool UUID

Version-Release number of selected component (if applicable):

libvirt-1.1.1-29.el7.x86_64

How reproducible:

100%

Steps to Reproduce:

#  virsh pool-name e012ace0-0460-5810-39ef-1bce5fa5a4dd
error: failed to get pool 'e012ace0-0460-5810-39ef-1bce5fa5a4dd'
error: Storage pool not found: no storage pool with matching uuid ���`X9�_��


Actual results:


Expected results:

no garbage characters show in the the error info 

Additional info:
Comment 1 Peter Krempa 2014-06-05 03:54:29 EDT
There are multiple instances of the problem across various storage driver APIs.
Comment 2 Peter Krempa 2014-06-12 04:31:22 EDT
Fixed upstream:

commit efd892761e9e5e16f47367d97ee99f7a2ca5d0fe
Author: Peter Krempa <pkrempa@redhat.com>
Date:   Thu Jun 5 10:40:59 2014 +0200

    storage: pool: Fix handling of errors on pool lookup failure
    
    Rework internal pool lookup code to avoid printing the raw UUID buffer
    in the case a storage pool can't be found:
    
     $ virsh pool-name e012ace0-0460-5810-39ef-1bce5fa5a4dd
     error: failed to get pool 'e012ace0-0460-5810-39ef-1bce5fa5a4dd'
     error: Storage pool not found: no storage pool with matching uuid à¬à`X9ï_¥¤Ý
    
    The rework is mostly done by switching the lookup code to the newly
    introduced helper virStoragePoolObjFromStoragePool
    
    Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1104993
Comment 4 Pei Zhang 2014-12-04 21:20:25 EST
verify version:
libvirt-1.2.8-10.el7.x86_64
qemu-kvm-rhev-2.1.2-15.el7.x86_64
kernel-3.10.0-210.el7.x86_64

steps:
1.prepare a pool
# virsh pool-list --all
 Name                 State      Autostart 
-------------------------------------------
 default              active     yes       
 dir-pool             active     no  

2.get pool info 
# virsh pool-info dir-pool
Name:           dir-pool
UUID:           6de65198-b660-4cf1-a1c9-c3a8e228b9a9
State:          running
Persistent:     yes
Autostart:      no
Capacity:       99.95 GiB
Allocation:     4.01 GiB
Available:      95.94 GiB

3.get pool name from correct uuid
# virsh pool-name 6de65198-b660-4cf1-a1c9-c3a8e228b9a9
dir-pool

4.try to get pool name from no-exist pool uuid

# virsh pool-name 6de65198-b660-4cf1-a1c9-123456789098
error: failed to get pool '6de65198-b660-4cf1-a1c9-123456789098'
error: Storage pool not found: no storage pool with matching uuid '6de65198-b660-4cf1-a1c9-123456789098'

5. check volume using correct pool uuid 
# virsh vol-list 0f5a73bc-a7bc-4639-a172-9bd0989e2c85
 Name                 Path                                    
------------------------------------------------------------------------------
 vol1                 /tmp/dir-pool/vol1                      

6. check volume with no-exist pool uuid 
# virsh vol-list 0f5a73bc-a7bc-4639-a172-123456789098
error: failed to get pool '0f5a73bc-a7bc-4639-a172-123456789098'
error: Storage pool not found: no storage pool with matching name '0f5a73bc-a7bc-4639-a172-123456789098'

no garbage characters show in the error info . move to verified.
Comment 6 errata-xmlrpc 2015-03-05 02:37:26 EST
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/RHSA-2015-0323.html

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