Skip to content

Commit 98488ac

Browse files
committed
Add a recursive chmod on $output_dir to make results readable
1 parent f65d14e commit 98488ac

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

omg_all_logs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/bash
1+
#!/usr/bin/bash
22

33
function usage() {
44
echo "Usage: $0 -p _pattern_ -o output_dir"
@@ -52,15 +52,15 @@ for p in $pods; do
5252
omg get events -A | grep $p > ${events_output}
5353
else
5454
echo "------------------------- events from pod $p -------------------------"
55-
omg get events -A| grep $p
55+
omg get events -A| grep $p
5656
fi
5757

5858
# get the base list of containers within the pod
59-
# e.g. omg logs $1 will return the following error
59+
# e.g. omg logs $1 will return the following error
6060
#[ERROR] This pod has more than one containers: ['blkdevmapper', 'log-collector', 'expand-bluefs', 'osd', 'chown-container-data-dir'] Use -c/--container to specify the container
6161

6262
containers=$(omg logs $p |grep "\['"|sed "s/\[\('.*'\)\].*/\1/" |sed -e "s/'//g" -e "s/,//g");
63-
if [ "$containers" != "" ]; then
63+
if [ "$containers" != "" ]; then
6464
for c in $containers; do
6565
if [ "$output_dir" != "" ]; then
6666
container_output=${base_outfile}"_$c"
@@ -83,4 +83,7 @@ for p in $pods; do
8383
fi
8484
done
8585

86+
if [ "$output_dir" != "" ]; then
87+
chmod -R 755 $output_dir
88+
fi
8689

0 commit comments

Comments
 (0)