Bug 1218151

Summary: Creation of template disk does not set the disk description with json formatting
Product: Red Hat Enterprise Virtualization Manager Reporter: Maor <mlipchuk>
Component: ovirt-engineAssignee: Maor <mlipchuk>
Status: CLOSED CURRENTRELEASE QA Contact: lkuchlan <lkuchlan>
Severity: low Docs Contact:
Priority: low    
Version: 3.6.0CC: acanan, amureini, gklein, lpeer, lsurette, mlipchuk, rbalakri, Rhev-m-bugs, yeylon, ykaul, ylavi
Target Milestone: ovirt-3.6.0-rc   
Target Release: 3.6.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 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 Maor 2015-05-04 09:50:42 UTC
Description of problem:
Template disks' description in the Storage should be initialized with json formatting containing the disk alias and the disk description

We get the following warning while trying to the unregistered entity, since the disk description is "Active VM" instead of the appropriate json formatting

2015-05-03 23:41:41,455 INFO  [org.ovirt.engine.core.vdsbroker.irsbroker.GetImageInfoVDSCommand] (org.ovirt.thread.pool-8-thread-47) [4a8a4ea5] START, GetImageInfoVDSCommand( storagePoolId = c5934f09-038a-4543-90f7-16265887ba98, ignoreFai
loverLimit = false, storageDomainId = 3066fbb2-dcdb-4398-8e0d-b864fa665be9, imageGroupId = da9c0fe5-67e5-4980-826d-bc9998361f6a, imageId = dc33a365-26a9-4e0f-9f57-4abf52605c99), log id: 3066290
2015-05-03 23:41:41,872 INFO  [org.ovirt.engine.core.vdsbroker.irsbroker.GetImageInfoVDSCommand] (org.ovirt.thread.pool-8-thread-47) [4a8a4ea5] FINISH, GetImageInfoVDSCommand, return: org.ovirt.engine.core.common.businessentities.DiskImag
e@98c43564, log id: 3066290
2015-05-03 23:42:37,167 WARNING [org.ovirt.engine.core.bll.GetUnregisteredDiskQuery] (org.ovirt.thread.pool-8-thread-47) [4a8a4ea5] Exception while parsing JSON for disk. Exception: '{}': org.codehaus.jackson.JsonParseException: Unexpecte
d character ('A' (code 65)): expected a valid value (number, String, array, object, 'true', 'false' or 'null')
 at [Source: java.io.StringReader@5fdd3387; line: 1, column: 2]

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


How reproducible:
100%

Steps to Reproduce:
1. Create a Template
2. Look into the disk meta data
3.

Actual results:
The meta data of the image is :

DOMAIN=3066fbb2-dcdb-4398-8e0d-b864fa665be9
VOLTYPE=SHARED
CTIME=1430683594
FORMAT=RAW
IMAGE=da9c0fe5-67e5-4980-826d-bc9998361f6a
DISKTYPE=2
PUUID=00000000-0000-0000-0000-000000000000
LEGALITY=LEGAL
MTIME=0
POOL_UUID=
DESCRIPTION=Active VM
TYPE=SPARSE
SIZE=2097152
EOF


Expected results:

The meta data of the disk should be as follow:

DOMAIN=3066fbb2-dcdb-4398-8e0d-b864fa665be9
VOLTYPE=SHARED
CTIME=1430729694
FORMAT=RAW
IMAGE=da9c0fe5-67e5-4980-826d-bc9998361f6a
DISKTYPE=2
PUUID=00000000-0000-0000-0000-000000000000
LEGALITY=LEGAL
MTIME=0
POOL_UUID=
DESCRIPTION={"DiskAlias":"Disk1","DiskDescription":"Active VM"}
TYPE=SPARSE
SIZE=2097152
EOF

Additional info:

Comment 1 lkuchlan 2015-05-27 08:45:25 UTC
Tested using:
ovirt-engine-3.6.0-0.0.master.20150519172219.git9a2e2b3.el6.noarch
vdsm-4.17.0-822.git9b11a18.el7.noarch

Verification instructions:
1. Create a Template
2. Look into the disk meta data

Result:
Creation of template disk sets the disk description with json formatting

Template disk meta data:
DOMAIN=86e9719c-539c-4882-8ee4-1c2c521f62fa
VOLTYPE=SHARED
CTIME=1432715454
FORMAT=RAW
IMAGE=b00fb909-c1cd-48c7-beb3-654f737b222a
DISKTYPE=2
PUUID=00000000-0000-0000-0000-000000000000
LEGALITY=LEGAL
MTIME=0
POOL_UUID=
DESCRIPTION={"DiskAlias":"vm_Disk1","DiskDescription":"Active VM"}
TYPE=SPARSE
SIZE=2097152
EOF

Comment 2 Yaniv Kaul 2015-12-28 18:49:42 UTC
Just seen it happening on my Lago setup:

