Project

General

Profile

Bug #184

Query 'state' doesn't work

Added by Dis Connect over 9 years ago. Updated 10 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Search
Target version:
Difficulty:
Triaged:
No
Bugzilla link:
Pull request:
Team Backlog:
Fixed in Releases:
Found in Releases:

Description

According to the web UI:
Out Of Sync Hosts 23
Hosts in Error State 4
Total hosts 204

(For the queries below, the web ui shows 198 hosts in 'base', 15 in 'memcached')

The query interface isn't reflecting that:

Memcached runs every 6 ours, so this test is ok:
irb(main):049:0> gethosts( { 'class' => 'memcached' } ).length
NoMethodError: undefined method `length' for nil:NilClass
from (irb):49
from :0

This test is not though, should list 15 hosts:
irb(main):050:0> gethosts( { 'class' => 'memcached', 'state' => 'all' } ).length
NoMethodError: undefined method `length' for nil:NilClass
from (irb):50
from :0

Should list 175 hosts:
irb(main):052:0> gethosts( { 'class' => 'base' } ).length
=> 175

Should list 198 hosts:
irb(main):051:0> gethosts( { 'class' => 'base', 'state' => 'all' } ).length
=> 175

Should list 204 hosts:
irb(main):053:0> gethosts( { 'state' => 'all' } ).length
NoMethodError: undefined method `length' for nil:NilClass
from (irb):53
from :0


Related issues

Is duplicate of Foreman - Refactor #191: Query should return all hosts, not just recent.Closed

History

#1 Updated by Ohad Levy over 9 years ago

can you add a simple fact, just to be sure that the lack of fact usage doesnt break something?

#2 Updated by Dis Connect over 9 years ago

It works with the addition of a fact.

#3 Updated by Ohad Levy over 9 years ago

  • Status changed from New to Closed

already fixed in #191

#4 Updated by Ohad Levy over 9 years ago

  • Assignee set to Ohad Levy
  • Target version set to 0.1-5

#5 Updated by Tomer Brisker 10 months ago

  • Category changed from 19 to Search

Also available in: Atom PDF