Project

General

Profile

Actions

Bug #8591

closed

Selecting domain in New Host dialog results in PGError and no subnets being available

Added by Adam Ruzicka over 9 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Organizations and Locations
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

Steps to reproduce:
Create domain and subnet, assign the subnet to the domain
Hosts > New Host
Select Organization and location
Switch to Network tab
Select domain

Expected behavior:
Subnet list provides available subnets for the domain

Current behavior:
No subnets are available. PGError received from controller but not shown

PGError:


Warning!
PGError: ERROR: column reference "id" is ambiguous LINE 1: SELECT id FROM "subnets" INNER JOIN "subnet_domains" ON "sub... ^ : SELECT id FROM "subnets" INNER JOIN "subnet_domains" ON "subnets"."id" = "subnet_domains"."subnet_id" WHERE "subnets"."id" IN (1) AND "subnet_domains"."domain_id" = 1 ORDER BY vlanid

If you feel this is an error with Foreman itself, please open a new issue with Foreman ticketing system, You would probably need to attach the Full trace and relevant log entries.
ActiveRecord::StatementInvalid
PGError: ERROR: column reference "id" is ambiguous LINE 1: SELECT id FROM "subnets" INNER JOIN "subnet_domains" ON "sub... ^ : SELECT id FROM "subnets" INNER JOIN "subnet_domains" ON "subnets"."id" = "subnet_domains"."subnet_id" WHERE "subnets"."id" IN (1) AND "subnet_domains"."domain_id" = 1 ORDER BY vlanid
app/helpers/hosts_and_hostgroups_helper.rb:31:in `domain_subnets'
app/views/common/_domain.html.erb:2:in `block in _app_views_common__domain_html_erb___3366442248415189655_70262450388580'
app/views/common/_domain.html.erb:1:in `_app_views_common__domain_html_erb___3366442248415189655_70262450388580'
app/controllers/concerns/foreman/controller/host_details.rb:49:in `block in assign_parameter'
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/controllers/concerns/foreman/controller/host_details.rb:46:in `assign_parameter'
app/controllers/concerns/foreman/controller/host_details.rb:22:in `block (2 levels) in domain_selected'
app/controllers/concerns/foreman/controller/host_details.rb:21:in `domain_selected'
app/models/concerns/foreman/thread_session.rb:33:in `clear_thread'
lib/middleware/catch_json_parse_errors.rb:9:in `call' 

Installed on centos 6.5 from nightly at 5.12. with options

--capsule-dhcp=true \
    --capsule-dhcp-range='192.168.115.10 192.168.115.254' \
    --capsule-dhcp-gateway=192.168.115.1 \
    --capsule-dhcp-interface=eth0 \
    --capsule-dns=true \
    --capsule-dns-reverse='115.168.192.in-addr.arpa' \
    --capsule-dns-zone='v2' \
    --capsule-tftp=true" 


Related issues 1 (0 open1 closed)

Related to Foreman - Bug #8221: subnet not matching domain available as choice when creating new hostClosedShlomi Zadok10/30/2014Actions
Actions #1

Updated by Dominic Cleal over 9 years ago

  • Category set to Organizations and Locations
Actions #2

Updated by Dominic Cleal over 9 years ago

  • Related to Bug #8221: subnet not matching domain available as choice when creating new host added
Actions #3

Updated by Dominic Cleal over 9 years ago

  • translation missing: en.field_release set to 28
Actions #4

Updated by The Foreman Bot over 9 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/2002 added
  • Pull request deleted ()
Actions #5

Updated by Shlomi Zadok over 9 years ago

  • Assignee set to Shlomi Zadok
Actions #6

Updated by Shlomi Zadok over 9 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100
Actions #7

Updated by Dominic Cleal over 9 years ago

  • translation missing: en.field_release changed from 28 to 29
Actions

Also available in: Atom PDF