Bug #4173
closedoVirt: Failed to set Build: undefined method `symbolize_keys' for nil:NilClass
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.
Files
Updated by Dominic Cleal almost 11 years ago
- Translation missing: en.field_release 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 ")
Updated by Frank Wall almost 11 years ago
Thanks Dominic, you'll find the stacktrace attached.
Updated by Dominic Cleal almost 11 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)
Updated by Frank Wall almost 11 years ago
I can confirm that this solves my problem.
Updated by Dominic Cleal almost 11 years ago
- Status changed from New to Ready For Testing
- Assignee set to Dominic Cleal
- Target version set to 1.9.2
https://github.com/theforeman/foreman/pull/1193
Thanks for testing!
Updated by Anonymous almost 11 years ago
Updated by Dominic Cleal almost 11 years ago
- Translation missing: en.field_release set to 2
- Assignee changed from Dominic Cleal to Anonymous
Updated by Anonymous almost 11 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset ec4ff916ebefa8fc0d4ac41548d02407e7cf8fac.
Updated by Dominic Cleal almost 11 years ago
- Related to Bug #4375: Kickstart provisioning is on a loop when using compute profiles with ovirt Compute Resource. added