2021-01-08 13:41:50 +01:00
|
|
|
From 66f6c2540a151487b26c89a2bb66199d6c65c18d Mon Sep 17 00:00:00 2001
|
2019-04-26 12:09:06 +02:00
|
|
|
From: Marcelo Chiaradia <mchiaradia@suse.com>
|
|
|
|
Date: Thu, 4 Apr 2019 13:57:38 +0200
|
|
|
|
Subject: [PATCH] Add 'batch_presence_ping_timeout' and
|
|
|
|
'batch_presence_ping_gather_job_timeout' parameters for synchronous batching
|
|
|
|
|
|
|
|
---
|
2021-01-08 13:41:50 +01:00
|
|
|
salt/cli/batch.py | 16 ++++++++++++++--
|
|
|
|
1 file changed, 14 insertions(+), 2 deletions(-)
|
2019-04-26 12:09:06 +02:00
|
|
|
|
|
|
|
diff --git a/salt/cli/batch.py b/salt/cli/batch.py
|
2021-01-08 13:41:50 +01:00
|
|
|
index 527cffdeb7..2bc5444aef 100644
|
2019-04-26 12:09:06 +02:00
|
|
|
--- a/salt/cli/batch.py
|
|
|
|
+++ b/salt/cli/batch.py
|
2021-01-08 13:41:50 +01:00
|
|
|
@@ -77,6 +77,13 @@ def batch_get_opts(
|
2019-04-26 12:09:06 +02:00
|
|
|
if key not in opts:
|
|
|
|
opts[key] = val
|
|
|
|
|
2021-01-08 13:41:50 +01:00
|
|
|
+ opts["batch_presence_ping_timeout"] = kwargs.get(
|
|
|
|
+ "batch_presence_ping_timeout", opts["timeout"]
|
|
|
|
+ )
|
|
|
|
+ opts["batch_presence_ping_gather_job_timeout"] = kwargs.get(
|
|
|
|
+ "batch_presence_ping_gather_job_timeout", opts["gather_job_timeout"]
|
|
|
|
+ )
|
2019-04-26 12:09:06 +02:00
|
|
|
+
|
|
|
|
return opts
|
|
|
|
|
|
|
|
|
2021-01-08 13:41:50 +01:00
|
|
|
@@ -115,7 +122,7 @@ class Batch:
|
|
|
|
self.opts["tgt"],
|
|
|
|
"test.ping",
|
|
|
|
[],
|
|
|
|
- self.opts["timeout"],
|
|
|
|
+ self.opts.get("batch_presence_ping_timeout", self.opts["timeout"]),
|
|
|
|
]
|
2019-04-26 12:09:06 +02:00
|
|
|
|
2021-01-08 13:41:50 +01:00
|
|
|
selected_target_option = self.opts.get("selected_target_option", None)
|
|
|
|
@@ -126,7 +133,12 @@ class Batch:
|
2019-04-26 12:09:06 +02:00
|
|
|
|
2021-01-08 13:41:50 +01:00
|
|
|
self.pub_kwargs["yield_pub_data"] = True
|
|
|
|
ping_gen = self.local.cmd_iter(
|
|
|
|
- *args, gather_job_timeout=self.opts["gather_job_timeout"], **self.pub_kwargs
|
|
|
|
+ *args,
|
|
|
|
+ gather_job_timeout=self.opts.get(
|
|
|
|
+ "batch_presence_ping_gather_job_timeout",
|
|
|
|
+ self.opts["gather_job_timeout"],
|
|
|
|
+ ),
|
|
|
|
+ **self.pub_kwargs
|
|
|
|
)
|
2019-04-26 12:09:06 +02:00
|
|
|
|
|
|
|
# Broadcast to targets
|
|
|
|
--
|
2021-01-08 13:41:50 +01:00
|
|
|
2.29.2
|
2019-04-26 12:09:06 +02:00
|
|
|
|
|
|
|
|