Project

General

Profile

Actions

Bug #2017

closed

compute_attributes is nil on a machine injected via puppet agent

Added by David Swift over 11 years ago. Updated almost 7 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
Host creation
Target version:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

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

Screen_shot_2012-12-06_at_12.08.25_PM.png View Screen_shot_2012-12-06_at_12.08.25_PM.png 307 KB Screenshot of host edit screen. David Swift, 12/06/2012 03:11 PM
Actions #1

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 :-).

Actions #3

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.

Actions #4

Updated by Anonymous about 11 years ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100
Actions #5

Updated by Ohad Levy about 11 years ago

  • Status changed from Closed to New

oops closed wrong ticket

Actions #6

Updated by Anonymous almost 7 years ago

  • Description updated (diff)
  • Status changed from New to Resolved

nodes need to get associated to a CR

Actions

Also available in: Atom PDF