tiny: Catch error returned from SyncServices in rkt driver

This commit is contained in:
Kenjiro Nakayama
2016-08-14 13:11:17 +09:00
parent fa73b6ac37
commit 6b28024bef

View File

@@ -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()