Description of problem: When scheduling cluster maintenance and the StorageNode.maintenancePending flag gets set to true, the UI reports that the node's cluster status is down. It should not be reported down unless the failedOperation or errorMessage properties are set. Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info:
I wasn't able to reproduce. But from looking into the code I found following: UI displays the same text as StorageNode.getStatus() returns. The implementation of this method [1] relies on the operationMode field. It returns Status.NORMAL iff operationMode == OperationMode.NORMAL. I guess running the 'add maintenance' operation sets the field to OperationMode.ADD_MAINTENANCE and the getStatus() returns correctly DOWN. Perhaps we should consider the ADD_MAINTENANCE operationMode also as NORMAL cluster status. In other words: if (operationMode == OperationMode.NORMAL || operationMode == OperationMode.ADD_MAINTENANCE) { return Status.NORMAL; } [1]: https://github.com/rhq-project/rhq/blob/master/modules/core/domain/src/main/java/org/rhq/core/domain/cloud/StorageNode.java#L241:L265
note: 'add maintenance' operation is run for new nodes where it makes sense not to set the cluster state to NORMAL until it is successfully finished. On the other hand, it can be run also explicitly whenever user runs the operation and it is strange to see it in UI that storage node is DOWN only because of the logic mentioned in my previous comment.
I produced by running StorageNodeManager.runClusterMaintenance() from the CLI, not by running the add maintenance resource operation.
branch: master link: https://github.com/rhq-project/rhq/commit/112bd1d85 time: 2014-10-13 18:00:52 +0200 commit: 112bd1d8586aba237a91d5008c1bd36c10aeff90 author: Jirka Kremser - jkremser message: [BZ 1149687] - Storage Node's cluster status is DOWN when cluster maintenance is scheduled - considering the MAINTENANCE operation mode as NORMAL cluster status.
branch: release/jon3.3.x link: https://github.com/rhq-project/rhq/commit/68519e5c2 time: 2014-10-14 15:18:21 +0200 commit: 68519e5c2ac8370dd1e1e17a50747c03f7f09e4b author: Jirka Kremser - jkremser message: [BZ 1149687] - Storage Node's cluster status is DOWN when cluster maintenance is scheduled - considering the MAINTENANCE operation mode as NORMAL cluster status. (cherry picked from commit 112bd1d8586aba237a91d5008c1bd36c10aeff90) Signed-off-by: Libor Zoubek <lzoubek>
Moving to ON_QA as available to test with the latest brew build: https://brewweb.devel.redhat.com//buildinfo?buildID=394734
Created attachment 949892 [details] cluster_state_runMaintenance
verified in JON 3.3 ER05 screenshot attached (checked during and after runClusterMaintenance )