Project

General

Profile

Actions

Bug #10158

closed

Add new host to fresh install

Added by Diogo Ferreira over 9 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Rails
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

When adding a new host to a fresh install I get:

"PGError: ERROR: column reference "id" is ambiguous LINE 1: SELECT DISTINCT id FROM "puppetclasses" INNER JOIN "environm... ^ : SELECT DISTINCT id FROM "puppetclasses" INNER JOIN "environment_classes" ON "puppetclasses"."id" = "environment_classes"."puppetclass_id" WHERE "environment_classes"."environment_id" = 2 AND "puppetclasses"."id" IN (NULL)"

Full trace:

"ActiveRecord::StatementInvalid
PGError: ERROR: column reference "id" is ambiguous LINE 1: SELECT DISTINCT id FROM "puppetclasses" INNER JOIN "environm... ^ : SELECT DISTINCT id FROM "puppetclasses" INNER JOIN "environment_classes" ON "puppetclasses"."id" = "environment_classes"."puppetclass_id" WHERE "environment_classes"."environment_id" = 2 AND "puppetclasses"."id" IN (NULL)
app/helpers/hosts_and_hostgroups_helper.rb:90:in `interesting_klasses'
app/views/puppetclasses/_classes_parameters.html.erb:11:in `_app_views_puppetclasses__classes_parameters_html_erb___3524885019236351929_133134600'
app/views/hosts/_form.html.erb:125:in `block (2 levels) in app_views_hosts_form_html_erb___477616481609675676_87327160'
app/helpers/layout_helper.rb:274:in `form_for'
app/views/hosts/_form.html.erb:8:in `block in app_views_hosts_form_html_erb___477616481609675676_87327160'
app/models/taxonomy.rb:61:in `block (2 levels) in as_taxonomy'
app/models/concerns/foreman/thread_session.rb:147:in `as_location'
app/models/taxonomy.rb:60:in `block in as_taxonomy'
app/models/concerns/foreman/thread_session.rb:112:in `as_org'
app/models/taxonomy.rb:59:in `as_taxonomy'
app/views/hosts/_form.html.erb:6:in `_app_views_hosts__form_html_erb___477616481609675676_87327160'
app/views/hosts/new.html.erb:3:in `_app_views_hosts_new_html_erb___568193090970988544_113524080'
app/controllers/application_controller.rb:269:in `process_error'
app/controllers/hosts_controller.rb:88:in `create'
app/controllers/concerns/application_shared.rb:13:in `set_timezone'
app/models/concerns/foreman/thread_session.rb:32:in `clear_thread'
lib/middleware/catch_json_parse_errors.rb:9:in `call'"


Related issues 1 (0 open1 closed)

Related to Foreman - Bug #9969: N+1 on host[group] edit pageClosedTomer Brisker03/31/2015Actions
Actions

Also available in: Atom PDF