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'))