You can use the xscmd utility to complete administrator tasks, such as viewing services and their rankings that are being used by each container, and updating the runtime environment to use new versions of the bundles.
Administrators are responsible for manually copying, installing, and starting bundles into the OSGi framework. eXtreme Scale includes an OSGi ServiceTrackerCustomizer to track any services that have been identified as eXtreme Scale plug-ins in the ObjectGrid descriptor XML file. Use the xscmd utility to validate which version of the plug-in is used, which versions are available to be used, and to perform bundle upgrades.
eXtreme Scale uses the service ranking number to identify the version of each service. When two or more services are loaded with the same reference, eXtreme Scale automatically uses the service with the highest ranking.
Since eXtreme Scale automatically chooses the service reference with the highest ranking, it is possible that the data grid may start with multiple rankings of a plug-in service.
If the command detects a mismatch of rankings or if it is unable to find a service, a non-zero error level is set. If the command completed successfully then the error level is set to 0.
The following example shows the output of the osgiCurrent command when two plug-ins are installed in the same grid on four servers. The loaderPlugin plug-in is using ranking 1, and the txCallbackPlugin is using ranking 2.
OSGi Service Name Current Ranking ObjectGrid Name MapSet Name Server Name
----------------- --------------- --------------- ----------- -----------
loaderPlugin 1 MyGrid MapSetA server1
loaderPlugin 1 MyGrid MapSetA server2
loaderPlugin 1 MyGrid MapSetA server3
loaderPlugin 1 MyGrid MapSetA server4
txCallbackPlugin 2 MyGrid MapSetA server1
txCallbackPlugin 2 MyGrid MapSetA server2
txCallbackPlugin 2 MyGrid MapSetA server3
txCallbackPlugin 2 MyGrid MapSetA server4
OSGi Service Name Current Ranking ObjectGrid Name MapSet Name Server Name
----------------- --------------- --------------- ----------- -----------
loaderPlugin 1 MyGrid MapSetA server1
loaderPlugin 2 MyGrid MapSetA server2
loaderPlugin 1 MyGrid MapSetA server3
loaderPlugin 1 MyGrid MapSetA server4
txCallbackPlugin 2 MyGrid MapSetA server1
txCallbackPlugin 2 MyGrid MapSetA server2
txCallbackPlugin 2 MyGrid MapSetA server3
txCallbackPlugin 2 MyGrid MapSetA server4
When bundles start that contain services that an ObjectGrid configuration is referencing, the eXtreme Scale runtime environment automatically tracks the plug-in, but does not immediately use it. The osgiAll command shows which plug-ins are available for each server.
When run without any parameters, all services are shown for all grids and servers. Additional filters, including the -serviceName <service_name> filter can be specified to limit the output to a single service or a subset of the data grid.
Server: server1
OSGi Service Name Available Rankings
----------------- ------------------
loaderPlugin 1, 2
txCallbackPlugin 1
Server: server2
OSGi Service Name Available Rankings
----------------- ------------------
loaderPlugin 1, 2
txCallbackPlugin 1
Summary - All servers have the same service rankings.
Server: server1
OSGi Service Name Available Rankings
----------------- ------------------
loaderPlugin 2
txCallbackPlugin 1
Server: server2
OSGi Service Name Available Rankings
----------------- ------------------
loaderPlugin 1, 2
txCallbackPlugin 1
Summary - The following servers are missing service rankings:
Server OSGi Service Name Missing Rankings
------ ----------------- ----------------
server1 loaderPlugin 1
Server: server2
OSGi Service Name Available Rankings
----------------- ------------------
invalidPlugin No service found
Server: server1
OSGi Service Name Available Rankings
----------------- ------------------
invalidPlugin No service found
Summary - All servers have the same service rankings.
The osgiCheck command accepts one or more sets of service rankings in the form: -serviceRankings <service name>;<ranking>[,<serviceName>;<ranking>]
When the rankings are all available, the method returns with an error level of 0. If one or more rankings are not available, a non-zero error level is set. A table of all of the servers that do not include the specified service rankings is displayed. Additional filters can be used to limit the service check to a subset of the available servers in the eXtreme Scale domain.
Server OSGi Service Unavailable Rankings
------ ------------ --------------------
server1 loaderPlugin 3
server2 loaderPlugin 3
The command accepts one or more sets of service rankings in the form: -serviceRankings <service name>;<ranking>[,<serviceName>;<ranking>] -g <grid name> -ms <mapset name>
The update process is idempotent so that if a client fails to complete any one task, it results in the operation being rolled back. If a client is unable to perform the rollback or is interrupted during the update process, the same command can be issued again, and it continues at the appropriate step.
If the client is unable to continue, and the process is restarted from another client, use the -force option to allow the client to perform the update. The osgiUpdate command prevents multiple clients from updating the same map set concurrently. For more details about the osgiUpdate command, see Updating OSGi services for eXtreme Scale plug-ins with xscmd.