Skip to content

Commit

Permalink
Collecting the logs for all containers inside each redis enterprise p…
Browse files Browse the repository at this point in the history
…od (RedisLabs#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.
  • Loading branch information
laurentdroin authored and Danni Moiseyev committed Nov 5, 2019
1 parent 806ea46 commit 2f2b0d1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion log_collector.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ def collect_pods_logs(namespace, output_dir):
return

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

0 comments on commit 2f2b0d1

Please sign in to comment.