Bug 1249130

Summary: Non-ascii chars in the disk name break the template creation
Product: [oVirt] ovirt-engine Reporter: Carlos Mestre González <cmestreg>
Component: GeneralAssignee: Idan Shaby <ishaby>
Status: CLOSED CURRENTRELEASE QA Contact: Aharon Canan <acanan>
Severity: high Docs Contact:
Priority: unspecified    
Version: ---CC: acanan, amureini, bazulay, bugs, ecohen, gklein, ikroshki, ishaby, lsurette, mgoldboi, nsoffer, rbalakri, rmcswain, sherold, tnisan, ycui, yeylon, ylavi
Target Milestone: ovirt-3.5.6Keywords: Regression
Target Release: 3.5.6Flags: rule-engine: ovirt-3.5.z+
rule-engine: blocker+
sherold: planning_ack+
rule-engine: devel_ack+
rule-engine: testing_ack+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: storage
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1257192 (view as bug list) Environment:
Last Closed: 2015-12-22 13:24:57 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:
Bug Depends On:    
Bug Blocks: 1219680, 1260131    

Description Carlos Mestre González 2015-07-31 15:07:23 UTC
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?

Comment 1 Allon Mureinik 2015-08-03 14:22:45 UTC
Talked to Yaniv Dary - this should just be blocked in UI+RESTAPI.

Comment 2 Carlos Mestre González 2015-08-05 12:29:34 UTC
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)

Comment 3 Allon Mureinik 2015-08-05 13:27:24 UTC
(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.

Comment 4 Carlos Mestre González 2015-08-05 15:44:23 UTC
So is this bug going to be take care of the disk alias issue to?

Comment 5 Nir Soffer 2015-08-25 16:08:18 UTC
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.

Comment 6 Allon Mureinik 2015-08-26 07:51:58 UTC
(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.

Comment 7 Nir Soffer 2015-08-26 12:52:46 UTC
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 8 Allon Mureinik 2015-09-03 13:48:11 UTC
*** Bug 1259215 has been marked as a duplicate of this bug. ***

Comment 9 Allon Mureinik 2015-09-06 09:15:17 UTC
*** Bug 1260131 has been marked as a duplicate of this bug. ***

Comment 10 Red Hat Bugzilla Rules Engine 2015-09-24 12:20:20 UTC
This bug report has Keywords: Regression or TestBlocker.
Since no regressions or test blockers are allowed between releases, it is also being identified as a blocker for this release. Please resolve ASAP.

Comment 11 Eyal Edri 2015-11-01 14:25:06 UTC
this bug has both 3.5.z & 3.6.0 flags, in bugzilla lang it means its a clone candidate from 3.6.0 to 3.5.z meaning it's pending a clone and wasn't fixed for 3.5.z.

if this isn't the case, please fix flags accordingly,
if it is the case, then please clone the bugs to 3.5.7 (3.5.6 was built already)

Comment 12 Aharon Canan 2015-11-04 16:43:49 UTC
After reading comment#3 and comment#7, it looks like we should block non ascii, 
Right now using vt18 it seems to work [1] (we do not block it)

I am not sure i know what I should expect.

Are we blocking it or not? 

[1] I create VM called "test" with disk called "áéíñ" and then created template from it.

Comment 13 Red Hat Bugzilla Rules Engine 2015-11-04 16:43:53 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 14 Nir Soffer 2015-11-04 16:53:59 UTC
Aharon,using non ascii characters in disk alias or description should work now.

Should be easy to verify.

Comment 15 Aharon Canan 2015-11-05 09:06:30 UTC
(In reply to Nir Soffer from comment #14)
> Aharon,using non ascii characters in disk alias or description should work
> now.
> 
> Should be easy to verify.

Following above, verified (comment #12)

Comment 16 Sandro Bonazzola 2015-12-22 13:24:57 UTC
oVirt 3.5.6 has been released and the bz verified, moving to closed current release.