Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1142946

Summary: [CLI] StorageNodeManager.undeployStorageNode(node); does not undeploy node
Product: [JBoss] JBoss Operations Network Reporter: Armine Hovsepyan <ahovsepy>
Component: CLI, Storage NodeAssignee: RHQ Project Maintainer <rhq-maint>
Status: CLOSED WORKSFORME QA Contact: Mike Foley <mfoley>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: JON 3.3.0CC: ahovsepy, jsanda, mfoley
Target Milestone: ER05   
Target Release: JON 3.3.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-09-29 14:36:50 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
server.log none

Description Armine Hovsepyan 2014-09-17 16:00:43 UTC
Description of problem:
[CLI] StorageNodeManager.undeployStorageNode(node); does not undeploy node
It runs decommission operation, while for underemployment it needs to run:
DECOMMISSION
REMOVE_MAINTENANCE
UNANNOUNCE
UNINSTALL

Version-Release number of selected component (if applicable):
JON 3.3 ER03

How reproducible:
always

Steps to Reproduce:
1. Install jon server with agent and storage node
2. install remote storage node and connect to jon server
3. from cli run:
nodes = StorageNodeManager.findStorageNodesByCriteria(StorageNodeCriteria());
node = nodes.get(0); 
StorageNodeManager.undeployStorageNode(node);

Actual results:
decommission operation is called, node is not undeployed

Expected results:
all 4 operations called ->  decommission, remove_maintenance, unannounce, uninstall  operation is called, node is  undeployed

Additional info:

Comment 1 John Sanda 2014-09-26 21:13:26 UTC
Armine, I did not reproduce this. I just tested with a 2 node cluster. Here is the output from my server.log,

r 1 agents
17:10:55,651 INFO  [org.rhq.enterprise.server.storage.StorageNodeOperationsHandlerBean] (http-/0.0.0.0:7080-201) Preparing to decommission StorageNode[id=1001, address=127.0.0.1, cqlPort=9142, operationMode=NORMAL, mtime=1411757609129]
17:11:30,441 INFO  [com.datastax.driver.core.Cluster] (Scheduled Tasks-0) Cassandra host localhost/127.0.0.1 removed
17:11:30,450 INFO  [org.rhq.server.metrics.StorageSession] (Scheduled Tasks-0) Changing request throughput from 60000.0 request/sec to 30000.0 requests/sec
17:11:30,451 INFO  [org.rhq.enterprise.server.storage.StorageClusterMonitor] (Scheduled Tasks-0) Storage node at 127.0.0.1 has been removed from the cluster
17:12:01,502 INFO  [org.rhq.enterprise.server.storage.StorageNodeOperationsHandlerBean] (EJB default - 10) Successfully decommissioned StorageNode[id=1001, address=127.0.0.1, cqlPort=9142, operationMode=DECOMMISSION, mtime=1411757609129]
17:12:01,543 INFO  [org.rhq.enterprise.server.storage.StorageNodeOperationsHandlerBean] (EJB default - 10) Running remove node maintenance for storage node StorageNode[id=10001, address=127.0.0.2, cqlPort=9142, operationMode=NORMAL, mtime=1411765749894]
17:12:02,220 INFO  [org.rhq.enterprise.server.storage.StorageNodeOperationsHandlerBean] (EJB default - 8) Finished remove node maintenance for StorageNode[id=10001, address=127.0.0.2, cqlPort=9142, operationMode=NORMAL, mtime=1411765749894]
17:12:02,223 INFO  [org.rhq.enterprise.server.storage.StorageNodeOperationsHandlerBean] (EJB default - 8) Finished running remove node maintenance on all cluster nodes
17:12:02,251 INFO  [org.rhq.enterprise.server.storage.StorageNodeOperationsHandlerBean] (EJB default - 8) Unannouncing StorageNode[id=1001, address=127.0.0.1, cqlPort=9142, operationMode=UNANNOUNCE, mtime=1411757609129]
17:12:03,275 INFO  [org.rhq.enterprise.server.storage.StorageNodeOperationsHandlerBean] (EJB default - 3) Successfully unannounced StorageNode[id=1001, address=127.0.0.1, cqlPort=9142, operationMode=UNANNOUNCE, mtime=1411757609129] to storage cluster
17:12:03,303 INFO  [org.rhq.enterprise.server.storage.StorageNodeOperationsHandlerBean] (EJB default - 3) Uninstalling StorageNode[id=1001, address=127.0.0.1, cqlPort=9142, operationMode=UNINSTALL, mtime=1411757609129]
17:12:08,098 INFO  [org.rhq.enterprise.server.storage.StorageNodeOperationsHandlerBean] (EJB default - 6) Successfully uninstalled StorageNode[id=1001, address=127.0.0.1, cqlPort=9142, operationMode=UNINSTALL, mtime=1411757609129] from disk
17:12:08,104 INFO  [org.rhq.enterprise.server.storage.StorageNodeOperationsHandlerBean] (EJB default - 6) Removing storage node resource Resource[id=10005, uuid=c8160394-8dd6-4e4d-a4d4-ad3b2871f8da, type={RHQStorage}RHQ Storage Node, key=RHQ Storage Node(127.0.0.1), name=RHQ Storage Node(127.0.0.1), parent=localhost, version=4.12.0.JON330ER03] from inventory
17:12:08,163 INFO  [org.rhq.enterprise.server.storage.StorageNodeOperationsHandlerBean] (EJB default - 6) Removing storage node entity StorageNode[id=1001, address=127.0.0.1, cqlPort=9142, operationMode=UNINSTALL, mtime=1411757609129] from database
17:12:08,163 INFO  [org.rhq.enterprise.server.storage.StorageNodeOperationsHandlerBean] (EJB default - 6) StorageNode[id=1001, address=127.0.0.1, cqlPort=9142, operationMode=UNINSTALL, mtime=1411757609129] has been undeployed

Comment 2 Simeon Pinder 2014-09-29 08:12:48 UTC
Moving into ER05 as didn't make the ER04 cut.

Comment 3 Armine Hovsepyan 2014-09-29 14:36:34 UTC
hi John,

on a clean JON 3.3 ER03 env the issue is not visible for me as well.

Closing as works-for-me and will reopen if it's visible again.

Comment 4 Armine Hovsepyan 2014-09-29 14:40:54 UTC
Created attachment 942353 [details]
server.log