Bug #10445
closedSearching for hosts in discovery view throws postgres error
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'))
Updated by Dominic Cleal over 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.
Updated by The Foreman Bot over 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 (
)
Updated by Lukas Zapletal over 9 years ago
- Related to Bug #9607: discovery search fails on ip address added
Updated by Anonymous over 9 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset foreman_discovery|45b604e1bd840cc214f0775ff29ba447a56da78d.