Project

General

Profile

Bug #4173

oVirt: Failed to set Build: undefined method `symbolize_keys' for nil:NilClass

Added by Frank Wall over 8 years ago. Updated about 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Compute resources
Target version:
Difficulty:
Triaged:
Bugzilla link:
Pull request:
Fixed in Releases:
Found in Releases:

Description

RC[1,2] seems to have issues with some build actions if compute ressources are involved. The problem does not occur with "bare metal" hosts.

Setting up a new host...
- "new host"
- Deploy on: oVirt
...works just fine. A VM is created and provisioning starts as usual. Only a few actions result in failure:

A) calling /unattended/built
B) click "Cancel Build"

The error message is basically the same:

A)
Failed to set Build on testhost001.install.example.com: undefined method `symbolize_keys' for nil:NilClass
Completed 409 Conflict in 192.7ms (ActiveRecord: 8.6ms)

B)
Failed to set Build on testhost001.install.example.com: undefined method `symbolize_keys' for nil:NilClass
Failed to save:
Redirected to https://fw.example.com/hosts/new
Completed 302 Found in 81.2ms (ActiveRecord: 8.7ms)

Attached you'll find a full debug log. Unfortunately there is no stacktrace available, although "debug" logging was enabled.

production.log production.log 7.92 KB Frank Wall, 01/23/2014 08:34 PM
trace.txt trace.txt 15.1 KB Frank Wall, 01/24/2014 10:16 AM

Related issues

Related to Foreman - Bug #4375: Kickstart provisioning is on a loop when using compute profiles with ovirt Compute Resource.Closed2014-02-18

Associated revisions

Revision ec4ff916 (diff)
Added by Michael Moll over 8 years ago

fixes #4173 - don't update CR attrs when none available, taken from GH-1184

Revision 68d0814c (diff)
Added by Michael Moll over 8 years ago

fixes #4173 - don't update CR attrs when none available, taken from GH-1184

(cherry picked from commit ec4ff916ebefa8fc0d4ac41548d02407e7cf8fac)

History

#1 Updated by Dominic Cleal over 8 years ago

  • Legacy Backlogs Release (now unused) deleted (2)

If you don't mind changing your install slightly, you could try commenting out the "rescue/logger/false" lines in app/models/host/managed.rb in the built method around line 204. This might let an exception bubble up better.

Alternatively, add into the rescue block:

logger.debug "Error: #{e.message}\n " + e.backtrace.join("\n ")

#2 Updated by Frank Wall over 8 years ago

Thanks Dominic, you'll find the stacktrace attached.

#3 Updated by Dominic Cleal over 8 years ago

  • Subject changed from Failed to set Build: undefined method `symbolize_keys' for nil:NilClass to oVirt: Failed to set Build: undefined method `symbolize_keys' for nil:NilClass

Thanks, this is specific to oVirt as it's the only provider that supports updates to existing VMs.

I think in app/models/concerns/orchestration/compute.rb, compute_update_required? we should do something like:

compute_resource.update_required?(old.compute_attributes, (compute_attributes || {}).symbolize_keys)

#4 Updated by Frank Wall over 8 years ago

I can confirm that this solves my problem.

#5 Updated by Dominic Cleal over 8 years ago

  • Status changed from New to Ready For Testing
  • Assignee set to Dominic Cleal
  • Target version set to 1.9.2

#7 Updated by Dominic Cleal over 8 years ago

  • Assignee changed from Dominic Cleal to Anonymous
  • Legacy Backlogs Release (now unused) set to 2

#8 Updated by Anonymous over 8 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

#9 Updated by Dominic Cleal over 8 years ago

  • Related to Bug #4375: Kickstart provisioning is on a loop when using compute profiles with ovirt Compute Resource. added

Also available in: Atom PDF