You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Introduction

Some users perform maintenance on servers used in a JS7 - Agent Cluster without shutting down the related Subagent.

  • One option is to disable a given Subagent. The related operation is available from the Manage Controllers/Agents view for each Subagent.
    • In an active-passive Subagent Cluster the next Subagent will become active.
    • In an active-active Subagent Cluster the remaining Subagents will share the load.
    • Disabling a Subagent is an operation applied to all Subagent Clusters that include the given Subagent. The operation might not be applicable in a situation when an active Subagent should be switched in a specific Subagent Cluster only.
  • To switch a Subagent in a specific Subagent Cluster users can run a script that will access the JS7 - REST Web Service API to perform the following actions:
    • In an active-passive Subagent Cluster the next standby Subagent or a specific standby Subagent will become active.
    • For an active-active Subagent Cluster the operation makes no sense as all Subagents will be used independently of their precedence.

The following explanations focus on a solution using a Unix shell script.

Switch Subagent Cluster Script

The script is provided for download and can be used to automate switching Subagents in a given Subagent Cluster.

  • The script is available for Linux and MacOS® using bash shell.
  • The script terminates with exit code 0 to signal successful switching, with exit code 1 for command line argument errors and with exit code 4 for non-recoverable errors. Exit code 3 signals that no matching Subagent Cluster has been found.
  • The script is intended as a baseline example for customization by JS7 users and by SOS within the scope of professional services.

Prerequisites

The Script requires the jq utility to be available from the operating system. 

jq is ships with the MIT license, see https://opensource.org/licenses/MIT.

Download

Download: switch-subagent-cluster.sh


  • No labels