X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/75310a63472361ad0a84801024193cc9f34393e0..70838209c214bfa57ef4bce289e1530a1cc2b081:/services/crunch-dispatch-slurm/crunch-dispatch-slurm.go diff --git a/services/crunch-dispatch-slurm/crunch-dispatch-slurm.go b/services/crunch-dispatch-slurm/crunch-dispatch-slurm.go index e4a1e4840b..4115482d80 100644 --- a/services/crunch-dispatch-slurm/crunch-dispatch-slurm.go +++ b/services/crunch-dispatch-slurm/crunch-dispatch-slurm.go @@ -18,11 +18,11 @@ import ( "strings" "time" - "git.curoverse.com/arvados.git/lib/config" - "git.curoverse.com/arvados.git/lib/dispatchcloud" - "git.curoverse.com/arvados.git/sdk/go/arvados" - "git.curoverse.com/arvados.git/sdk/go/arvadosclient" - "git.curoverse.com/arvados.git/sdk/go/dispatch" + "git.arvados.org/arvados.git/lib/config" + "git.arvados.org/arvados.git/lib/dispatchcloud" + "git.arvados.org/arvados.git/sdk/go/arvados" + "git.arvados.org/arvados.git/sdk/go/arvadosclient" + "git.arvados.org/arvados.git/sdk/go/dispatch" "github.com/coreos/go-systemd/daemon" "github.com/ghodss/yaml" "github.com/sirupsen/logrus" @@ -280,7 +280,8 @@ func (disp *Dispatcher) runContainer(_ *dispatch.Dispatcher, ctr arvados.Contain cmd = append(cmd, disp.cluster.Containers.CrunchRunArgumentsList...) if err := disp.submit(ctr, cmd); err != nil { var text string - if err, ok := err.(dispatchcloud.ConstraintsNotSatisfiableError); ok { + switch err := err.(type) { + case dispatchcloud.ConstraintsNotSatisfiableError: var logBuf bytes.Buffer fmt.Fprintf(&logBuf, "cannot run container %s: %s\n", ctr.UUID, err) if len(err.AvailableTypes) == 0 { @@ -296,7 +297,7 @@ func (disp *Dispatcher) runContainer(_ *dispatch.Dispatcher, ctr arvados.Contain } text = logBuf.String() disp.UpdateState(ctr.UUID, dispatch.Cancelled) - } else { + default: text = fmt.Sprintf("Error submitting container %s to slurm: %s", ctr.UUID, err) } log.Print(text)