Skip to main content

Stop-ZrStore

Stops all instances of a Zaris store, or a single named instance, through the connected managers.

Syntax

Stop-ZrStore
-Name <string>
[-InstanceName <string>]
[-Graceful]
[-Managers <string[]>] [-Port <int>] [-Token <string>]
[-TimeoutSec <int>] [-Parallel] [-FailFast]

Description

Stop-ZrStore enumerates the store's instances on each connected manager and stops them via the Management Service, reporting per-instance success or failure. When -InstanceName is given, only that instance is stopped.

A whole-store stop takes every node down together, so there is no surviving peer to drain to. For that reason the cmdlet defaults to a fast hard kill; pass -Graceful to opt into a per-node drain and cluster-leave. The cmdlet requires an active workspace (see New-ZrWorkspace / Use-ZrWorkspace) or an explicit -Managers list.

Parameters

ParameterTypeRequiredDescription
-NamestringYesName of the store to stop. Position 0.
-InstanceNamestringNoStop only this instance; stops all instances of the store when omitted.
-GracefulswitchNoOpt into a per-node graceful drain and cluster-leave instead of the default fast hard kill.
-Managersstring[]NoManagement Service endpoints (host, host:port, or URL) to target. When omitted, the active workspace/connected managers are used.
-PortintNoManager port for bare-host endpoints or localhost fallback. Default 7801.
-TokenstringNoAdmin bearer token for authenticated calls; falls back to the token from the active workspace.
-TimeoutSecintNoPer-request timeout in seconds. Default 30.
-ParallelswitchNoFan the operation out to all resolved managers concurrently.
-FailFastswitchNoStop at the first manager or instance that returns an error.

Examples

Stop every instance of a store (fast hard kill).

Stop-ZrStore -Name orders

Stop a single instance with a graceful drain.

Stop-ZrStore -Name orders -InstanceName 10.0.0.11-n0 -Graceful

Stop across several managers concurrently.

Stop-ZrStore -Name orders -Managers 10.0.0.11,10.0.0.12,10.0.0.13 -Parallel

Output

Results are rendered as a table with Manager, Action (StopInstance:<name>), Result (SUCCESS/ERROR), and a message column — one row per instance stop.