agent: tasks being rejected too early

Open
#1,542 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
48/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
go

Research direction

Start in daemon/cluster/executor/container/container.go around line 46, then compare the equivalent swarmkit package. Trace where container configuration is validated during controller resolution and how the prepare stage handles the task; done means invalid container configuration is rejected during preparation rather than reported as a controller-resolution failure.

Written by the indexing model from the issue text.

Description

There are cases where we are seeing error messages as follows:

Sep 13 10:09:47 docker-p-02 dockerd[754]: time="2016-09-13T10:09:47.916070937Z" level=error msg="controller resolution failed" module=agent task.id=8imf1rsmtw1revwems0qe8klz
Sep 13 10:09:47 docker-p-02 dockerd[754]: time="2016-09-13T10:09:47.916083220Z" level=error msg="failed to start taskManager" error="invalid bind mount source, source path not found: /srv/cloudsql" module=agent

These tasks end up in the rejected state, as they should but the failure is due to an invalid container configuration, rather than a controller resolution.

The problem lies in https://github.com/docker/docker/blob/master/daemon/cluster/executor/container/container.go#L46 (also the equivalent swarmkit package). The validation of the container configuration should happen in the prepare stage, rather than when resolving the controller.

cc @aaronlehmann

Dominant language
Go
Stars
3.7k
Forks
676
Avg merge
4d 9h
Merged PRs (30d)
6

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from moby/swarmkit

All issues in moby/swarmkit

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.