Bug 1006884

Summary: Update VM pool name, description and size fail with NPE
Product: Red Hat Enterprise Virtualization Manager Reporter: Ohad Basan <obasan>
Component: ovirt-engineAssignee: Shahar Havivi <shavivi>
Status: CLOSED CURRENTRELEASE QA Contact: Ilanit Stein <istein>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 3.3.0CC: acathrow, ecohen, eedri, iheim, istein, lpeer, mavital, michal.skrivanek, rhev-integ, Rhev-m-bugs, shavivi, yeylon
Target Milestone: ---Keywords: Triaged
Target Release: 3.3.0Flags: istein: needinfo+
shavivi: needinfo-
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: virt
Fixed In Version: is20 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-01-21 22:17:25 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1026487    

Description Ohad Basan 2013-09-11 12:53:51 UTC
Description of problem:

2013-09-11 15:13:50,702 - MainThread - vmpools - DEBUG - Response body for PUT request is: 
<fault>
    <reason>Operation Failed</reason>
    <detail>[Cannot edit VM-Pool. Cannot set single display device to non Linux operating system.]</detail>
</fault>
 
2013-09-11 15:13:50,702 - MainThread - vmpools - ERROR - Response code is not valid, expected is: [200, 201], actual is: 400 
2013-09-11 15:13:50,703 - MainThread - test_runner - ERROR - Test Case failed: There is no Exception.Test returned False.
2013-09-11 15:13:50,962 - MainThread - plmanagement.error_fetcher - ERROR - Errors fetched from VDC(jenkins-automation-rpm-vm44.eng.lab.tlv.redhat.com): 2013-09-11 15:13:50,661 ERROR [org.ovirt.engine.core.bll.job.ExecutionHandler] (ajp-/127.0.0.1:8702-3) java.lang.NullPointerException
2013-09-11 15:13:50,676 INFO  [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (ajp-/127.0.0.1:8702-3) Correlation ID: null, Call Stack: null, Custom Event ID: -1, Message: VM Pool rest_testPool was renamed from rest_testPool to rest_testPoolUpd.
2013-09-11 15:13:50,697 ERROR [org.ovirt.engine.api.restapi.resource.AbstractBackendResource] (ajp-/127.0.0.1:8702-3) Operation Failed: [Cannot edit VM-Pool. Cannot set single display device to non Linux operating system.]

Comment 2 Shahar Havivi 2013-09-11 13:57:24 UTC
posted fix at: http://gerrit.ovirt.org/#/c/19142/

Comment 4 Michal Skrivanek 2013-09-23 13:08:10 UTC
missed the branch off, needs to be backported to ovirt-engine-3.3

Comment 5 Ilanit Stein 2013-10-03 06:47:02 UTC
I see this same bug in sf20.3. Will this bug going to be fixed on 3.2 as well?

Comment 6 Ilanit Stein 2013-10-06 12:09:16 UTC
Please fix this bug for 3.2.x too. I can't turn on the 3.2.z flag, since I don't have the permissions.

Comment 9 Michal Skrivanek 2013-10-07 12:34:03 UTC
not likely that you see the same error, single video device is a 3.3 feature.
Can you please add the response you see?

Comment 10 Ilanit Stein 2013-10-07 13:33:24 UTC
No need to fix for 3.2. The error I had for 3.2 is not the same as here. Sorry for the confusion.

Comment 12 Ilanit Stein 2013-10-27 14:21:19 UTC
Checked on is20, using poster:
Got same error when trying to update size (num of vms in pool) to a higher number. 

Maybe fix is not included yet in this version?

ERROR:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<fault>
    <reason>Operation Failed</reason>
    <detail>[Cannot edit VM-Pool. Cannot set single display device to non Linux operating system.]</detail>
</fault>

Comment 14 Shahar Havivi 2013-10-28 07:18:00 UTC
Ilanit
What is the request xml?

Comment 15 Ilanit Stein 2013-10-28 07:46:17 UTC
This is the PUT request (It fail for size bigger then existing one, here vmpool with 4 vms. update to size 5, fails it.):
-------------------------------------------

Url:  https://istein-33.scl.lab.tlv.redhat.com/api/vmpools/c7aa7b8e-92c3-4d84-9822-858b206ee759

user: admin@internal password: 123456

content type: application/xml

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <vmpool href="/api/vmpools/c7aa7b8e-92c3-4d84-9822-858b206ee759" id="c7aa7b8e-92c3-4d84-9822-858b206ee759">
        <actions>
            <link href="/api/vmpools/c7aa7b8e-92c3-4d84-9822-858b206ee759/allocatevm" rel="allocatevm"/>
        </actions>
        <name>testpool_testnew_1</name>
        <description>description test new_1</description>
        <size>5</size>
        <cluster href="/api/clusters/99408929-82cf-4dc7-a532-9d998063fa95" id="99408929-82cf-4dc7-a532-9d998063fa95"/>
        <template href="/api/templates/1515e8c1-bc13-462a-b58a-bc166b4f10c5" id="1515e8c1-bc13-462a-b58a-bc166b4f10c5"/>
        <prestarted_vms>0</prestarted_vms>
        <max_user_vms>1</max_user_vms>
    </vmpool>

Response (status 400, bad request):
----------------------------------
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<fault>
    <reason>Operation Failed</reason>
    <detail>[Cannot edit VM-Pool. Cannot set single display device to non Linux operating system.]</detail>
</fault>

Comment 16 Ilanit Stein 2013-11-04 14:14:21 UTC
Verified on is20.2. 

This fix was not included in is20.
However on is20.2 it is included.

Comment 17 Itamar Heim 2014-01-21 22:17:25 UTC
Closing - RHEV 3.3 Released

Comment 18 Itamar Heim 2014-01-21 22:24:01 UTC
Closing - RHEV 3.3 Released