[ARVADOS] updated: 1.3.0-2270-gdb83f805e

Git user git at public.arvados.org
Tue Jun 9 21:22:44 UTC 2020


Summary of changes:
 services/crunch-dispatch-slurm/crunch-dispatch-slurm.go | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

       via  db83f805e4ccf82eef22fe2c9a3db38ebd772a83 (commit)
      from  3c0a5f77f2bea2206aa3fe9d5ffa8245c85c9cbc (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit db83f805e4ccf82eef22fe2c9a3db38ebd772a83
Author: Tom Clegg <tom at tomclegg.ca>
Date:   Wed May 13 17:07:11 2020 -0400

    16391: Fix log message.
    
    Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom at tomclegg.ca>

diff --git a/services/crunch-dispatch-slurm/crunch-dispatch-slurm.go b/services/crunch-dispatch-slurm/crunch-dispatch-slurm.go
index 36bcef4f2..4115482d8 100644
--- a/services/crunch-dispatch-slurm/crunch-dispatch-slurm.go
+++ b/services/crunch-dispatch-slurm/crunch-dispatch-slurm.go
@@ -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)

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list