Load-balanced discover command
The discoverloadbalanced command allows a discovery to be run in load-balancing mode, which means discovery is continuous.
About load-balanced discovery
Load-balanced, continuous discovery is achieved by using a pool of discovery servers. This maximizes the utilization of servers and guards against failover, thereby preventing discoveries in progress from being interrupted.
Discovered environments can be separated into areas, with each drawing on its own pool of servers. Furthermore, each discovery can be performed by entering sets of IP addresses to define the scope of the discovery.
The PrimaryStorageServer (PSS) acts as a load-balancing discovery controller, allocating scope and resources to each discovery server (DS). Should the PSS fail, all running discoveries will be completed, but no new ones allocated.
The PSS controls discovery by placing work into a queue, but does not push tasks to a DS; instead, each participating DS actively requests work from the queue when it is ready, and then signals 'in progress' as the discovery progresses. If no 'in progress' signal is received, the PSS reallocates the work.
Load-balancing discovery scenarios
- Load-balanced HA discovery based against scope group
- A user runs a discovery against a defined scope group via command line interface (CLI). The pool of servers is used to optimize the discovery workload, based on the scopes (from single to multiple scope) being part of the scope group.
- Dynamic generation of the scope group
-
A user runs a load-balanced discovery using a list of IP addresses provided as a file. This creates a scope group with automatically generated child scopes, with IP addresses divided between child scopes.
Command syntax
As for a standard discovery using the discover command, the continuous load-balanced discovery functionality (discoverloadbalanced) is controlled using api.sh.
Parameters
- api.sh -u <user> -p <password> discoverloadbalanced start --poolName <poolName> --scopeGroup <scopeGroup> [--profile <profileName>]
- Starts continuous, load-balanced discovery against each scope
in
<scopeGroup>
, and on each server belonging to the discovery pool specified in<poolName>
- api.sh -u <user> -p <password> discoverloadbalanced startFromFiles --files <filePath1,filePath2,...> --maxScopeSize <size> [--profile <profileName>]
- Starts continuous, load-balanced discovery against each scope
passed via
--files
argument. Each file is parsed, and a new group named from file name (without extension) is created. In each group scopes are added with the maximum size specified inmaxScopeSize
.poolName
is assumed to be the same asgroupName
- api.sh -u <user> -p <password> discoverloadbalanced startFromDirectory --dir <directory path> --maxScopeSize <size> [--profile <profileName>]
- As in the
--files
example, but starts discovery against each file in the directory. - api.sh -u <user> -p <password> discoverloadbalanced status
- Prints the current status of the load-balanced discovery.
- api.sh -u <user> -p <password> discoverloadbalanced abort <poolName>
- Aborts the discovery for the
poolName
specified. - api.sh -u <user> -p <password> discoverloadbalanced abort --poolName <poolName> --scopeSet <scopeSetName>
- Aborts the discovery for a specified
scopeSet
running or scheduled within the specifiedpoolName
. - api.sh -u <user> -p <password> discoverloadbalanced pause <poolName>
- Stops discovery for the specified
poolName
, and all scopes in the discovery run are moved back to the 'forTake' state. Current discoveries are aborted. - api.sh -u <user> -p <password> discoverloadbalanced resume <poolName>
- Resumes paused discovery for the specified
poolName
, and all scopes in the 'forTake' state are now available for processing.
Properties for the primary storage server
- com.ibm.cdb.internalscheduling.discoverypool.scopePrefix
- Specifies prefix for automatically created scopes (for startFromFiles and startFromDirectory options)
- com.ibm.cdb.internalscheduling.discoverypool.timeToNonAlive
- Specifies time in seconds, that is, how long discovery is assumed to be running without any information about status received from the discovery server.
Properties for the discovery server
- com.ibm.cdb.internalscheduling.discoverypool.enabled
- Enables the discovery server to be part of the discovery pool.
- com.ibm.cdb.internalscheduling.discoverypool.name
- Defines poolName for a discovery server
- com.ibm.cdb.internalscheduling.discoverypool.checkinginterval
- Specifies the time in seconds that the discovery server checks for new jobs to take (if ready), also how often to inform PSS about a job in progress.