Red Hat Bugzilla – Bug 825318
search bar code for availability querying looks broken
Last modified: 2013-09-03 11:13:42 EDT
+++ This bug was initially created as a clone of Bug #820716 +++
specifically this code:
return new SearchFragment( //
SearchFragment.Type.PRIMARY_KEY_SUBQUERY, "SELECT rg.id" //
+ " FROM ResourceGroup rg " //
+ " WHERE ( SELECT AVG( iavail.availabilityType ) " //
+ " FROM rg.explicitResources ires " //
+ " JOIN ires.currentAvailability iavail ) " + numericAvailabilityFragment);
We can't do AVG on avail type anymore - since we have more than 0 (down) and 1 (up). We have 2 (unknown) and 3 (disabled) so averaging won't give us what we are expecting.
I think this is code that lets us use "availability" in the search bar to search for availability=UP and availabiltiy=DOWN (and whatever else we allow.. MIXED??? DISABLED??? UNKNOWN???)
We need to double check the search bar ability to query on avaialbilty and get it to work for groups.
Need to cherry pick to the release branch the following:
** git commit to master f4c13d0 - this is some new unit tests for the availability keyword in the search expression
** git commit to master: 6641616 - when viewing group lists, in the search bar, you can now specify "availability=down" for example and the only groups you will see are those groups where all members are down. Same with "up" and "disabled". This also supports != as before.
two cherry picks to release/3.1.x branch:
the latter caused a conflict so I had to manually fix it. see https://bugzilla.redhat.com/show_bug.cgi?id=820432#c4 from bug 820432
fix a problem with conflicts during the cherry pick: release/jon3.1.x commit: b3866debd52593cce9f9bf10bd17df8e3b3da0bc
Verified on Version: 3.1.0.CR1 Build Number: 4bc4270:1b85993
Verified below availabilty search criterias using operators ( = , == , != , !== ) on resources and groups :
The search results display correct results ( Ex: for "availability=down" , only groups with all members down appear in search results)
Observed one issue with groups without members having unknown status. This group appears in every availabilty search result. I filed a new bug#826493 to address this.
Marking this bug as verified.
Bulk closing of old issues in VERIFIED state.