From 6b28024befbe20e2c2c298c48c6bc20926bb77de Mon Sep 17 00:00:00 2001 From: Kenjiro Nakayama Date: Sun, 14 Aug 2016 13:11:17 +0900 Subject: [PATCH] tiny: Catch error returned from SyncServices in rkt driver --- client/driver/rkt.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/driver/rkt.go b/client/driver/rkt.go index 3dbcea8a0..35a75fb1f 100644 --- a/client/driver/rkt.go +++ b/client/driver/rkt.go @@ -326,7 +326,7 @@ func (d *RktDriver) Start(ctx *ExecContext, task *structs.Task) (DriverHandle, e doneCh: make(chan struct{}), waitCh: make(chan *dstructs.WaitResult, 1), } - if h.executor.SyncServices(consulContext(d.config, "")); err != nil { + if err := h.executor.SyncServices(consulContext(d.config, "")); err != nil { h.logger.Printf("[ERR] driver.rkt: error registering services for task: %q: %v", task.Name, err) } go h.run() @@ -367,7 +367,7 @@ func (d *RktDriver) Open(ctx *ExecContext, handleID string) (DriverHandle, error doneCh: make(chan struct{}), waitCh: make(chan *dstructs.WaitResult, 1), } - if h.executor.SyncServices(consulContext(d.config, "")); err != nil { + if err := h.executor.SyncServices(consulContext(d.config, "")); err != nil { h.logger.Printf("[ERR] driver.rkt: error registering services: %v", err) } go h.run()