Bug 1249130 - Non-ascii chars in the disk name break the template creation
Non-ascii chars in the disk name break the template creation
Status: CLOSED CURRENTRELEASE
Product: ovirt-engine
Classification: oVirt
Component: General (Show other bugs)
---
Unspecified Unspecified
unspecified Severity high (vote)
: ovirt-3.5.6
: 3.5.6
Assigned To: Idan Shaby
Aharon Canan
storage
: Regression
: 1259215 (view as bug list)
Depends On:
Blocks: 1219680 1260131
  Show dependency treegraph
 
Reported: 2015-07-31 11:07 EDT by Carlos Mestre González
Modified: 2016-02-10 13:03 EST (History)
18 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1257192 (view as bug list)
Environment:
Last Closed: 2015-12-22 08:24:57 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: Storage
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
rule-engine: ovirt‑3.5.z+
rule-engine: blocker+
sherold: planning_ack+
rule-engine: devel_ack+
rule-engine: testing_ack+


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
oVirt gerrit 45374 master MERGED core: encode non-ASCII disk alias/description Never
oVirt gerrit 45900 ovirt-engine-3.6 MERGED core: encode non-ASCII disk alias/description Never
oVirt gerrit 45926 ovirt-engine-3.5 MERGED core: encode non-ASCII disk alias/description Never

  None (edit)
Description Carlos Mestre González 2015-07-31 11:07:23 EDT
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 10:22:45 EDT
Talked to Yaniv Dary - this should just be blocked in UI+RESTAPI.
Comment 2 Carlos Mestre González 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)
Comment 3 Allon Mureinik 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.
Comment 4 Carlos Mestre González 2015-08-05 11:44:23 EDT
So is this bug going to be take care of the disk alias issue to?
Comment 5 Nir Soffer 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.
Comment 6 Allon Mureinik 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.
Comment 7 Nir Soffer 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 8 Allon Mureinik 2015-09-03 09:48:11 EDT
*** Bug 1259215 has been marked as a duplicate of this bug. ***
Comment 9 Allon Mureinik 2015-09-06 05:15:17 EDT
*** Bug 1260131 has been marked as a duplicate of this bug. ***
Comment 10 Red Hat Bugzilla Rules Engine 2015-09-24 08:20:20 EDT
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 09:25:06 EST
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 11:43:49 EST
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 11:43:53 EST
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 11:53:59 EST
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 04:06:30 EST
(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 08:24:57 EST
oVirt 3.5.6 has been released and the bz verified, moving to closed current release.

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