Bug 1257192

Summary: Non-ascii chars in the disk description or alias break the template creation
Product: [oVirt] vdsm Reporter: Nir Soffer <nsoffer>
Component: GeneralAssignee: Idan Shaby <ishaby>
Status: CLOSED INSUFFICIENT_DATA QA Contact: Aharon Canan <acanan>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: ---CC: acanan, amureini, bazulay, bugs, cmestreg, danken, gklein, ishaby, lsurette, mgoldboi, nsoffer, rbalakri, srevivo, tnisan, ycui, ykaul, ylavi
Target Milestone: ovirt-4.0.0-alphaFlags: tnisan: ovirt-4.0.0?
rule-engine: planning_ack?
rule-engine: devel_ack?
rule-engine: testing_ack?
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1249130 Environment:
Last Closed: 2016-04-20 08:42:53 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Storage RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Nir Soffer 2015-08-26 12:53:44 UTC
+++ This bug was initially created as a clone of Bug #1249130 +++

Description of problem:
Creating a template from a vm with a disk with non ascii characters fails.

maybe regression from this - BZ1002249

Version-Release number of selected component (if applicable):
ovirt-engine-3.6.0-0.0.master.20150726172446.git65db93d.el6.noarch

How reproducible:
100%

Steps to Reproduce:
1. Create a vm with a disk
2. Update the disk name with a non ascii character (like áéíñ)
3. Try to create the template

