Bug 982207

Summary: [engine] Able to create vm on datacenter without storage
Product: Red Hat Enterprise Virtualization Manager Reporter: Gadi Ickowicz <gickowic>
Component: ovirt-engineAssignee: Nobody's working on this, feel free to take it <nobody>
Status: CLOSED WONTFIX QA Contact:
Severity: medium Docs Contact:
Priority: unspecified    
Version: 3.3.0CC: acathrow, iheim, jkt, lpeer, lsvaty, nlevinki, Rhev-m-bugs, yeylon
Target Milestone: ---Keywords: Triaged
Target Release: 3.3.0   
Hardware: All   
OS: Linux   
Whiteboard: virt
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-07-08 15:43:07 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:
Attachments:
Description Flags
engine logs none

Description Gadi Ickowicz 2013-07-08 11:49:43 UTC
Created attachment 770454 [details]
engine logs

Description of problem:
It is possible to create a vm (without disks) on a datacenter that has no storage domain attached at all. This is possible through REST

Version-Release number of selected component (if applicable):
rhevm-3.3.0-0.6.master.el6ev.noarch

How reproducible:
100%

Steps to Reproduce:
1. Create new Datacenter and cluster. Add host
2. Create a new vm on the cluster using REST:
<vm>
<name>VmName</name>
<cluster>
<name>cluster1</name>
</cluster>
<template>
<name>Blank</name>
</template>
</vm>

Actual results:
VM is created successfully. response is:


    Status Code: 201 Created
    Connection: close
    Content-Encoding: gzip
    Content-Length: 809
    Content-Type: application/xml
    Date: Mon, 08 Jul 2013 11:43:35 GMT
    Location: https://gadi-rhevm.scl.lab.tlv.redhat.com/api/api/vms/8a9e7ed6-588f-4e3f-883b-f26218ab8021
    Vary: Accept-Encoding

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<vm href="/api/vms/8a9e7ed6-588f-4e3f-883b-f26218ab8021" id="8a9e7ed6-588f-4e3f-883b-f26218ab8021">
    <actions>
        <link href="/api/vms/8a9e7ed6-588f-4e3f-883b-f26218ab8021/ticket" rel="ticket"/>
        <link href="/api/vms/8a9e7ed6-588f-4e3f-883b-f26218ab8021/migrate" rel="migrate"/>
        <link href="/api/vms/8a9e7ed6-588f-4e3f-883b-f26218ab8021/cancelmigration" rel="cancelmigration"/>
        <link href="/api/vms/8a9e7ed6-588f-4e3f-883b-f26218ab8021/shutdown" rel="shutdown"/>
        <link href="/api/vms/8a9e7ed6-588f-4e3f-883b-f26218ab8021/start" rel="start"/>
        <link href="/api/vms/8a9e7ed6-588f-4e3f-883b-f26218ab8021/stop" rel="stop"/>
        <link href="/api/vms/8a9e7ed6-588f-4e3f-883b-f26218ab8021/suspend" rel="suspend"/>
        <link href="/api/vms/8a9e7ed6-588f-4e3f-883b-f26218ab8021/detach" rel="detach"/>
        <link href="/api/vms/8a9e7ed6-588f-4e3f-883b-f26218ab8021/export" rel="export"/>
        <link href="/api/vms/8a9e7ed6-588f-4e3f-883b-f26218ab8021/move" rel="move"/>
    </actions>
    <name>VmName</name>
    <link href="/api/vms/8a9e7ed6-588f-4e3f-883b-f26218ab8021/applications" rel="applications"/>
    <link href="/api/vms/8a9e7ed6-588f-4e3f-883b-f26218ab8021/disks" rel="disks"/>
    <link href="/api/vms/8a9e7ed6-588f-4e3f-883b-f26218ab8021/nics" rel="nics"/>
    <link href="/api/vms/8a9e7ed6-588f-4e3f-883b-f26218ab8021/cdroms" rel="cdroms"/>
    <link href="/api/vms/8a9e7ed6-588f-4e3f-883b-f26218ab8021/snapshots" rel="snapshots"/>
    <link href="/api/vms/8a9e7ed6-588f-4e3f-883b-f26218ab8021/tags" rel="tags"/>
    <link href="/api/vms/8a9e7ed6-588f-4e3f-883b-f26218ab8021/permissions" rel="permissions"/>
    <link href="/api/vms/8a9e7ed6-588f-4e3f-883b-f26218ab8021/statistics" rel="statistics"/>
    <link href="/api/vms/8a9e7ed6-588f-4e3f-883b-f26218ab8021/reporteddevices" rel="reporteddevices"/>
    <type>desktop</type>
    <status>
        <state>down</state>
    </status>
    <memory>1073741824</memory>
    <cpu>
        <topology sockets="1" cores="1"/>
    </cpu>
    <os type="unassigned">
        <boot dev="hd"/>
    </os>
    <high_availability>
        <enabled>false</enabled>
        <priority>0</priority>
    </high_availability>
    <display>
        <type>spice</type>
        <monitors>1</monitors>
        <allow_override>false</allow_override>
        <smartcard_enabled>false</smartcard_enabled>
    </display>
    <cluster href="/api/clusters/54205ede-a84f-4019-b56e-0de12e6bba3b" id="54205ede-a84f-4019-b56e-0de12e6bba3b"/>
    <template href="/api/templates/00000000-0000-0000-0000-000000000000" id="00000000-0000-0000-0000-000000000000"/>
    <creation_time>2013-07-08T14:43:35.806+03:00</creation_time>
    <origin>ovirt</origin>
    <stateless>false</stateless>
    <delete_protected>false</delete_protected>
    <placement_policy>
        <affinity>migratable</affinity>
    </placement_policy>
    <memory_policy>
        <guaranteed>1073741824</guaranteed>
        <ballooning>true</ballooning>
    </memory_policy>
    <quota id="00000000-0000-0000-0000-000000000000"/>
    <usb>
        <enabled>false</enabled>
    </usb>
</vm>



Expected results:
VM creation should fail due to status of datacenter (uninitialized)

Additional info:

Comment 1 Itamar Heim 2013-07-08 14:02:02 UTC
1. not sure worth fixing.
2. not sure incorrect - we could add a directlun to the vm and run it maybe?

Comment 2 Andrew Cathrow 2013-07-08 15:43:07 UTC
Not sure this is worth addressing.