Skip to content

Commit 2f2b0d1

Browse files
laurentdroinDanni Moiseyev
authored and
Danni Moiseyev
committed
Collecting the logs for all containers inside each redis enterprise pod (#85)
There are now several containers in each redis enterprise pod (redis-enterprise-node and bootstrapper) so we either need to specify each container name, or gather logs for all the containers.
1 parent 806ea46 commit 2f2b0d1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

log_collector.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ def collect_pods_logs(namespace, output_dir):
159159
return
160160

161161
for pod in pods:
162-
cmd = "kubectl logs -n {} {}".format(namespace, pod)
162+
cmd = "kubectl logs -n {} {} --all-containers=true".format(namespace, pod)
163163
with open(os.path.join(logs_dir, "{}.log".format(pod)), "w+") as fp:
164164
p = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
165165
while True:

0 commit comments

Comments
 (0)