Project

General

Profile

Actions

Bug #19961

open

Clicking on 'Hosts -> Discovered Hosts' Fails

Added by Peter Lannigan over 7 years ago. Updated about 7 years ago.

Status:
New
Priority:
High
Assignee:
-
Category:
Discovery plugin
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

'Discovered Hosts' works fine for the admin user but is broken for all other users, who are assigned to roles with filters. The discovery plug-in doesn't seem to recognized the role filters and fails with the message below. I've tried different filters and the message changes depending on the active filter.

Oops, we're sorry but something went wrong Field 'hostgroup_fullname' not recognized for searching!

Actions #1

Updated by Peter Lannigan over 7 years ago

  • Subject changed from Clicking on 'Hosts -> Discovered Hosts' Failes to Clicking on 'Hosts -> Discovered Hosts' Fails
Actions #2

Updated by Daniel Lobato Garcia over 7 years ago

  • Translation missing: en.field_release deleted (241)

Can you give some kind of reproducing workflow? e.g: Create user X and add role Y with permissions Z, then click on discovered_hosts.
Basically we would like a way to reproduce the kind or kinds of user that's throwing that error

Actions #3

Updated by Peter Lannigan over 7 years ago

  • Translation missing: en.field_release set to 241

I reproduced the problem by creating a role (TestDiscovery) with a single filter.

Resource: Host
Permissions: <All>
Search: hostgroup_fullname ~ %

I then assigned that role + the Viewer role to a user. When clicking on "Discovered hosts" I get

Oops, we're sorry but something went wrong Field 'hostgroup_fullname' not recognized for searching!

Our users are in Windows AD and we have several hostgroups and sub-groups, but I doubt that matters for this issue.

Actions #4

Updated by Daniel Lobato Garcia over 7 years ago

  • Translation missing: en.field_release deleted (241)

Thanks, this is definitely reproducible.

For devs, the problem is that under the Resource "Host" we included discovered_hosts permissions. In general this is fine, however when you set the "Search" to something that cannot be searched for (e.g: hostgroup for discovered hosts), it crashes.

I'm unsetting the Release field as it means "issue is a blocker for this release", not "Found in release"

Actions

Also available in: Atom PDF