Bug 817631

Summary: [as7] Honor the "Configuration" plugin config property when starting or restarting the server
Product: [Other] RHQ Project Reporter: Lukas Krejci <lkrejci>
Component: PluginsAssignee: Hugh Brock <hbrock>
Status: ON_QA --- QA Contact: Mike Foley <mfoley>
Severity: unspecified Docs Contact:
Priority: high    
Version: 4.4CC: hrupp
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugzilla.redhat.com/show_bug.cgi?id=818919
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
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, 801638    

Description Lukas Krejci 2012-04-30 13:05:42 EDT
Description of problem:
The "Configuration" property (config internally) specifies what configuration the AS7 server runs with. This property is writable and therefore setting it should have effect on the server.

Version-Release number of selected component (if applicable):
4.4.0-SNAPSHOT

How reproducible:
always

Steps to Reproduce:
1. Run AS7 with bin/standalone.sh
2. Let RHQ discover it, import it
3. In the connection settings of the server, change "Configuration" to standalone-ha.xml
4. Invoke the "restart" operation on the server
  
Actual results:
The server runs with the default configuration, not standalone-ha.xml
(this can be checked by examining output of):
grep 'sun.java.command' $AS7_HOME/standalone/log/boot.log

Expected results:
The configuration should be respected

Additional info:
Comment 1 Ian Springer 2012-05-03 17:26:49 EDT
[master http://git.fedorahosted.org/git?p=rhq/rhq.git;a=commitdiff;h=a6ac574] removes the config, hostConfig, and domainConfig plugin config props, and replaces them with serverConfig, hostConfig, and domainConfig traits. Traits are more appropriate than plugin config props, because the values can change if the user restarts the server and specifies different config file names, and a plugin config cannot be updated by the plugin discovery component once a Resource has been imported.

To change a Server's config file name via the RHQ GUI:

1) Update the value of the 'startScriptArgs' conn prop (e.g. append --server-config=standalone-full.xml to it)
2) Execute the Restart operation to restart the server with the new args.

Within an hour, you should see the value of the serverConfig trait change to "standalone-full.xml".
Comment 2 Ian Springer 2012-05-05 12:46:57 EDT
http://git.fedorahosted.org/git/?p=rhq/rhq.git;a=commitdiff;h=26a25e8 fixes a bug where a null value was being returned for the "config-file" ("Server Config") trait.