Add query for bug 1304184

This adds a query for when the server fails to come out of the rebuild
state properly.

Change-Id: Ibb8fad3512e5969e106f3fd204db49f202a4fa80
Related-Bug: #1304184
Merge "Add query for bug 1304184"