Bug #2017
closedcompute_attributes is nil on a machine injected via puppet agent
Description
I have a few EC2 instances that we created before we started using foreman. When I install puppet, and point it at my current Foreman/Puppet server, the instance makes contact, and runs a short puppet run. It is then available in the Foreman Hosts list.
When I Edit that machine, and attempt to assign it a hostgroup, when I hit Save, I get
undefined method `[]' for nil:NilClass
NoMethodError
undefined method `[]' for nil:NilClass
app/models/orchestration/compute.rb:185:in `validate_compute_provisioning'
app/models/orchestration.rb:64:in `valid?'
app/controllers/hosts_controller.rb:104:in `update'
tracking this down, I think I can fix the validation, so that if the compute_attributes are missing it creates reasonable defaults. Pull request coming (I am on the dev branch, mostly up-to-date)
Files
Updated by David Swift over 11 years ago
I merged latest develop into my ec2 branch, and the validation error went away. However, foreman still does not see this machine as an instance. It doesn't even look like a full host, the network selection is missing, for instance. I have attached a screenshot of the host edit page.
Not sure what the desired behavior is here, but at least the validation bug doesn't stop me from adding classes to this host :-).
Updated by David Swift over 11 years ago
d'oh! attaching screenshot.
Updated by David Swift over 11 years ago
OK, I am a bit slow today.
I can hit the 'manage host' button, and all the selections for a bare metal machine come up, like network, Operating System, etc.
I am going to dig into 'manage' code, and see if there is a fact I can check that will bring the instance being managed in as a compute instance.
Updated by Anonymous about 11 years ago
- Status changed from New to Closed
- % Done changed from 0 to 100
Applied in changeset 81e0a301987dfb40cda7f70777fb931ec93ffcb4.
Updated by Anonymous almost 7 years ago
- Description updated (diff)
- Status changed from New to Resolved
nodes need to get associated to a CR