Skip to content

Commit 3ccfe4e

Browse files
authored
increas timeout limit and cleanup resource in rerun (#2408)
* increase timeout time Signed-off-by: Allen Li <liyuchen223@gmail.com> * cleanup resource in rurun Signed-off-by: Allen Li <liyuchen223@gmail.com> --------- Signed-off-by: Allen Li <liyuchen223@gmail.com>
1 parent 6fc7f09 commit 3ccfe4e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

preload_data.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ function main() {
5656
if [[ $CLEANUP == "false" ]]; then
5757
if [[ $RERUN == "true" ]]; then
5858
info "Rerun specified..."
59+
cleanup
5960
deletemongocopy
6061
fi
6162
# run backup preload
@@ -75,6 +76,7 @@ function main() {
7576
#any extra config
7677
else
7778
info "Cleanup selected. Cleaning MongoDB in services namespace $TO_NAMESPACE"
79+
cleanup
7880
deletemongocopy
7981
fi
8082
}
@@ -2389,12 +2391,12 @@ function deletemongocopy {
23892391
warning "Volume for pvc cs-mongodump not found in $TO_NAMESPACE. It may have already been deleted."
23902392
else
23912393
${OC} patch pv $VOL -p '{"spec": { "persistentVolumeReclaimPolicy" : "Delete" }}'
2392-
${OC} delete pvc cs-mongodump -n $TO_NAMESPACE --ignore-not-found --timeout=10s
2394+
${OC} delete pvc cs-mongodump -n $TO_NAMESPACE --ignore-not-found --timeout=30s
23932395
if [ $? -ne 0 ]; then
23942396
info "Failed to delete pvc cs-mongodump, patching its finalizer to null..."
23952397
${OC} patch pvc cs-mongodump -n $TO_NAMESPACE --type="json" -p '[{"op": "remove", "path":"/metadata/finalizers"}]' --ignore-not-found
23962398
fi
2397-
${OC} delete pv $VOL --ignore-not-found --timeout=10s
2399+
${OC} delete pv $VOL --ignore-not-found --timeout=30s
23982400
if [ $? -ne 0 ]; then
23992401
info "Failed to delete pv $VOL, patching its finalizer to null..."
24002402
${OC} patch pv $VOL --type="json" -p '[{"op": "remove", "path":"/metadata/finalizers"}]'

0 commit comments

Comments
 (0)