Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
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.
Description of problem:
Problem with virt-who using Unicode characters in a hypervisor's account password.
This bug is same as 1357761 [1] but for virt-who on RHEL 7
Version-Release number of selected component (if applicable):
RHEL 7.4
virt-who-0.19-6.el7_4.noarch
How reproducible:
100%
Steps to Reproduce:
1. In VMWare create user, which has password with UTF character, e.g. 123€abc!
2. Install virt-who and configure to grab info from ESX
3. Enter password with UTF to .conf file Can be both as "password" or "encrypted_password"
Actual results:
Password with the UTF character is not processed.
Expected results:
Password to hypervisor's account can contain UTF character
Additional info:
Error with latest virt-who
~~~
Option 'password' is not in latin1 encoding
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/virtwho/__main__.py", line 11, in main
res = virtwho.main.main()
File "/usr/lib/python2.7/site-packages/virtwho/main.py", line 129, in main
executor = Executor(logger, options)
File "/usr/lib/python2.7/site-packages/virtwho/executor.py", line 49, in __init__
self.configManager = ConfigManager(self.logger, config_dir)
File "/usr/lib/python2.7/site-packages/virtwho/config.py", line 556, in __init__
self._readConfig(parser)
File "/usr/lib/python2.7/site-packages/virtwho/config.py", line 573, in _readConfig
config = Config.fromParser(section, parser, self._defaults)
File "/usr/lib/python2.7/site-packages/virtwho/config.py", line 481, in fromParser
config = Config(name, type, defaults, **options)
File "/usr/lib/python2.7/site-packages/virtwho/config.py", line 415, in __init__
raise InvalidOption("Option '{}' is not in latin1 encoding".format(option))
InvalidOption: Option 'password' is not in latin1 encoding
No handlers could be found for logger "virtwho.main"
~~~
Tried virt-who from github, which should have it fixed, error:
~~~
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/virt_who-0.20.4-py2.7.egg/virtwho/virt/virt.py", line 380, in run
self._run()
File "/usr/lib/python2.7/site-packages/virt_who-0.20.4-py2.7.egg/virtwho/virt/esx/esx.py", line 145, in _run
self._prepare()
File "/usr/lib/python2.7/site-packages/virt_who-0.20.4-py2.7.egg/virtwho/virt/esx/esx.py", line 133, in _prepare
self.login()
File "/usr/lib/python2.7/site-packages/virt_who-0.20.4-py2.7.egg/virtwho/virt/esx/esx.py", line 353, in login
self.client.service.Login(_this=self.sc.sessionManager, userName=self.username, password=self.password)
File "/usr/lib/python2.7/site-packages/suds/client.py", line 566, in __call__
return client.invoke(args, kwargs)
File "/usr/lib/python2.7/site-packages/suds/client.py", line 700, in invoke
soapenv = binding.get_message(self.method, args, kwargs)
File "/usr/lib/python2.7/site-packages/suds/bindings/binding.py", line 122, in get_message
content = self.bodycontent(method, args, kwargs)
File "/usr/lib/python2.7/site-packages/suds/bindings/document.py", line 96, in bodycontent
add_param, self.options().extraArgumentErrors)
File "/usr/lib/python2.7/site-packages/suds/argparser.py", line 83, in parse_args
return arg_parser(args, kwargs, extra_parameter_errors)
File "/usr/lib/python2.7/site-packages/suds/argparser.py", line 108, in __call__
self.__process_parameters()
File "/usr/lib/python2.7/site-packages/suds/argparser.py", line 299, in __process_parameters
self.__process_parameter(*pdef)
File "/usr/lib/python2.7/site-packages/suds/argparser.py", line 294, in __process_parameter
self.__in_choice_context(), value)
File "/usr/lib/python2.7/site-packages/suds/bindings/document.py", line 87, in add_param
p = self.mkparam(method, pdef, value)
File "/usr/lib/python2.7/site-packages/suds/bindings/document.py", line 129, in mkparam
return super(Document, self).mkparam(method, pdef, object)
File "/usr/lib/python2.7/site-packages/suds/bindings/binding.py", line 244, in mkparam
return marshaller.process(content)
File "/usr/lib/python2.7/site-packages/suds/mx/core.py", line 55, in process
self.append(document, content)
File "/usr/lib/python2.7/site-packages/suds/mx/core.py", line 68, in append
self.appender.append(parent, content)
File "/usr/lib/python2.7/site-packages/suds/mx/appender.py", line 86, in append
appender.append(parent, content)
File "/usr/lib/python2.7/site-packages/suds/mx/appender.py", line 182, in append
child.setText(tostr(content.value))
File "/usr/lib/python2.7/site-packages/suds/sax/element.py", line 259, in setText
value = Text(value)
File "/usr/lib/python2.7/site-packages/suds/sax/text.py", line 43, in __new__
result = super(Text, cls).__new__(cls, *args, **kwargs)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 3: ordinal not in range(128)
~~~
I've built python2-suds-0.7-0.5.94664ddd46a6.el7.noarch.rpm but no success as well (same error)
[1] https://bugzilla.redhat.com/show_bug.cgi?id=1357761
I was able to verify that original PR did not solve the issue described in this bug report. I created PR with bug fix and I'm moving this bug report to state POST.
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://access.redhat.com/errata/RHBA-2018:3169
Description of problem: Problem with virt-who using Unicode characters in a hypervisor's account password. This bug is same as 1357761 [1] but for virt-who on RHEL 7 Version-Release number of selected component (if applicable): RHEL 7.4 virt-who-0.19-6.el7_4.noarch How reproducible: 100% Steps to Reproduce: 1. In VMWare create user, which has password with UTF character, e.g. 123€abc! 2. Install virt-who and configure to grab info from ESX 3. Enter password with UTF to .conf file Can be both as "password" or "encrypted_password" Actual results: Password with the UTF character is not processed. Expected results: Password to hypervisor's account can contain UTF character Additional info: Error with latest virt-who ~~~ Option 'password' is not in latin1 encoding Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/virtwho/__main__.py", line 11, in main res = virtwho.main.main() File "/usr/lib/python2.7/site-packages/virtwho/main.py", line 129, in main executor = Executor(logger, options) File "/usr/lib/python2.7/site-packages/virtwho/executor.py", line 49, in __init__ self.configManager = ConfigManager(self.logger, config_dir) File "/usr/lib/python2.7/site-packages/virtwho/config.py", line 556, in __init__ self._readConfig(parser) File "/usr/lib/python2.7/site-packages/virtwho/config.py", line 573, in _readConfig config = Config.fromParser(section, parser, self._defaults) File "/usr/lib/python2.7/site-packages/virtwho/config.py", line 481, in fromParser config = Config(name, type, defaults, **options) File "/usr/lib/python2.7/site-packages/virtwho/config.py", line 415, in __init__ raise InvalidOption("Option '{}' is not in latin1 encoding".format(option)) InvalidOption: Option 'password' is not in latin1 encoding No handlers could be found for logger "virtwho.main" ~~~ Tried virt-who from github, which should have it fixed, error: ~~~ Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/virt_who-0.20.4-py2.7.egg/virtwho/virt/virt.py", line 380, in run self._run() File "/usr/lib/python2.7/site-packages/virt_who-0.20.4-py2.7.egg/virtwho/virt/esx/esx.py", line 145, in _run self._prepare() File "/usr/lib/python2.7/site-packages/virt_who-0.20.4-py2.7.egg/virtwho/virt/esx/esx.py", line 133, in _prepare self.login() File "/usr/lib/python2.7/site-packages/virt_who-0.20.4-py2.7.egg/virtwho/virt/esx/esx.py", line 353, in login self.client.service.Login(_this=self.sc.sessionManager, userName=self.username, password=self.password) File "/usr/lib/python2.7/site-packages/suds/client.py", line 566, in __call__ return client.invoke(args, kwargs) File "/usr/lib/python2.7/site-packages/suds/client.py", line 700, in invoke soapenv = binding.get_message(self.method, args, kwargs) File "/usr/lib/python2.7/site-packages/suds/bindings/binding.py", line 122, in get_message content = self.bodycontent(method, args, kwargs) File "/usr/lib/python2.7/site-packages/suds/bindings/document.py", line 96, in bodycontent add_param, self.options().extraArgumentErrors) File "/usr/lib/python2.7/site-packages/suds/argparser.py", line 83, in parse_args return arg_parser(args, kwargs, extra_parameter_errors) File "/usr/lib/python2.7/site-packages/suds/argparser.py", line 108, in __call__ self.__process_parameters() File "/usr/lib/python2.7/site-packages/suds/argparser.py", line 299, in __process_parameters self.__process_parameter(*pdef) File "/usr/lib/python2.7/site-packages/suds/argparser.py", line 294, in __process_parameter self.__in_choice_context(), value) File "/usr/lib/python2.7/site-packages/suds/bindings/document.py", line 87, in add_param p = self.mkparam(method, pdef, value) File "/usr/lib/python2.7/site-packages/suds/bindings/document.py", line 129, in mkparam return super(Document, self).mkparam(method, pdef, object) File "/usr/lib/python2.7/site-packages/suds/bindings/binding.py", line 244, in mkparam return marshaller.process(content) File "/usr/lib/python2.7/site-packages/suds/mx/core.py", line 55, in process self.append(document, content) File "/usr/lib/python2.7/site-packages/suds/mx/core.py", line 68, in append self.appender.append(parent, content) File "/usr/lib/python2.7/site-packages/suds/mx/appender.py", line 86, in append appender.append(parent, content) File "/usr/lib/python2.7/site-packages/suds/mx/appender.py", line 182, in append child.setText(tostr(content.value)) File "/usr/lib/python2.7/site-packages/suds/sax/element.py", line 259, in setText value = Text(value) File "/usr/lib/python2.7/site-packages/suds/sax/text.py", line 43, in __new__ result = super(Text, cls).__new__(cls, *args, **kwargs) UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 3: ordinal not in range(128) ~~~ I've built python2-suds-0.7-0.5.94664ddd46a6.el7.noarch.rpm but no success as well (same error) [1] https://bugzilla.redhat.com/show_bug.cgi?id=1357761