Skip to content

Conversation

@mihao
Copy link
Contributor

@mihao mihao commented Jul 9, 2019

Because of the BindTo directive, Docker is permanently stopped by systemd when containerd is temporarily killed and restarted. docker/for-linux#678

@thaJeztah thaJeztah changed the title Fix for bug #678: Do not "Bind" docker "To" containerd. [master] Fix for bug #678: Do not "Bind" docker "To" containerd. Jul 23, 2020
@thaJeztah
Copy link
Member

From the systemd documentation https://www.freedesktop.org/software/systemd/man/systemd.unit.html#BindsTo=

BindsTo=

Configures requirement dependencies, very similar in style to Requires=. However,
this dependency type is stronger: in addition to the effect of Requires= it
declares that if the unit bound to is stopped, this unit will be stopped too.
This means a unit bound to another unit that suddenly enters inactive state will
be stopped too. Units can suddenly, unexpectedly enter inactive state for different
reasons: the main process of a service unit might terminate on its own choice,
the backing device of a device unit might be unplugged or the mount point of
a mount unit might be unmounted without involvement of the system and service manager.

When used in conjunction with After= on the same unit the behaviour of BindsTo=
is even stronger. In this case, the unit bound to strictly has to be in active
state for this unit to also be in active state. This not only means a unit bound
to another unit that suddenly enters inactive state, but also one that is bound
to another unit that gets skipped due to a failed condition check (such as
ConditionPathExists=, ConditionPathIsSymbolicLink=, … — see below) will be
stopped, should it be running. Hence, in many cases it is best to combine BindsTo=
with After=.

When BindsTo=b.service is used on a.service, this dependency will show as
BoundBy=a.service in property listing of b.service. BoundBy= dependency
cannot be specified directly.

@thaJeztah
Copy link
Member

I see that the commit does not have a DCO sign-off (the DCO check was not running when this PR was opened)

@mihao could you rebase this PR, and amend the commit message to have a Signed-off-by line? https://github.com/moby/moby/blob/master/CONTRIBUTING.md#sign-your-work

thaJeztah added a commit that referenced this pull request Nov 5, 2020
Do not "Bind" docker "To" containerd (carry #365)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants