[ARVADOS] updated: 1.3.0-47-ge6d59d90c

Git user git at public.curoverse.com
Mon Dec 10 11:21:58 EST 2018


Summary of changes:
 lib/dispatchcloud/scheduler/sync.go | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

       via  e6d59d90cfbac0da3a61bb48bbca8ad85ebef129 (commit)
      from  5d05b79a21ee85fa6ec53f9bc88e6ddb54029f04 (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 e6d59d90cfbac0da3a61bb48bbca8ad85ebef129
Author: Tom Clegg <tclegg at veritasgenetics.com>
Date:   Mon Dec 10 11:21:05 2018 -0500

    14360: Kill containers whose priority drops to 0 while running.
    
    Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tclegg at veritasgenetics.com>

diff --git a/lib/dispatchcloud/scheduler/sync.go b/lib/dispatchcloud/scheduler/sync.go
index a85162deb..4c55b3c0d 100644
--- a/lib/dispatchcloud/scheduler/sync.go
+++ b/lib/dispatchcloud/scheduler/sync.go
@@ -5,6 +5,7 @@
 package scheduler
 
 import (
+	"fmt"
 	"time"
 
 	"git.curoverse.com/arvados.git/lib/dispatchcloud/container"
@@ -33,10 +34,10 @@ func (sch *Scheduler) sync() {
 			logger.WithError(err).Print("error cancelling container")
 		}
 	}
-	kill := func(ent container.QueueEnt) {
+	kill := func(ent container.QueueEnt, reason string) {
 		uuid := ent.Container.UUID
 		logger := sch.logger.WithField("ContainerUUID", uuid)
-		logger.Debugf("killing crunch-run process because state=%q", ent.Container.State)
+		logger.Debugf("killing crunch-run process because %s", reason)
 		sch.pool.KillContainer(uuid)
 	}
 	qEntries, qUpdated := sch.queue.Entries()
@@ -48,6 +49,8 @@ func (sch *Scheduler) sync() {
 				go cancel(ent, "not running on any worker")
 			} else if !exited.IsZero() && qUpdated.After(exited) {
 				go cancel(ent, "state=\"Running\" after crunch-run exited")
+			} else if ent.Container.Priority == 0 {
+				go kill(ent, fmt.Sprintf("priority=%d", ent.Container.Priority))
 			}
 		case arvados.ContainerStateComplete, arvados.ContainerStateCancelled:
 			if running {
@@ -59,7 +62,7 @@ func (sch *Scheduler) sync() {
 				// of kill() will be to make the
 				// worker available for the next
 				// container.
-				go kill(ent)
+				go kill(ent, fmt.Sprintf("state=%q", ent.Container.State))
 			} else {
 				sch.logger.WithFields(logrus.Fields{
 					"ContainerUUID": uuid,
@@ -73,7 +76,7 @@ func (sch *Scheduler) sync() {
 				// a network outage and is still
 				// preparing to run a container that
 				// has already been unlocked/requeued.
-				go kill(ent)
+				go kill(ent, fmt.Sprintf("state=%q", ent.Container.State))
 			}
 		case arvados.ContainerStateLocked:
 			if running && !exited.IsZero() && qUpdated.After(exited) {

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list