Bug 1239134 - Error "action type cpu profile not match cluster" when creating VM from default template
Summary: Error "action type cpu profile not match cluster" when creating VM from defau...
Keywords:
Status: CLOSED DUPLICATE of bug 1084930
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: General
Version: ---
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ovirt-3.6.2
: ---
Assignee: Roy Golan
QA Contact: Pavel Stehlik
URL:
Whiteboard: sla
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-07-03 17:02 UTC by Anton Marchukov
Modified: 2016-02-10 19:19 UTC (History)
14 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2015-12-10 18:25:32 UTC
oVirt Team: SLA
Embargoed:
sbonazzo: ovirt-3.6.z?
ylavi: planning_ack?
ylavi: devel_ack?
ylavi: testing_ack?


Attachments (Terms of Use)
API request and response (589 bytes, text/plain)
2015-07-03 17:03 UTC, Anton Marchukov
no flags Details
Cluster configuration (2.17 KB, text/plain)
2015-07-03 17:04 UTC, Anton Marchukov
no flags Details
Templates configuration (48.33 KB, text/plain)
2015-07-03 17:05 UTC, Anton Marchukov
no flags Details

Description Anton Marchukov 2015-07-03 17:02:55 UTC
Description of problem:

We use foreman for provision of the hosts in oVirt. At some point we loose ability to create the VMs with the following error:

"Failed to create a compute engine-phx.ovirt.org_Jenkins-DC (oVirt) instance fc21-vm07.phx.ovirt.org: action type cpu profile not match cluster"

To troubleshoot this I have captured AJP traffic between engine Apache and the engine itself and was able to get the actual API call and response that looks correct (see the request and response attached along with cluster and templates configuration). 

Version-Release number of selected component (if applicable): oVirt Engine Version: 3.5.0.1-1.fc19

How reproducible:

Steps to Reproduce:
1. Setup the ovirt engine and foreman integration.
2. Provision VM through foreman. Use any template or no templates, this does not make any difference. See request that is being sent to the API attached.

Actual results:

"Failed to create a compute engine-phx.ovirt.org_Jenkins-DC (oVirt) instance fc21-vm07.phx.ovirt.org: action type cpu profile not match cluster" 

Expected results:

Computing instance is created.


Additional info:

I am attaching the request and response, cluster config and the templates config.

Comment 1 Anton Marchukov 2015-07-03 17:03:52 UTC
Created attachment 1045882 [details]
API request and response

Comment 2 Anton Marchukov 2015-07-03 17:04:42 UTC
Created attachment 1045883 [details]
Cluster configuration

Comment 3 Anton Marchukov 2015-07-03 17:05:09 UTC
Created attachment 1045884 [details]
Templates configuration

Comment 4 Juan Hernández 2015-07-03 17:42:14 UTC
Looking at the description of the attached templates I see the following:

  <template>
    <name>Blank</name>
    ...
    <cpu_profile href="/ovirt-engine/api/cpuprofiles/349f8d0d-d59b-456e-b549-e11576fb7976" id="349f8d0d-d59b-456e-b549-e11576fb7976"/>
  </template>

That is weird, as the blank template shouldn't have any CPU profile assigned, as the blank template doesn't belong to any cluster in particular, and the CPU profiles do belong to specific clusters.

The presence of this extraneous CPU profile triggers bug 1172207, which will be solved in 3.6.

How did that blank template got a CPU profile? I think that happens during the update process, the upgrade script "03_05_1000_add_cpu_profile_id_to_vm_static.sql" assigns a CPU profile to every template, including the blank template:

  --- Add correct profile id foreach VM/Template.
  UPDATE vm_static
    SET cpu_profile_id = cpu_profiles.id
    FROM cpu_profiles
    WHERE vm_static.vds_group_id = cpu_profiles.cluster_id;

To verify these hypotheses I fist manually assigned a profile to the blank template in the database:

  update vm_static set cpu_profile_id = 'd2c7ee2a-f93a-49e3-9499-fb7dd525c25f' where vm_name='Blank'

Then I tried to add a VM and it failed as explained in the description of the bug. Then I reset it again:

  update vm_static set cpu_profile_id = null where vm_name='Blank'

And I can add VMs again.

As in a fresh installation the blank template doesn't have any CPU profile I think that the above SQL update statement can be used as a workaround.

Comment 5 Juan Hernández 2015-07-03 17:51:14 UTC
I see now that bug 1172207 was also fixed in 3.5.1.

Comment 6 Eyal Edri 2015-07-12 15:51:58 UTC
roy, can you help?
this bug blocks us from moving to a much faster solution for jenkins slaves in ovirt environment.

Comment 7 Juan Hernández 2015-07-12 17:04:59 UTC
Eyal, remember that as a workaround you can fix this running the following SQL statement in the engine database:

  update vm_static set cpu_profile_id = null where vm_name='Blank'

Comment 8 Anton Marchukov 2015-07-13 11:53:48 UTC
Juan. I have applied the work around proposed today and it indeed fixed the problem. With this workaround we are able to provision VMs from "Base" template at least. Guess if we have problems with other templates we can do the same trick with them also.

Comment 9 Red Hat Bugzilla Rules Engine 2015-10-19 10:50:56 UTC
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 10 Sandro Bonazzola 2015-10-26 12:29:32 UTC
this is an automated message. oVirt 3.6.0 RC3 has been released and GA is targeted to next week, Nov 4th 2015.
Please review this bug and if not a blocker, please postpone to a later release.
All bugs not postponed on GA release will be automatically re-targeted to

- 3.6.1 if severity >= high
- 4.0 if severity < high

Comment 11 Sandro Bonazzola 2015-11-05 08:17:08 UTC
oVirt 3.6.0 has been released on November 4th, re-targeting to 3.6.1 since this bug has been marked as high severity

Comment 12 Roy Golan 2015-12-10 18:25:32 UTC
Juan thanks for the analysis and solution, it looks like you're spot on.

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

Comment 13 Roy Golan 2015-12-10 18:29:27 UTC
Bug 1084940 is the RFE bug for cpu profile, there was no direct bug on it. Just for reference this issue was resolved with

https://gerrit.ovirt.org/gitweb?p=ovirt-engine.git;a=commit;h=d9f98b804d333aa33d6debd6d16d3350c1d4755a 

meaning solved in 3.5.1


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