summaryrefslogtreecommitdiffstats
path: root/vespaclient/src/perl/lib/Yahoo/Vespa/ClusterController.pm
diff options
context:
space:
mode:
Diffstat (limited to 'vespaclient/src/perl/lib/Yahoo/Vespa/ClusterController.pm')
-rw-r--r--vespaclient/src/perl/lib/Yahoo/Vespa/ClusterController.pm7
1 files changed, 5 insertions, 2 deletions
diff --git a/vespaclient/src/perl/lib/Yahoo/Vespa/ClusterController.pm b/vespaclient/src/perl/lib/Yahoo/Vespa/ClusterController.pm
index cac91885fb9..7b9cb7ee554 100644
--- a/vespaclient/src/perl/lib/Yahoo/Vespa/ClusterController.pm
+++ b/vespaclient/src/perl/lib/Yahoo/Vespa/ClusterController.pm
@@ -80,8 +80,8 @@ sub detectClusterController { # ()
enableAutomaticLineBreaks($oldVal);
}
}
-sub setNodeUserState { # (ClusterName, NodeType, Index, State, Reason, NoWait)
- my ($cluster, $service, $index, $state, $reason, $no_wait) = @_;
+sub setNodeUserState { # (ClusterName, NodeType, Index, State, Reason, NoWait, SafeMode)
+ my ($cluster, $service, $index, $state, $reason, $no_wait, $safe_mode) = @_;
my @params = ();
my @headers = (
'Content-Type' => 'application/json'
@@ -103,6 +103,9 @@ sub setNodeUserState { # (ClusterName, NodeType, Index, State, Reason, NoWait)
if ($no_wait) {
$request->{'response-wait'} = 'no-wait';
}
+ if ($safe_mode) {
+ $request->{'condition'} = 'safe';
+ }
my $content = Json::encode($request);
my $path = &getPathToNode($cluster, $service, $index);