Bug 1149687 - Storage Node's cluster status is DOWN when cluster maintenance is scheduled
Summary: Storage Node's cluster status is DOWN when cluster maintenance is scheduled
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Operations Network
Classification: JBoss
Component: Core Server, UI, Storage Node
Version: JON 3.3.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ER05
: JON 3.3.0
Assignee: Jirka Kremser
QA Contact: Armine Hovsepyan
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-10-06 13:14 UTC by John Sanda
Modified: 2015-09-03 00:03 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2014-12-11 14:00:23 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
cluster_state_runMaintenance (317.45 KB, image/png)
2014-10-23 13:53 UTC, Armine Hovsepyan
no flags Details

Description John Sanda 2014-10-06 13:14:47 UTC
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:

Comment 1 Jirka Kremser 2014-10-09 17:15:27 UTC
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

Comment 2 Jirka Kremser 2014-10-09 17:18:23 UTC
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.

Comment 3 John Sanda 2014-10-13 12:57:22 UTC
I produced by running StorageNodeManager.runClusterMaintenance() from the CLI, not by running the add maintenance resource operation.

Comment 4 Jirka Kremser 2014-10-13 16:04:11 UTC
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.

Comment 5 Libor Zoubek 2014-10-14 13:18:44 UTC
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>

Comment 6 Simeon Pinder 2014-10-21 20:24:26 UTC
Moving to ON_QA as available to test with the latest brew build:
https://brewweb.devel.redhat.com//buildinfo?buildID=394734

Comment 7 Armine Hovsepyan 2014-10-23 13:53:58 UTC
Created attachment 949892 [details]
cluster_state_runMaintenance

Comment 8 Armine Hovsepyan 2014-10-23 13:54:47 UTC
verified in JON 3.3 ER05

screenshot attached (checked during and after runClusterMaintenance )


Note You need to log in before you can comment on or make changes to this bug.