Skip to content

Commit f5d297f

Browse files
committed
merge other changes
1 parent f380a83 commit f5d297f

File tree

1 file changed

+16
-8
lines changed

1 file changed

+16
-8
lines changed

turbinia/e2e/run-e2e-gke.sh

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -78,16 +78,24 @@ turbinia-client config list
7878
echo "Running Turbinia: turbinia-client submit googleclouddisk --project $GCP_PROJECT --zone $GCP_ZONE --disk_name $DISK --request_id $REQUEST_ID"
7979
turbinia-client submit googleclouddisk --project $GCP_PROJECT --zone $GCP_ZONE --disk_name $DISK --request_id $REQUEST_ID
8080

81-
# Wait until request is complete
82-
sleep 5
81+
# Wait until request is received
82+
req=$(turbinia-client status request $REQUEST_ID -j)
83+
while [[ -z "$req" ]]
84+
do
85+
echo "Request $REQUEST_ID is still populating. Sleeping for 5 seconds..."
86+
sleep 5
87+
req=$(turbinia-client status request $REQUEST_ID -j)
88+
done
89+
90+
# Wait until request is complete
8391
req_status=$(turbinia-client status request $REQUEST_ID -j | jq -r '.status')
84-
while [ $req_status = "running" ]
92+
while [[ $req_status = "running" ]]
8593
do
8694
req_status=$(turbinia-client status request $REQUEST_ID -j | jq -r '.status')
8795
if [[ $req_status = "running" ]]
8896
then
89-
echo "Turbinia request $REQUEST_ID is still running. Sleeping for 10 seconds..."
90-
sleep 10
97+
echo "Turbinia request $REQUEST_ID is still running. Sleeping for 180 seconds..."
98+
sleep 180
9199
fi
92100
done
93101

@@ -100,7 +108,7 @@ length=$(echo $task_status | jq '. | length')
100108
# Check if there is a failed Turbinia Task
101109
if [[ $length > 0 ]]
102110
then
103-
echo "A failed Task for Turbinia Request $req has been detected."
111+
echo "A failed Task for Turbinia Request $REQUEST_ID has been detected"
104112
echo "Listing failed Tasks..."
105113
# Grab the Task ID
106114
tasks=$(echo $task_status | jq -r '.[] | .id')
@@ -124,7 +132,7 @@ then
124132
done
125133
# If no failed Tasks were detected
126134
else
127-
echo "No failed Tasks detected for Turbinia request $req"
135+
echo "No failed Tasks detected for Turbinia request $REQUEST_ID"
128136
fi
129137

130138
# Restore previous Turbinia config
@@ -145,4 +153,4 @@ echo "Turbinia integration tests succeeded!"
145153
echo -n "Ended at "
146154
date -Iseconds
147155

148-
exit 0
156+
exit 0

0 commit comments

Comments
 (0)