2015-12-28 15:50:52,305 INFO  [org.ovirt.engine.core.vdsbroker.irsbroker.GetImageInfoVDSCommand] (default task-23) [1bc21627] FINISH, GetImageInfoVDSCommand, return: org.ovirt.engine.core.common.businessentities
.storage.DiskImage@b244e328, log id: 2f651e72
2015-12-28 15:50:52,306 WARN  [org.ovirt.engine.core.bll.GetUnregisteredDiskQuery] (default task-23) [1bc21627] Exception while parsing JSON for disk. Exception: '{}': org.codehaus.jackson.JsonParseException: Un
expected character ('A' (code 65)): expected a valid value (number, String, array, object, 'true', 'false' or 'null')
 at [Source: java.io.StringReader@68356eea; line: 1, column: 2]
        at org.codehaus.jackson.JsonParser._constructError(JsonParser.java:1433) [jackson-core-asl-1.9.13.jar:1.9.13]
        at org.codehaus.jackson.impl.JsonParserMinimalBase._reportError(JsonParserMinimalBase.java:521) [jackson-core-asl-1.9.13.jar:1.9.13]
        at org.codehaus.jackson.impl.JsonParserMinimalBase._reportUnexpectedChar(JsonParserMinimalBase.java:442) [jackson-core-asl-1.9.13.jar:1.9.13]
        at org.codehaus.jackson.impl.ReaderBasedParser._handleUnexpectedValue(ReaderBasedParser.java:1198) [jackson-core-asl-1.9.13.jar:1.9.13]
        at org.codehaus.jackson.impl.ReaderBasedParser.nextToken(ReaderBasedParser.java:485) [jackson-core-asl-1.9.13.jar:1.9.13]
        at org.codehaus.jackson.map.ObjectMapper._initForReading(ObjectMapper.java:2770) [jackson-mapper-asl-1.9.13.jar:1.9.13]
        at org.codehaus.jackson.map.ObjectMapper._readMapAndClose(ObjectMapper.java:2718) [jackson-mapper-asl-1.9.13.jar:1.9.13]
        at org.codehaus.jackson.map.ObjectMapper.readValue(ObjectMapper.java:1877) [jackson-mapper-asl-1.9.13.jar:1.9.13]



ovirt-engine-3.6.1.3-1.el6.noarch
vdsm-4.17.13-0.el7.centos.noarch

Comment 3 Maor 2015-12-29 08:59:07 UTC
The Lago setup is using a pre-defined Storage with OVF_STORE disk which contains OVFs which were configured before this fix.
The Template disks' OVF has no description in it, that is why this exception is thrown.

The Lago's Storage Domain needs to be refreshed with an updated OVF containing those fields' description so this exception will not be thrown anymore.
I've also talked about this with Dima at the time, but I assume it was not fixed eventually since this exception has not reflect any real regressions.

Comment 4 Yaniv Lavi 2015-12-29 11:01:11 UTC
(In reply to Maor from comment #3)
> The Lago setup is using a pre-defined Storage with OVF_STORE disk which
> contains OVFs which were configured before this fix.
> The Template disks' OVF has no description in it, that is why this exception
> is thrown.
> 
> The Lago's Storage Domain needs to be refreshed with an updated OVF
> containing those fields' description so this exception will not be thrown
> anymore.
> I've also talked about this with Dima at the time, but I assume it was not
> fixed eventually since this exception has not reflect any real regressions.

Can you please open a bug on Lago?

Comment 5 Yaniv Kaul 2015-12-29 11:10:15 UTC
(In reply to Yaniv Dary from comment #4)
> (In reply to Maor from comment #3)
> > The Lago setup is using a pre-defined Storage with OVF_STORE disk which
> > contains OVFs which were configured before this fix.
> > The Template disks' OVF has no description in it, that is why this exception
> > is thrown.
> > 
> > The Lago's Storage Domain needs to be refreshed with an updated OVF
> > containing those fields' description so this exception will not be thrown
> > anymore.
> > I've also talked about this with Dima at the time, but I assume it was not
> > fixed eventually since this exception has not reflect any real regressions.
> 
> Can you please open a bug on Lago?

https://bugzilla.redhat.com/show_bug.cgi?id=1294625

Comment 6 Allon Mureinik 2016-03-10 10:36:36 UTC
RHEV 3.6.0 has been released, setting status to CLOSED CURRENTRELEASE

Comment 7 Allon Mureinik 2016-03-10 10:37:45 UTC
RHEV 3.6.0 has been released, setting status to CLOSED CURRENTRELEASE

Comment 8 Allon Mureinik 2016-03-10 10:43:28 UTC
RHEV 3.6.0 has been released, setting status to CLOSED CURRENTRELEASE

Comment 9 Allon Mureinik 2016-03-10 12:00:15 UTC
RHEV 3.6.0 has been released, setting status to CLOSED CURRENTRELEASE