[ 
https://issues.apache.org/jira/browse/MESOS-8465?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Benjamin Bannier updated MESOS-8465:
------------------------------------
    Description: 
The implementation of {{DockerContainerizerProcess::usage}} checks on the 
top-level whether the container is in {{DESTROYING}} state and returns a 
failure in that case. It then possibly triggers compuation of the container 
pid, and {{defers}} calculating the usage on that pid. The defered calculation 
only makes sure that the container is not already destroyed.

If a user first requests the usage and then triggers container destruction, 
{{usage}} could find the container not in {{DESTROYING}} state and would then 
{{defer}} the usage computation. If the {{destroy}} is processed it would 
trigger the actual killing of the container and mark the container as 
{{DESTROYING}}. If the container is not fully destroyed the deferred usage 
calculation could then pick up results not corresponding to the container 
anymore.

  was:
The implementation of {{DockerContainerizerProcess::usage}} checks on the 
top-level whether the container is in {{DESTROYING}} state and returns a 
failure in that case. It then possibly triggers compuation of the container 
pid, and {{defers}} calculating the usage on that pid. The defered calculation 
only makes sure that the container is not already destroyed.

If a user triggers first requests the usage and then triggers container 
destruction, {{usage}} could find the container not in {{DESTROYING}} state and 
would then {{defer}} the usage computation. If the {{destroy}} is processed not 
it would trigger the actual killing of the container and mark the container as 
{{DESTROYING}}. If the container is not destroyed the deferred usage 
calculation could then pick up results not corresponding to the container 
anymore.


> Resource usage calculation in docker containerizer can race with container 
> destruction
> --------------------------------------------------------------------------------------
>
>                 Key: MESOS-8465
>                 URL: https://issues.apache.org/jira/browse/MESOS-8465
>             Project: Mesos
>          Issue Type: Bug
>          Components: containerization, docker
>    Affects Versions: 1.5.0
>            Reporter: Benjamin Bannier
>            Priority: Major
>
> The implementation of {{DockerContainerizerProcess::usage}} checks on the 
> top-level whether the container is in {{DESTROYING}} state and returns a 
> failure in that case. It then possibly triggers compuation of the container 
> pid, and {{defers}} calculating the usage on that pid. The defered 
> calculation only makes sure that the container is not already destroyed.
> If a user first requests the usage and then triggers container destruction, 
> {{usage}} could find the container not in {{DESTROYING}} state and would then 
> {{defer}} the usage computation. If the {{destroy}} is processed it would 
> trigger the actual killing of the container and mark the container as 
> {{DESTROYING}}. If the container is not fully destroyed the deferred usage 
> calculation could then pick up results not corresponding to the container 
> anymore.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to