Bug 849931

Summary: qpid-config [filter-string] not working if "multi-byte characters" (UTF-8) queue is present.
Product: Red Hat Enterprise MRG Reporter: Leonid Zhaldybin <lzhaldyb>
Component: qpid-toolsAssignee: messaging-bugs <messaging-bugs>
Status: NEW --- QA Contact: MRG Quality Engineering <mrgqe-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 2.2CC: jross
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Leonid Zhaldybin 2012-08-21 09:24:20 UTC
Description of problem:
The attempt of running 'qpid-config queues filter-string' command returns error in case that the queue with multi-byte characters in its name is present on a broker. The filter string itself does not have to contain any multi-byte characters to cause this error. If the command contains no filter string at all (i.e., 'qpid-config queues'), then the list of all queues is displayed correctly.

[root@lzhaldyb-rhel63x ~]# qpid-config add queue test_queue
[root@lzhaldyb-rhel63x ~]# qpid-config queues test
Queue Name  Attributes
===================================
test_queue  
[root@lzhaldyb-rhel63x ~]# echo $?
0
[root@lzhaldyb-rhel63x ~]# qpid-config add queue тест
[root@lzhaldyb-rhel63x ~]# qpid-config queues
Queue Name                                     Attributes
======================================================================
qmfagent-c9c5801e-71dc-4278-94c8-1058432a26b6  auto-del excl 
qmfc-v2-hb-lzhaldyb-rhel63x.4562.1             auto-del excl --limit-policy=ring 
qmfc-v2-lzhaldyb-rhel63x.4562.1                auto-del excl 
qmfc-v2-ui-lzhaldyb-rhel63x.4562.1             auto-del excl --limit-policy=ring 
reply-lzhaldyb-rhel63x.4562.1                  auto-del excl 
test_queue                                     
topic-lzhaldyb-rhel63x.4562.1                  auto-del excl --limit-policy=ring 
тест                                       
[root@lzhaldyb-rhel63x ~]# echo $?
0
[root@lzhaldyb-rhel63x ~]# qpid-config queues test
Failed: UnicodeDecodeError: 'ascii' codec can't decode byte 0xd1 in position 0: ordinal not in range(128)
[root@lzhaldyb-rhel63x ~]# echo $?
1

Version-Release number of selected component (if applicable):
qpid-tools-0.14-5

How reproducible:
100%

Steps to Reproduce:
1. Add a queue with multi-byte characters in its name.
2. Try to run qpid-stat using filter string.
3.
  
Actual results:
qpid-stat returns an error "Failed: UnicodeDecodeError: 'ascii' codec can't decode byte 0xd1 in position 0: ordinal not in range(128)"

Expected results:
qpid-stat does not return any error.

Additional info:
The command 'qpid-stat exchanges filter-string' returns the same error.