RHEL6.5
Foreman 1.7.5
ruby193
I 99% absolute that this problem was suddenly appeared because i was using
"New Host" option with non Admin users in the past.
Any help will be appreciated.
Following is the UI exception full trace.
ActiveRecord::StatementInvalid
PGError: ERROR: column reference "name" is ambiguous LINE 71: WHERE
"taxonomies"."id" = '1' ))))) ORDER BY name ^ : SELECT
"compute_resources"."id" AS t0_r0, "compute_resources"."name" AS t0_r1,
"compute_resources"."description" AS t0_r2, "compute_resources"."url" AS
t0_r3, "compute_resources"."user" AS t0_r4, "compute_resources"."password"
AS t0_r5, "compute_resources"."uuid" AS t0_r6, "compute_resources"."type"
AS t0_r7, "compute_resources"."created_at" AS t0_r8,
"compute_resources"."updated_at" AS t0_r9, "compute_resources"."attrs" AS
t0_r10, "taxonomies"."id" AS t1_r0, "taxonomies"."name" AS t1_r1,
"taxonomies"."type" AS t1_r2, "taxonomies"."created_at" AS t1_r3,
"taxonomies"."updated_at" AS t1_r4, "taxonomies"."ignore_types" AS t1_r5,
"taxonomies"."ancestry" AS t1_r6, "taxonomies"."title" AS t1_r7,
"locations_compute_resources"."id" AS t2_r0,
"locations_compute_resources"."name" AS t2_r1,
"locations_compute_resources"."type" AS t2_r2,
"locations_compute_resources"."created_at" AS t2_r3,
"locations_compute_resources"."updated_at" AS t2_r4,
"locations_compute_resources"."ignore_types" AS t2_r5,
"locations_compute_resources"."ancestry" AS t2_r6,
"locations_compute_resources"."title" AS t2_r7 FROM "compute_resources"
LEFT OUTER JOIN "taxable_taxonomies" ON "taxable_taxonomies"."taxable_id" =
"compute_resources"."id" AND "taxable_taxonomies"."taxable_type" =
'ComputeResource' LEFT OUTER JOIN "taxonomies" ON "taxonomies"."id" =
"taxable_taxonomies"."taxonomy_id" AND taxonomies.type='Organization' LEFT
OUTER JOIN "taxable_taxonomies" "taxable_taxonomies_compute_resources_join"
ON "taxable_taxonomies_compute_resources_join"."taxable_id" =
"compute_resources"."id" AND
"taxable_taxonomies_compute_resources_join"."taxable_type" =
'ComputeResource' LEFT OUTER JOIN "taxonomies"
"locations_compute_resources" ON "locations_compute_resources"."id" =
"taxable_taxonomies_compute_resources_join"."taxonomy_id" AND
taxonomies.type='Location' WHERE "compute_resources"."id" IN (2) AND (1=1)
AND (((("compute_resources"."id" IN (SELECT "compute_resources"."id" FROM
"compute_resources" INNER JOIN "taxable_taxonomies" ON
"compute_resources"."id" = "taxable_taxonomies"."taxable_id" AND
taxable_type = 'ComputeResource' INNER JOIN "taxonomies" ON
"taxable_taxonomies"."taxonomy_id" = "taxonomies"."id" AND
taxonomies.type='Organization' WHERE "taxonomies"."id" = '4' )) OR
("compute_resources"."id" IN (SELECT "compute_resources"."id" FROM
"compute_resources" INNER JOIN "taxable_taxonomies" ON
"compute_resources"."id" = "taxable_taxonomies"."taxable_id" AND
taxable_type = 'ComputeResource' INNER JOIN "taxonomies" ON
"taxable_taxonomies"."taxonomy_id" = "taxonomies"."id" AND
taxonomies.type='Organization' WHERE "taxonomies"."id" = '9' )) OR
("compute_resources"."id" IN (SELECT "compute_resources"."id" FROM
"compute_resources" INNER JOIN "taxable_taxonomies" ON
"compute_resources"."id" = "taxable_taxonomies"."taxable_id" AND
taxable_type = 'ComputeResource' INNER JOIN "taxonomies" ON
"taxable_taxonomies"."taxonomy_id" = "taxonomies"."id" AND
taxonomies.type='Organization' WHERE "taxonomies"."id" = '14' )) OR
("compute_resources"."id" IN (SELECT "compute_resources"."id" FROM
"compute_resources" INNER JOIN "taxable_taxonomies" ON
"compute_resources"."id" = "taxable_taxonomies"."taxable_id" AND
taxable_type = 'ComputeResource' INNER JOIN "taxonomies" ON
"taxable_taxonomies"."taxonomy_id" = "taxonomies"."id" AND
taxonomies.type='Organization' WHERE "taxonomies"."id" = '16' )) OR
("compute_resources"."id" IN (SELECT "compute_resources"."id" FROM
"compute_resources" INNER JOIN "taxable_taxonomies" ON
"compute_resources"."id" = "taxable_taxonomies"."taxable_id" AND
taxable_type = 'ComputeResource' INNER JOIN "taxonomies" ON
"taxable_taxonomies"."taxonomy_id" = "taxonomies"."id" AND
taxonomies.type='Organization' WHERE "taxonomies"."id" = '17' )) OR
("compute_resources"."id" IN (SELECT "compute_resources"."id" FROM
"compute_resources" INNER JOIN "taxable_taxonomies" ON
"compute_resources"."id" = "taxable_taxonomies"."taxable_id" AND
taxable_type = 'ComputeResource' INNER JOIN "taxonomies" ON
"taxable_taxonomies"."taxonomy_id" = "taxonomies"."id" AND
taxonomies.type='Organization' WHERE "taxonomies"."id" = '15' )) OR
("compute_resources"."id" IN (SELECT "compute_resources"."id" FROM
"compute_resources" INNER JOIN "taxable_taxonomies" ON
"compute_resources"."id" = "taxable_taxonomies"."taxable_id" AND
taxable_type = 'ComputeResource' INNER JOIN "taxonomies" ON
"taxable_taxonomies"."taxonomy_id" = "taxonomies"."id" AND
taxonomies.type='Organization' WHERE "taxonomies"."id" = '19' )) OR
("compute_resources"."id" IN (SELECT "compute_resources"."id" FROM
"compute_resources" INNER JOIN "taxable_taxonomies" ON
"compute_resources"."id" = "taxable_taxonomies"."taxable_id" AND
taxable_type = 'ComputeResource' INNER JOIN "taxonomies" ON
"taxable_taxonomies"."taxonomy_id" = "taxonomies"."id" AND
taxonomies.type='Organization' WHERE "taxonomies"."id" = '18' )) OR
("compute_resources"."id" IN (SELECT "compute_resources"."id" FROM
"compute_resources" INNER JOIN "taxable_taxonomies" ON
"compute_resources"."id" = "taxable_taxonomies"."taxable_id" AND
taxable_type = 'ComputeResource' INNER JOIN "taxonomies" ON
"taxable_taxonomies"."taxonomy_id" = "taxonomies"."id" AND
taxonomies.type='Organization' WHERE "taxonomies"."id" = '20' )) OR
("compute_resources"."id" IN (SELECT "compute_resources"."id" FROM
"compute_resources" INNER JOIN "taxable_taxonomies" ON
"compute_resources"."id" = "taxable_taxonomies"."taxable_id" AND
taxable_type = 'ComputeResource' INNER JOIN "taxonomies" ON
"taxable_taxonomies"."taxonomy_id" = "taxonomies"."id" AND
taxonomies.type='Organization' WHERE "taxonomies"."id" = '7' )) OR
("compute_resources"."id" IN (SELECT "compute_resources"."id" FROM
"compute_resources" INNER JOIN "taxable_taxonomies" ON
"compute_resources"."id" = "taxable_taxonomies"."taxable_id" AND
taxable_type = 'ComputeResource' INNER JOIN "taxonomies" ON
"taxable_taxonomies"."taxonomy_id" = "taxonomies"."id" AND
taxonomies.type='Organization' WHERE "taxonomies"."id" = '5' )) OR
("compute_resources"."id" IN (SELECT "compute_resources"."id" FROM
"compute_resources" INNER JOIN "taxable_taxonomies" ON
"compute_resources"."id" = "taxable_taxonomies"."taxable_id" AND
taxable_type = 'ComputeResource' INNER JOIN "taxonomies" ON
"taxable_taxonomies"."taxonomy_id" = "taxonomies"."id" AND
taxonomies.type='Organization' WHERE "taxonomies"."id" = '6' ))) AND
(("compute_resources"."id" IN (SELECT "compute_resources"."id" FROM
"compute_resources" INNER JOIN "taxable_taxonomies" ON
"compute_resources"."id" = "taxable_taxonomies"."taxable_id" AND
taxable_type = 'ComputeResource' INNER JOIN "taxonomies" ON
"taxable_taxonomies"."taxonomy_id" = "taxonomies"."id" AND
taxonomies.type='Location' WHERE "taxonomies"."id" = '2' )) OR
("compute_resources"."id" IN (SELECT "compute_resources"."id" FROM
"compute_resources" INNER JOIN "taxable_taxonomies" ON
"compute_resources"."id" = "taxable_taxonomies"."taxable_id" AND
taxable_type = 'ComputeResource' INNER JOIN "taxonomies" ON
"taxable_taxonomies"."taxonomy_id" = "taxonomies"."id" AND
taxonomies.type='Location' WHERE "taxonomies"."id" = '1' ))))) ORDER BY
name
app/helpers/layout_helper.rb:113:in block in select_f' app/helpers/layout_helper.rb:164:in
block (3 levels) in field'
app/helpers/layout_helper.rb:163:in block (2 levels) in field' app/helpers/layout_helper.rb:152:in
block in field'
app/helpers/layout_helper.rb:151:in field' app/helpers/layout_helper.rb:111:in
select_f'
app/views/hosts/_form.html.erb:58:in block (2 levels) in _app_views_hosts__form_html_erb___2831793403978641145_70195239768440' app/helpers/layout_helper.rb:268:in
form_for'
app/views/hosts/_form.html.erb:8:in block in _app_views_hosts__form_html_erb___2831793403978641145_70195239768440' app/models/taxonomy.rb:59:in
block (2 levels) in as_taxonomy'
app/models/concerns/foreman/thread_session.rb:148:in as_location' app/models/taxonomy.rb:58:in
block in as_taxonomy'
app/models/concerns/foreman/thread_session.rb:113:in as_org' app/models/taxonomy.rb:57:in
as_taxonomy'
app/views/hosts/_form.html.erb:6:in
_app_views_hosts__form_html_erb___2831793403978641145_70195239768440' app/views/hosts/new.html.erb:7:in
_app_views_hosts_new_html_erb__4430853681146229223_70195239700480'
app/models/concerns/foreman/thread_session.rb:33:in clear_thread' lib/middleware/catch_json_parse_errors.rb:9:in
call'