Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1713288

Summary: mom should use unicode strings
Product: Red Hat Enterprise Virtualization Manager Reporter: Bhushan Ranpise <branpise>
Component: momAssignee: Andrej Krejcir <akrejcir>
Status: CLOSED ERRATA QA Contact: Polina <pagranat>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 4.1.10CC: akrejcir, dfediuck, lsurette, michal.skrivanek, mtessun, rdlugyhe, srevivo
Target Milestone: ovirt-4.4.0Flags: rdlugyhe: needinfo-
lsvaty: testing_plan_complete-
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: rhv-4.4.0-28 Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-08-04 13:27:06 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: SLA RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1795206    
Bug Blocks:    

Description Bhushan Ranpise 2019-05-23 10:38:41 UTC
Description of problem:

I have a customer whose clients use cyrillic alphabets (non ASCII symbols) on their computers for VMs and/or hosts.

The VM with non-ASCII symbol in name (cyrillic 'с') was causing constant reloads of mom.GuestManager every 30 seconds. Renaming and restarting VM helped to solve the problem so the customer wants this should be checked before VM creation or import.

At present RHV only supports alphanumeric, '.', '_' OR '-' characters in VM names.

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

rhevm-4.1.10.3-0.1.el7.noarch


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Below is the cu requirement for the said RFE request:

- What is the nature and description of the request?
VM with non-ASCII symbol in name (cyrillic 'с') was causing constant reloads of mom.GuestManager every 30 seconds. Renaming and restarting VM helped to solve the problem, but this should be checked before VM creation or import.

- Why do you need this? (List the business requirements here) 
To avoid further possible problems like this, as we work with clients that use cyrillic alphabets on their computers.

- How would you like to achieve this? (List the functional requirements here) 
Check if VM name contains unrecommended symbols before creation and import to RHV.

- Do you have any specific time-line dependencies? 
No.

- List any affected packages or components. 
mom.GuestManager

- Would you be able to assist in testing this functionality if implemented? 
Yes.

- For each functional requirement listed in the previous question, can test to confirm the requirement is successfully implemented.
Yes.

Comment 2 Ryan Barry 2019-05-24 00:45:10 UTC
RHVM has supported VMs with non-ASCII characters since 4.0 with https://bugzilla.redhat.com/show_bug.cgi?id=1260131

The problem here is in mom, which does not always use unicode strings. Changing component

Comment 7 Daniel Gur 2019-08-28 13:15:22 UTC
sync2jira

Comment 8 Daniel Gur 2019-08-28 13:21:08 UTC
sync2jira

Comment 11 Polina 2020-01-23 15:17:30 UTC
Hi, I'm verifying the issue on http://bob-dr.lab.eng.brq.redhat.com/builds/4.4/rhv-4.4.0-14.
The VM with name containing non-ASCII symbols in name (cyrillic) could not be started. Isn't this the case here?
I've created the VM with name 'мом_тест_1'

2020-01-23 17:12:40,814+02 ERROR [org.ovirt.engine.core.vdsbroker.vdsbroker.DestroyVDSCommand] (EE-ManagedScheduledExecutorService-engineScheduledThreadPool-Thread-83) [] Failed in 'DestroyVDS' method
2020-01-23 17:12:40,824+02 ERROR [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (EE-ManagedScheduledExecutorService-engineScheduledThreadPool-Thread-83) [] EVENT_ID: VDS_BROKER_COMMAND_FAILURE(10,802), VDSM host_mixed_3 command DestroyVDS failed: General Exception: ("'ascii' codec can't decode byte 0xd0 in position 152: ordinal not in range(128)",)
2020-01-23 17:12:40,824+02 INFO  [org.ovirt.engine.core.vdsbroker.vdsbroker.DestroyVDSCommand] (EE-ManagedScheduledExecutorService-engineScheduledThreadPool-Thread-83) [] Command 'org.ovirt.engine.core.vdsbroker.vdsbroker.DestroyVDSCommand' return value 'StatusOnlyReturn [status=Status [code=100, message=General Exception: ("'ascii' codec can't decode byte 0xd0 in position 152: ordinal not in range(128)",)]]'
2020-01-23 17:12:40,824+02 INFO  [org.ovirt.engine.core.vdsbroker.vdsbroker.DestroyVDSCommand] (EE-ManagedScheduledExecutorService-engineScheduledThreadPool-Thread-83) [] HostName = host_mixed_3
2020-01-23 17:12:40,825+02 ERROR [org.ovirt.engine.core.vdsbroker.vdsbroker.DestroyVDSCommand] (EE-ManagedScheduledExecutorService-engineScheduledThreadPool-Thread-83) [] Command 'DestroyVDSCommand(HostName = host_mixed_3, DestroyVmVDSCommandParameters:{hostId='eca190a6-0a8a-4e46-aae9-2178a7e3b1cd', vmId='26a2020c-dc5f-48dd-a895-fa774793dff4', secondsToWait='0', gracefully='false', reason='', ignoreNoVm='true'})' execution failed: VDSGenericException: VDSErrorException: Failed to DestroyVDS, error = General Exception: ("'ascii' codec can't decode byte 0xd0 in position 152: ordinal not in range(128)",), code = 100
@

Comment 12 Andrej Krejcir 2020-01-23 15:28:07 UTC
That looks like a problem in vdsm. Can you check if there is any error in vdsm.log on host_mixed_3?
If there was an error in mom, it would only be visible in mom.log, not in engine.log.

Comment 13 Polina 2020-01-26 09:58:09 UTC
there is error in vdsm.log and no error in mom.  Is the scenario here correct? - just create VM with the Cyrillic letters in the name and start.

2020-01-26 04:48:08,596-0500 ERROR (jsonrpc/4) [api] FINISH destroy error='ascii' codec can't decode byte 0xd0 in position 152: ordinal not in range(128) (api:134)
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/vdsm/common/api.py", line 124, in method
    ret = func(*args, **kwargs)
  File "/usr/lib/python3.6/site-packages/vdsm/API.py", line 295, in destroy
    res = self.vm.destroy(gracefulAttempts)
  File "/usr/lib/python3.6/site-packages/vdsm/virt/vm.py", line 4909, in destroy
    result = self.doDestroy(gracefulAttempts, reason)
  File "/usr/lib/python3.6/site-packages/vdsm/virt/vm.py", line 4928, in doDestroy
    return self.releaseVm(gracefulAttempts)
  File "/usr/lib/python3.6/site-packages/vdsm/virt/vm.py", line 4837, in releaseVm
    hooks.after_vm_destroy(self._domain.xml, self._custom)
  File "/usr/lib/python3.6/site-packages/vdsm/common/hooks.py", line 266, in after_vm_destroy
    raiseError=False)
  File "/usr/lib/python3.6/site-packages/vdsm/common/hooks.py", line 135, in _runHooksDir
    final_data = f.read()
  File "/usr/lib64/python3.6/encodings/ascii.py", line 26, in decode
    return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xd0 in position 152: ordinal not in range(128)

Comment 14 Polina 2020-01-27 13:30:08 UTC
The verification is prevented by another bug for VDSM https://bugzilla.redhat.com/show_bug.cgi?id=1795206 . marked in DependsOn field.

Comment 16 Polina 2020-06-02 15:06:37 UTC
verified in rhv-4.4.1-1. no errors in mom.log when working with VM name containing non-ASCII symbols in name.

Comment 23 errata-xmlrpc 2020-08-04 13:27:06 UTC
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 (RHV RHEL Host (ovirt-host) 4.4), 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/RHEA-2020:3246