Bug 805209

Summary: [as7] If plugin detects wrong server mode it should indicate so
Product: [Other] RHQ Project Reporter: Heiko W. Rupp <hrupp>
Component: PluginsAssignee: Libor Zoubek <lzoubek>
Status: CLOSED CURRENTRELEASE QA Contact: Mike Foley <mfoley>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 4.3CC: ccrouch, hrupp, theute
Target Milestone: ---   
Target Release: RHQ 4.4.0   
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-09-01 06:09:27 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On:    
Bug Blocks: 707223    

Description Heiko W. Rupp 2012-03-20 12:40:27 EDT
Both as7 domain and standalone mode have the management port on 9990.
So it is possible to start a server in standalone mode, have it detected by RHQ and then shut the server down and boot it in domain mode.
As the plugin expects standalone mode it will e.g. run any operation against subsystems against an address of /subsystem=*  which is not present, as those live in domain mode below /profile=*/subsystem=* 

So the as should check (at least in ResourceComponent.start) for the running mode and throw a ResourceError if the mode detected at discovery does not match the mode at component start time,

Actually as getAvailability() is calling into the server, the check could be done there, but there is no way to convey the wrong start mode back to the user.
Comment 1 Heiko W. Rupp 2012-03-21 15:58:20 EDT
master  bf612201cbd5

This is opposed to the previous comment done via getAvailability(). If the server is not reachable,
down is returned. If it is up and the launch-type attribute matches the discovered mode, up is returned, 
otherwise an exception is thrown, that shows up in the UI in the ResourceError area (yellow triangle)
Comment 2 Heiko W. Rupp 2013-09-01 06:09:27 EDT
Bulk closing of items that are on_qa and in old RHQ releases, which are out for a long time and where the issue has not been re-opened since.