]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-build.git/commitdiff
sepia-fog-images: add image test to 'poll for deploy' loop 2381/head
authorDan Mick <dan.mick@redhat.com>
Wed, 18 Jun 2025 17:10:21 +0000 (10:10 -0700)
committerDan Mick <dan.mick@redhat.com>
Wed, 18 Jun 2025 17:17:02 +0000 (10:17 -0700)
When checking for scheduled deploy tasks, check not only for existing
deploy tasks but for deploy tasks *for the image we're proposing to
capture*.  There are often deploy tasks on a busy fog server, but we
only need to avoid affecting tasks for the image we're updating

Signed-off-by: Dan Mick <dan.mick@redhat.com>
sepia-fog-images/build/build

index 07b581e23a309e622f3a90ce81b0406690c57216..0a3925dae151219498528dbda052ac28e42ff4e4 100755 (executable)
@@ -221,7 +221,7 @@ if [ "$PAUSEQUEUE" == "true" ]; then
   fogdeployid=$(curl -f -s -k -H "fog-api-token: ${FOG_API_TOKEN}" -H "fog-user-token: ${FOG_USER_TOKEN}" http://fog.front.sepia.ceph.com/fog/tasktype -d '{"name": "Deploy"}' -X GET | jq -r '.tasktypes[0].id')
 
   # Check for scheduled deploy tasks
-  deploytasks=$(curl -f -s -k -H "fog-api-token: ${FOG_API_TOKEN}" -H "fog-user-token: ${FOG_USER_TOKEN}" http://fog.front.sepia.ceph.com/fog/task/active -d '{"typeID": "'${fogdeployid}'"}' -X GET | jq -r '.count')
+  deploytasks=$(curl -f -s -k -H "fog-api-token: ${FOG_API_TOKEN}" -H "fog-user-token: ${FOG_USER_TOKEN}" http://fog.front.sepia.ceph.com/fog/task/active -d '{"typeID": "'${fogdeployid}'", "imageID": "'${fogimageid}'"}' -X GET | jq -r '.count')
 
   # If there are scheduled or active deploy tasks, pause the queue and let them finish.
   # Capturing a new OS image can interrupt active OS deployments.