mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kevin Klues <klue...@gmail.com>
Subject Re: Review Request 55810: Fixed bug allowing IOSwitchboard::connect() after container destruction.
Date Wed, 25 Jan 2017 19:13:21 GMT


> On Jan. 24, 2017, 11:04 p.m., Jie Yu wrote:
> > src/slave/containerizer/mesos/io/switchboard.cpp, lines 761-762
> > <https://reviews.apache.org/r/55810/diff/1/?file=1611305#file1611305line761>
> >
> >     Hum, then, it's possible that we install two timers and sending sigterm twice?
> 
> Vinod Kone wrote:
>     yes, and i think that's safe?

Yeah, Vinod and I talked about this because I raised the same issue with him when we were
discussing the change in person. One way to avoid this would be to introduce a `state` field
to our info struct and transition it into the `DESTROYING` state once cleanup has been called
the first time, but not fully remove it from the infos list. We could then change the check
above to:

```
if (!infos.contains(containerId) || infos[containerId].state == DESTROYING) {
  return Nothing();
}
```

In the end, we decided not to make this change for now because it should be safe to start
the timer multiple times (and even run the body of the lambda multiple times) without breaking
anything. We would just be doing extra, unnecessary work.


- Kevin


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/55810/#review162684
-----------------------------------------------------------


On Jan. 24, 2017, 10:45 p.m., Kevin Klues wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/55810/
> -----------------------------------------------------------
> 
> (Updated Jan. 24, 2017, 10:45 p.m.)
> 
> 
> Review request for mesos, Anand Mazumdar, Benjamin Bannier, Greg Mann, Jie Yu, and Vinod
Kone.
> 
> 
> Bugs: MESOS-6948
>     https://issues.apache.org/jira/browse/MESOS-6948
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Fixed bug allowing IOSwitchboard::connect() after container destruction.
> 
> 
> Diffs
> -----
> 
>   src/slave/containerizer/mesos/io/switchboard.cpp 4b134f8420e1ef5cd139e0e4b8b08b1ff32e3a30

> 
> Diff: https://reviews.apache.org/r/55810/diff/
> 
> 
> Testing
> -------
> 
> GTEST_FILTER="ContentType/AgentAPITest.LaunchNestedContainerSession/1" src/mesos-tests
--gtest_repeat=-1 --gtest_break_on_failure
> 
> 
> Thanks,
> 
> Kevin Klues
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message