Project

General

Profile

Actions

Bug #184

closed

Query 'state' doesn't work

Added by Dis Connect about 14 years ago. Updated over 5 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 #1

Updated by Ohad Levy about 14 years ago

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

Actions #2

Updated by Dis Connect about 14 years ago

It works with the addition of a fact.

Actions #3

Updated by Ohad Levy about 14 years ago

  • Status changed from New to Closed

already fixed in #191

Actions #4

Updated by Ohad Levy about 14 years ago

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

Updated by Tomer Brisker over 5 years ago

  • Category changed from 19 to Search
Actions

Also available in: Atom PDF