Red Hat Bugzilla – Bug 1104993
Garbage characters show in the output of pool-name with no-exist pool UUID
Last modified: 2015-03-05 02:37:26 EST
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:
There are multiple instances of the problem across various storage driver APIs.
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
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.
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