Project

General

Profile

Actions

Bug #10445

closed

Searching for hosts in discovery view throws postgres error

Added by Jasper Capel almost 9 years ago. Updated almost 9 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Discovery plugin
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

I have a fresh install of Foreman 1.8 + Discovery 3.0.0 on Ubuntu 14.04. I have a new host in the "Discovered Hosts" view. Now I am trying to create auto-provisioning rules, so I would like to check on cpu_count or disks_size. I execute the following search query: disks_size > 10 (also failing cpu_count = 2). When I search for "facts.physicalprocessorcount = 2", I do not get an error.

The error I get is:

Warning!

PG::UndefinedColumn: ERROR: column hosts.subnet_id does not exist LINE 1: ...n') LEFT OUTER JOIN "subnets" ON "subnets"."id" = "hosts"."s... ^ : SELECT COUNT FROM "hosts" LEFT OUTER JOIN "discovery_attribute_sets" ON "discovery_attribute_sets"."host_id" = "hosts"."id" LEFT OUTER JOIN "taxonomies" ON "taxonomies"."id" = "hosts"."location_id" AND "taxonomies"."type" IN ('Location') LEFT OUTER JOIN "taxonomies" "organizations_hosts" ON "organizations_hosts"."id" = "hosts"."organization_id" AND "organizations_hosts"."type" IN ('Organization') LEFT OUTER JOIN "subnets" ON "subnets"."id" = "hosts"."subnet_id" LEFT OUTER JOIN "models" ON "models"."id" = "hosts"."model_id" WHERE "hosts"."type" IN ('Host::Discovered') AND (("discovery_attribute_sets"."disks_size" > '10'))


Related issues 1 (0 open1 closed)

Related to Discovery - Bug #9607: discovery search fails on ip addressClosedOri Rabin03/02/2015Actions
Actions #1

Updated by Dominic Cleal almost 9 years ago

The scoped search definitions in Host::Discovery look out of date, they assume stuff like ip, mac, subnets are still on host and not Nic.

Actions #2

Updated by The Foreman Bot almost 9 years ago

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

Updated by Lukas Zapletal almost 9 years ago

  • Related to Bug #9607: discovery search fails on ip address added
Actions #4

Updated by Anonymous almost 9 years ago

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

Also available in: Atom PDF