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.
Created attachment 1045882 [details] API request and response
Created attachment 1045883 [details] Cluster configuration
Created attachment 1045884 [details] Templates configuration
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.
I see now that bug 1172207 was also fixed in 3.5.1.
roy, can you help? this bug blocks us from moving to a much faster solution for jenkins slaves in ovirt environment.
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'
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.
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.
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
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
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 ***
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