16219: Load all fields needed to compute node size.
authorTom Clegg <tom@tomclegg.ca>
Thu, 5 Mar 2020 19:44:22 +0000 (14:44 -0500)
committerTom Clegg <tom@tomclegg.ca>
Thu, 5 Mar 2020 19:44:22 +0000 (14:44 -0500)
Without ContainerImage and Mounts, the scratch size requirement can't
be computed correctly.

Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom@tomclegg.ca>

lib/dispatchcloud/container/queue.go

index a4a270dd1013eee601cd214eb7e336f6cd8a29e2..d128c265f84c13594ec309f5ac36d93b65d82b21 100644 (file)
@@ -26,8 +26,9 @@ type APIClient interface {
 // A QueueEnt is an entry in the queue, consisting of a container
 // record and the instance type that should be used to run it.
 type QueueEnt struct {
-       // The container to run. Only the UUID, State, Priority, and
-       // RuntimeConstraints fields are populated.
+       // The container to run. Only the UUID, State, Priority,
+       // RuntimeConstraints, Mounts, and ContainerImage fields are
+       // populated.
        Container    arvados.Container    `json:"container"`
        InstanceType arvados.InstanceType `json:"instance_type"`
 }
@@ -381,7 +382,7 @@ func (cq *Queue) poll() (map[string]*arvados.Container, error) {
                        *next[upd.UUID] = upd
                }
        }
-       selectParam := []string{"uuid", "state", "priority", "runtime_constraints"}
+       selectParam := []string{"uuid", "state", "priority", "runtime_constraints", "container_image", "mounts"}
        limitParam := 1000
 
        mine, err := cq.fetchAll(arvados.ResourceListParams{