Actual results:
Fails to create a template
16:32:26 2015-07-30 16:31:30,469 INFO  [org.ovirt.engine.core.bll.AddVmFromScratchCommand] (default task-24) [vms_create_4d0e21e3-2068-4d59] Lock Acquired to object 'EngineLock:{exclusiveLocks='[storage_vm=<VM_NAME, ACTION_TYPE_FAILED_OBJECT_LOCKED>]', sharedLocks='null'}'
16:32:26 2015-07-30 16:31:43,521 ERROR [org.ovirt.engine.core.vdsbroker.irsbroker.SetVolumeDescriptionVDSCommand] (default task-12) [disks_update_8c50f70e-f162-4a7f] Failed in 'SetVolumeDescriptionVDS' method
16:32:26 2015-07-30 16:31:43,524 ERROR [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (default task-12) [disks_update_8c50f70e-f162-4a7f] Correlation ID: null, Call Stack: null, Custom Event ID: -1, Message: VDSM command failed: 'ascii' codec can't encode character u'\xe9' in position 26: ordinal not in range(128)
16:32:26 2015-07-30 16:31:43,525 ERROR [org.ovirt.engine.core.vdsbroker.irsbroker.SetVolumeDescriptionVDSCommand] (default task-12) [disks_update_8c50f70e-f162-4a7f] Command 'SetVolumeDescriptionVDSCommand( SetVolumeDescriptionVDSCommandParameters:{runAsync='true', storagePoolId='f3662110-7365-47b6-8a14-8a5d30e2b71e', ignoreFailoverLimit='false', storageDomainId='7208828d-02fa-432e-ba0f-02662868073d', imageGroupId='e4855506-bc43-4582-a6fe-a567e9959cb2', imageId='267bcadb-8876-4986-8b46-daeb3582bbf6'})' execution failed: IRSGenericException: IRSErrorException: Failed to SetVolumeDescriptionVDS, error = 'ascii' codec can't encode character u'\xe9' in position 26: ordinal not in range(128), code = 100
16:32:26 2015-07-30 16:31:43,525 INFO  [org.ovirt.engine.core.vdsbroker.irsbroker.SetVolumeDescriptionVDSCommand] (default task-12) [disks_update_8c50f70e-f162-4a7f] FINISH, SetVolumeDescriptionVDSCommand, log id: 6d61ad0b
16:32:26 2015-07-30 16:31:43,525 ERROR [org.ovirt.engine.core.bll.UpdateVmDiskCommand] (default task-12) [disks_update_8c50f70e-f162-4a7f] Exception while setting volume description for disk. ERROR: '{}': org.ovirt.engine.core.common.errors.EngineException: EngineException: org.ovirt.engine.core.vdsbroker.irsbroker.IrsOperationFailedNoFailoverException: IRSGenericException: IRSErrorException: Failed to SetVolumeDescriptionVDS, error = 'ascii' codec can't encode character u'\xe9' in position 26: ordinal not in range(128), code = 100 (Failed with error GeneralException and code 100)
16:32:26 	at org.ovirt.engine.core.bll.VdsHandler.handleVdsResult(VdsHandler.java:112) [bll.jar:]
16:32:26 	at org.ovirt.engine.core.bll.VDSBrokerFrontendImpl.RunVdsCommand(VDSBrokerFrontendImpl.java:33) [bll.jar:]
16:32:26 	at org.ovirt.engine.core.bll.CommandBase.runVdsCommand(CommandBase.java:2091) [bll.jar:]
16:32:26 	at org.ovirt.engine.core.bll.UpdateVmDiskCommand.updateMetaDataDescription(UpdateVmDiskCommand.java:473) [bll.jar:]
16:32:26 	at org.ovirt.engine.core.bll.UpdateVmDiskCommand.performDiskUpdate(UpdateVmDiskCommand.java:384) [bll.jar:]
16:32:26 	at org.ovirt.engine.core.bll.UpdateVmDiskCommand.executeVmCommand(UpdateVmDiskCommand.java:149) [bll.jar:]
16:32:26 	at org.ovirt.engine.core.bll.VmCommand.executeCommand(VmCommand.java:104) [bll.jar:]
16:32:26 	at org.ovirt.engine.core.bll.CommandBase.executeWithoutTransaction(CommandBase.java:1211) [bll.jar:]
16:32:26 	at org.ovirt.engine.core.bll.CommandBase.executeActionInTransactionScope(CommandBase.java:1355) [bll.jar:]
16:32:26 	at org.ovirt.engine.core.bll.CommandBase.runInTransaction(CommandBase.java:1979) [bll.jar:]
16:32:26 	at org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInSuppressed(TransactionSupport.java:174) [utils.jar:]
16:32:26 	at org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInScope(TransactionSupport.java:116) [utils.jar:]
16:32:26 	at org.ovirt.engine.core.bll.CommandBase.execute(CommandBase.java:1392) [bll.jar:]
16:32:26 	at org.ovirt.engine.core.bll.CommandBase.executeAction(CommandBase.java:374) [bll.jar:]
16:32:26 	at org.ovirt.engine.core.bll.Backend.runAction(Backend.java:475) [bll.jar:]


Expected results:
Template is created

Additional info:
Also I cannot add a disk to a VM with a non-ascii characters in the description, but I can update the disk name later, another bug?

--- Additional comment from Allon Mureinik on 2015-08-03 10:22:45 EDT ---

Talked to Yaniv Dary - this should just be blocked in UI+RESTAPI.

--- Additional comment from Carlos Mestre González on 2015-08-05 08:29:34 EDT ---

Hi Allon,

so just to clarify, creating of a template from a disk with non-ascii characters in the alias should be blocked, right?

What about add/editing a disk's alias with non-ascii characters? Currently adding a disk with non-ascii characters fails, but update the disk alias pass. is this correct? Seems to me both actions should be the same (either allow or not)

--- Additional comment from Allon Mureinik on 2015-08-05 09:27:24 EDT ---

(In reply to Carlos Mestre González from comment #2)
> so just to clarify, creating of a template from a disk with non-ascii
> characters in the alias should be blocked, right?
Probably, yes.

> What about add/editing a disk's alias with non-ascii characters? Currently
> adding a disk with non-ascii characters fails, but update the disk alias
> pass. is this correct? Seems to me both actions should be the same (either
> allow or not)
Should all be blocked, IMHO.

--- Additional comment from Carlos Mestre González on 2015-08-05 11:44:23 EDT ---

So is this bug going to be take care of the disk alias issue to?

--- Additional comment from Nir Soffer on 2015-08-25 12:08:18 EDT ---

This is an issue in vdsm:

    'ascii' codec can't encode character u'\xe9' in position 26: ordinal
    not in range(128)

Vdsm should be fixed to encode unicode description properly.

--- Additional comment from Allon Mureinik on 2015-08-26 03:51:58 EDT ---

(In reply to Nir Soffer from comment #5)
> This is an issue in vdsm:
> 
>     'ascii' codec can't encode character u'\xe9' in position 26: ordinal
>     not in range(128)

True.

> Vdsm should be fixed to encode unicode description properly.
Also true - but insufficient to solve this bug. We cannot have newer engines breaking existing VDSMs.

Nir/Idan - Please clone this bug to VDSM so we can pursue this direction upstream, regardless of the engine fix that's required for zstream.

--- Additional comment from Nir Soffer on 2015-08-26 08:52:46 EDT ---

Since current vdsm does not support non-ascii description or even base64
(due to padding with "="), engine must avoid sending such data to vdsm.

Comment 1 Red Hat Bugzilla Rules Engine 2015-10-19 11:01:11 UTC
Target release should be placed once a package build is known to fix a issue. Since this bug is not modified, the target version has been reset. Please use target milestone to plan a fix for a oVirt release.

Comment 2 Sandro Bonazzola 2015-10-26 12:28:43 UTC
this is an automated message. oVirt 3.6.0 RC3 has been released and GA is targeted to next week, Nov 4th 2015.
Please review this bug and if not a blocker, please postpone to a later release.
All bugs not postponed on GA release will be automatically re-targeted to

- 3.6.1 if severity >= high
- 4.0 if severity < high

Comment 3 Allon Mureinik 2015-10-27 16:12:42 UTC
Idan, shouldn't this already be done?
What's the gap between the stuff you already merged and this?

Comment 4 Yaniv Lavi 2015-10-27 16:43:29 UTC
We are fixing for 3.5 and 4.0 only? This is not possible.
We have to fix for the next release, if we fix for z stream.

Comment 5 Tal Nisan 2015-11-01 11:21:02 UTC
Why 3.5? It's a 4.0 only, the other related Engine bug covered 3.6 + 3.5 on Engine side

Comment 6 Allon Mureinik 2016-04-20 08:42:53 UTC
(In reply to Allon Mureinik from comment #3)
> Idan, shouldn't this already be done?
> What's the gap between the stuff you already merged and this?
Closing.
If someone can answer the question, feel free to reopen.