Bug 1303675 - [ovirt-shell] 'ascii' codec can't encode character u'\xed' in position 10: ordinal not in range(128)
Summary: [ovirt-shell] 'ascii' codec can't encode character u'\xed' in position 10: or...
Keywords:
Status: CLOSED DUPLICATE of bug 807696
Alias: None
Product: ovirt-engine-cli
Classification: oVirt
Component: Core
Version: 3.6.0.2
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: ---
Assignee: Juan Hernández
QA Contact: Pavel Stehlik
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-02-01 16:09 UTC by Jiri Belka
Modified: 2016-02-01 17:53 UTC (History)
2 users (show)

Fixed In Version: ovirt-engine-cli-3.6.2.0
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-02-01 17:53:05 UTC
oVirt Team: Infra
Embargoed:
rule-engine: planning_ack?
juan.hernandez: devel_ack+
rule-engine: testing_ack?


Attachments (Terms of Use)

Description Jiri Belka 2016-02-01 16:09:55 UTC
Description of problem:

I can't open spice console from ovirt-shell if my host certs has unicode in subjectname.

(Pdb) p host_subject
u'O=Consejer\xeda de Educaci\xf3n,CN=10.34.63.223'

[oVirt shell (connected)]# console jb-w2k8-x64
  ================================================================================================== UNKNOWN ERROR ===============================================================================================
                                                               'ascii' codec can't encode character u'\xed' in position 10: ordinal not in range(128)
  ================================================================================================================================================================================================================

If downloaded from Admin Portal...

$ egrep "^(host-subject|ca)" /tmp/console.vv      
host-subject=O=Consejería de Educación,CN=10.34.63.223
ca=-----BEGIN CERTIFICATE-----\nMIIELDCCAxSgAwIBAgICEAAwDQYJKoZIhvcNAQEFBQAwajELMAkGA1UEBhMCVVMxJDAiBgNVBAoT\nG3JoZXYubGFiLmVuZy5icnEucmVkaGF0LmNvbTE1MDMGA1UEAxMsamItcmhldm0zNi5yaGV2Lmxh\nYi5lbmcuYnJxLnJlZGhhdC5jb20uNDIxMTMwHhcNMTUwODE2MTEzNzM3WhcNMjUwODE0MTEzNzM3\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+nJiTtGKth6aTobbPv7\ntoM7xn4ofST66TMAQ6PrckVf/z/VR8cVMKNZKpRFG5KVC5YCaEOzv+R9CyTMmroIiE0MK9os0uKU\n6GRXnS8gIRvqcjnmG+VsL4iXaftkXAcXpxOOxva9cN0NbzM9eUaJSvaaYQeRFg==\n-----END CERTIFICATE-----\n

$ echo '' | openssl s_client -connect 10.34.63.223:5901 -showcerts 2>&1 | grep '^subject'
subject=/O=Consejer\xEDa de Educaci\xF3n/CN=10.34.63.223


Version-Release number of selected component (if applicable):
ovirt-engine-cli-3.6.0.2 

How reproducible:
100%

Steps to Reproduce:
1. have a host with unicode in subjectname in cert
2.
3.

Actual results:
unable to open console

Expected results:
should work

Additional info:

I have this in DB for some old bug (BZ1245230):

engine=# SELECT option_name,option_value from vdc_options where option_name='OrganizationName';
   option_name    |      option_value       
------------------+-------------------------
 OrganizationName | Consejería de Educación
(1 row)

Comment 1 Juan Hernández 2016-02-01 16:16:34 UTC
Can you run the CLI with the "-d" option and add the stack trace to the bug?

Comment 3 Juan Hernández 2016-02-01 17:08:08 UTC
Note that this issue was fixed as part of bug 807696, see comment 16:

  https://bugzilla.redhat.com/show_bug.cgi?id=807696#c16

Comment 4 Red Hat Bugzilla Rules Engine 2016-02-01 17:08:20 UTC
Fixed bug tickets must have version flags set prior to fixing them. Please set the correct version flags and move the bugs back to the previous status after this is corrected.

Comment 5 Red Hat Bugzilla Rules Engine 2016-02-01 17:08:20 UTC
Bug tickets must have version flags set prior to targeting them to a release. Please ask maintainer to set the correct version flags and only then set the target milestone.

Comment 6 Jiri Belka 2016-02-01 17:53:05 UTC
works fine with ovirt-engine-cli-3.6.2.1

*** This bug has been marked as a duplicate of bug 807696 ***


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