Project

General

Profile

Actions

Bug #184

closed

Query 'state' doesn't work

Added by Dis Connect over 14 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Search
Target version:
Difficulty:
Triaged:
No
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 1 (0 open1 closed)

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

Also available in: Atom PDF