manageODC.py script
manageODC.py permits the interaction with the On Demand Configuration (ODC) tree. The ODC tree is an in-memory representation of the state of a WebSphere Application Server cell.
The manageODC.py script helps with troubleshooting On Demand Router (ODR) issues. We can also use the script to alter the ODC tree.
Forced alterations to the ODC tree might require a restart of the cell in order to correct inadvertent ODC tree corruption.
For transitioning users: The WebSphere Virtual Enterprise command that equates to manageODC.py is ve_manageODC.py. If we are making the transition from WebSphere Virtual Enterprise, we can continue to use the ve_manageODC.py command, which operates the same as the manageODC.py command.trns
The manageODC.py script is in the app_server_root/bin directory.
To obtain the usage information for manageODC.py, run:
./wsadmin.sh -lang jython -f manageODC.py
...or...
./wsadmin.sh -lang jython -f manageODC.py operation --help
Generate a target.xml file to determine the ODC names to plug into the script.
Operations
We can perform the following operations with the manageODC.py script:
- getTargetTree: Retrieve the target tree.
- nodeName: Name of the WebSphere node containing the server from which the tree is retrieved.
- serverName: Name of the server from which the tree is retrieved.
- getP2PMemberData: Retrieve data about peer-to-peer (P2P) members.
- nodeName: Name of the WebSphere node containing the server from which the P2P member data is retrieved.
- serverName: Name of the server from which the P2P member data is retrieved.
- generateHAPluginCfgs: Generates the plugin-cfg.xml file.
- generationDefinitionNames: Comma-separated list of generation names configured via cell custom properties of the form ODCPluginCfg. For example: ODCPluginCfg_1, ODCPluginCfg_2
- nodeName: Name of the WebSphere node containing the server that generates plugin-cfg.xml .
- serverName: Name of the server to that generates plugin-cfg.xml file.
Example
Generate a target.xml file to determine the ODC names to include in the script. The following code example shows a shortened version of a target.xml file, where parameters for the cell, node, and server to use in the script are located.
cellGroup name="target"> !-- cell section --> <cell name="Cell1"> !-- node section --> <node name="metis07"> !-- server section --> <server name="odr"> <property name="state" priority="1" value="STOPPED" />To delete the server named odr from the ODC tree, type the following command:
./wsadmin.sh -lang jython -f manageODC.py removeODCNode /cell/Cell1/node/metis07/server/odr <myNode> <myServer>
Note that /cellGroup/target is never specified as part of the path.
In this example, the property ODC object is named state, with a value of STOPPED, and a priority of 1. To change the property to STARTED.
./wsadmin.sh -lang jython -f manageODC.py modifyODCProperty /cell/Cell1/node/metis07/server/odr state 1::STARTED <mynode> <myserver>
Create and configure ODRs Configure ODRs Intelligent Management: scripts