Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[master] OADP-2009: Correctly get backup/restore logs in must-gather. #1037

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions must-gather/collection-scripts/logs/gather_logs_backup
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ skip_tls=$8
mkdir -p "${object_collection_path}"
echo "[cluster=${cluster}][ns=${ns}] Gathering 'velero backup describe ${backup}'"
if [ "$timeout" = "0s" ]; then
timeout 30s velero describe backup ${backup} --insecure-skip-tls-verify=${skip_tls} --details &> "${object_collection_path}/backup-describe-${backup}.txt" &
timeout 30s velero describe backup ${backup} --namespace ${ns} --insecure-skip-tls-verify=${skip_tls} --details &> "${object_collection_path}/backup-describe-${backup}.txt" &
else
timeout ${timeout} velero describe backup ${backup} --insecure-skip-tls-verify=${skip_tls} --details &> "${object_collection_path}/backup-describe-${backup}.txt" &
timeout ${timeout} velero describe backup ${backup} --namespace ${ns} --insecure-skip-tls-verify=${skip_tls} --details &> "${object_collection_path}/backup-describe-${backup}.txt" &
fi
echo "[cluster=${cluster}][ns=${ns}] Gathering 'velero backup logs ${backup}'"
timeout 30s velero backup logs ${backup} --insecure-skip-tls-verify=${skip_tls} --timeout=30s &> "${object_collection_path}/backup-${backup}.log" &
timeout 30s velero backup logs ${backup} --namespace ${ns} --insecure-skip-tls-verify=${skip_tls} --timeout=30s &> "${object_collection_path}/backup-${backup}.log" &

wait
6 changes: 3 additions & 3 deletions must-gather/collection-scripts/logs/gather_logs_restore
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ skip_tls=$8
mkdir -p "${object_collection_path}"
echo "[cluster=${cluster}][ns=${ns}] Gathering 'velero restore describe ${restore}'"
if [ "$timeout" = "0s" ]; then
timeout 30s velero describe restore ${restore} --insecure-skip-tls-verify=${skip_tls} --details &> "${object_collection_path}/restore-describe-${restore}.txt" &
timeout 30s velero describe restore ${restore} --namespace ${ns} --insecure-skip-tls-verify=${skip_tls} --details &> "${object_collection_path}/restore-describe-${restore}.txt" &
else
timeout ${timeout} velero describe restore ${restore} --insecure-skip-tls-verify=${skip_tls} --details &> "${object_collection_path}/restore-describe-${restore}.txt" &
timeout ${timeout} velero describe restore ${restore} --namespace ${ns} --insecure-skip-tls-verify=${skip_tls} --details &> "${object_collection_path}/restore-describe-${restore}.txt" &
fi
echo "[cluster=${cluster}][ns=${ns}] Gathering 'velero restore logs ${restore}'"
timeout 30s velero restore logs ${restore} --insecure-skip-tls-verify=${skip_tls} --timeout=30s &> "${object_collection_path}/restore-${restore}.log" &
timeout 30s velero restore logs ${restore} --namespace ${ns} --insecure-skip-tls-verify=${skip_tls} --timeout=30s &> "${object_collection_path}/restore-${restore}.log" &

wait