Bug 1196972 - [RHEVM-CLI 3.5] creating vm with curl gives [ACTION_TYPE_CPU_PROFILE_EMPTY]
Summary: [RHEVM-CLI 3.5] creating vm with curl gives [ACTION_TYPE_CPU_PROFILE_EMPTY]
Keywords:
Status: CLOSED DUPLICATE of bug 1160846
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-restapi
Version: 3.5.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
: ---
Assignee: Doron Fediuck
QA Contact: Pavel Stehlik
URL:
Whiteboard: sla
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-02-27 08:43 UTC by Ulhas Surse
Modified: 2016-02-10 20:16 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-02-27 09:25:40 UTC
oVirt Team: SLA
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Ulhas Surse 2015-02-27 08:43:37 UTC
Description of problem:

Creating VM with curl does not create it when there is other CPU profile in cluster: 

# curl -X POST -H "Accept: application/xml" -H "Content-Type: application/xml" \  
  -u admin@internal:redhat --cacert /home/ulhas/Desktop/rhevm.crt \   
  -d "<vm><name>vm1</name><cluster><name>Default</name> \
    </cluster><template><name>Blank</name></template> \
    <memory>536870912</memory><os><boot dev='hd'/></os></vm>" \  
https://<rhevm-url>:443/api/vms

This is possible if the "CPU profiles" have only one default profile in it. 
When I create a new profile, VM creating gives error:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<fault>
    <reason>Operation Failed</reason>
    <detail>[action type cpu profile empty]</detail>
</fault>

engine.log
----------
2015-02-27 12:39:03,052 INFO  [org.ovirt.engine.core.bll.profiles.AddCpuProfileCommand] (ajp-/127.0.0.1:8702-17) [713398de] Running command: AddCpuProfileCommand internal: false. Entities affected :  ID: 00000001-0001-0001-0001-0000000000a3 Type: VdsGroupsAction group EDIT_CLUSTER_CONFIGURATION with role type ADMIN
2015-02-27 12:39:18,540 INFO  [org.ovirt.engine.core.bll.aaa.LoginUserCommand] (ajp-/127.0.0.1:8702-19) Running command: LoginUserCommand internal: false.
2015-02-27 12:39:18,543 INFO  [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (ajp-/127.0.0.1:8702-19) Correlation ID: null, Call Stack: null, Custom Event ID: -1, Message: User admin logged in.
2015-02-27 12:39:18,629 INFO  [org.ovirt.engine.core.bll.AddVmFromScratchCommand] (ajp-/127.0.0.1:8702-19) [55c7dc76] Lock Acquired to object EngineLock [exclusiveLocks= key: vm2 value: VM_NAME
, sharedLocks= ]
2015-02-27 12:39:18,653 WARN  [org.ovirt.engine.core.bll.AddVmFromScratchCommand] (ajp-/127.0.0.1:8702-19) [55c7dc76] CanDoAction of action AddVmFromScratch failed. Reasons:VAR__ACTION__ADD,VAR__TYPE__VM,ACTION_TYPE_CPU_PROFILE_EMPTY
2015-02-27 12:39:18,653 INFO  [org.ovirt.engine.core.bll.AddVmFromScratchCommand] (ajp-/127.0.0.1:8702-19) [55c7dc76] Lock freed to object EngineLock [exclusiveLocks= key: vm2 value: VM_NAME
, sharedLocks= ]
2015-02-27 12:39:18,659 ERROR [org.ovirt.engine.api.restapi.resource.AbstractBackendResource] (ajp-/127.0.0.1:8702-19) Operation Failed: [action type cpu profile empty]


Version-Release number of selected component (if applicable):
rhevm-3.5.0-0.29.el6ev.noarch
rhevm-cli-3.5.0.5-1.el6ev.noarch

How reproducible:
always

Steps to Reproduce:
1. In rhevm 3.5, go to "Clusters" tab
2. now select cluster and go to "CPU Profiles"
3. Create a new profile other that Default, and now try to create vm with curl.

Actual results:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<fault>
    <reason>Operation Failed</reason>
    <detail>[action type cpu profile empty]</detail>
</fault>

Expected results:
VM should create.

Additional info:
Can we propose a tag to include cpu profile type?

Comment 1 Juan Hernández 2015-02-27 09:25:40 UTC
This should be fixed in RHEV-M 3.5.1, and it is a duplicate of bug 1160846.

*** This bug has been marked as a duplicate of bug 1160846 ***


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