This project is mirrored from https://gitee.com/mirrors/nomad.git. Pull mirroring failed .
Repository mirroring has been paused due to too many failed attempts. It can be resumed by a project maintainer.
  1. 01 Sep, 2022 1 commit
  2. 11 Oct, 2021 1 commit
    • Ben Buzbee's avatar
      Log error if there are no event handlers registered · 337c5d76
      Ben Buzbee authored
      We see this error all the time
      ```
      no handler registered for event
      event.Message=, event.Annotations=, event.Timestamp=0001-01-01T00:00:00Z, event.TaskName=, event.AllocID=, event.TaskID=,
      ```
      
      So we're handling an even with all default fields. I noted that this can
      happen if only err is set as in
      
      ```
      func (d *driverPluginClient) handleTaskEvents(reqCtx context.Context, ch chan *TaskEvent, stream proto.Driver_TaskEventsClient) {
      	defer close(ch)
      	for {
      		ev, err := stream.Recv()
      		if err != nil {
      			if err != io.EOF {
      				ch <- &TaskEvent{
      					Err: grpcutils.HandleReqCtxGrpcErr(err, reqCtx, d.doneCtx),
      				}
      			}
      ```
      
      In this case Err fails to be serialized by the logger, see this test
      
      ```
      
      	ev := &drivers.TaskEvent{
      		Err: fmt.Errorf("errz"),
      	}
      	i.logger.Warn("ben test", "event", ev)
      	i.logger.Warn("ben test2", "event err str", ev.Err.Error())
      	i.logger.Warn("ben test3", "event err", ev.Err)
      	ev.Err = nil
      	i.logger.Warn("ben test4", "nil error", ev....
      337c5d76
  3. 26 May, 2020 1 commit
    • Mahmood Ali's avatar
      cleanup driver eventor goroutines · d6c75e30
      Mahmood Ali authored
      This fixes few cases where driver eventor goroutines are leaked during
      normal operations, but especially so in tests.
      
      This change makes few modifications:
      
      First, it switches drivers to use `Context`s to manage shutdown events.
      Previously, it relied on callers invoking `.Shutdown()` function that is
      specific to internal drivers only and require casting.  Using `Contexts`
      provide a consistent idiomatic way to manage lifecycle for both internal
      and external drivers.
      
      Also, I discovered few places where we don't clean up a temporary driver
      instance in the plugin catalog code, where we dispense a driver to
      inspect and validate the schema config without properly cleaning it up.
      d6c75e30
  4. 15 Feb, 2020 1 commit
  5. 21 Oct, 2019 1 commit
    • Mahmood Ali's avatar
      client: don't retry fingerprinting on shutdown · 0cfea7d9
      Mahmood Ali authored
      At shutdown, driver manager context expires and the fingerprinting
      channel closes.  Thus it is undeterministic which clause of The select
      statement gets executed, and we may keep retrying until the
      `i.ctx.Done()` block is executed.
      
      Here, we check always check ctx expiration before retrying again.
      0cfea7d9
  6. 21 Feb, 2019 1 commit
  7. 23 Jan, 2019 1 commit
  8. 22 Jan, 2019 2 commits
  9. 08 Jan, 2019 1 commit
  10. 07 Jan, 2019 2 commits
  11. 19 Dec, 2018 4 commits