[jira] [Commented] (MESOS-8576) Improve discard handling of 'Docker::inspect()'
[ https://issues.apache.org/jira/browse/MESOS-8576?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16384340#comment-16384340 ] Gilbert Song commented on MESOS-8576: - {noformat} commit 8346ab0c812559ef73e1bbd30718f6c74a023079 Author: Greg MannDate: Fri Mar 2 15:39:58 2018 -0800 Avoided orphan subprocess in the Docker library. This patch ensures that `Docker::inspect` will not leave orphan subprocesses behind. Review: https://reviews.apache.org/r/65887/ {noformat} > Improve discard handling of 'Docker::inspect()' > --- > > Key: MESOS-8576 > URL: https://issues.apache.org/jira/browse/MESOS-8576 > Project: Mesos > Issue Type: Improvement > Components: containerization, docker >Affects Versions: 1.5.0 >Reporter: Greg Mann >Assignee: Greg Mann >Priority: Major > Labels: mesosphere > Fix For: 1.6.0 > > > In the call path of {{Docker::inspect()}}, each continuation currently checks > if {{promise->future().hasDiscard()}}, where the {{promise}} is associated > with the output of the {{docker inspect}} call. However, if the call to > {{docker inspect}} becomes hung indefinitely, then continuations are never > invoked, and a subsequent discard of the returned {{Future}} will have no > effect. We should add proper {{onDiscard}} handling to that {{Future}} so > that appropriate cleanup is performed in such cases. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (MESOS-8576) Improve discard handling of 'Docker::inspect()'
[ https://issues.apache.org/jira/browse/MESOS-8576?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16379603#comment-16379603 ] Greg Mann commented on MESOS-8576: -- {code} commit a4805eff5dbef7146f34b239b834a688954991f9 Author: Greg Mann g...@mesosphere.io Date: Tue Feb 27 16:42:10 2018 -0800 Ensured that Docker containerizer returns a failed Future in one case. Because the Docker library did not immediately transition the Future returned by `inspect()` to DISCARDED, it was safe for the Docker containerizer to discard this Future before failing the Promise associated with the Future returned by `launch()`. However, the introduction of an `onDiscard` callback in `Docker::inspect()` makes this assumption invalid. This patch addresses this by failing the Promise before discarding the Future. Review: https://reviews.apache.org/r/65743/ {code} > Improve discard handling of 'Docker::inspect()' > --- > > Key: MESOS-8576 > URL: https://issues.apache.org/jira/browse/MESOS-8576 > Project: Mesos > Issue Type: Improvement > Components: containerization, docker >Affects Versions: 1.5.0 >Reporter: Greg Mann >Assignee: Greg Mann >Priority: Major > Labels: mesosphere > > In the call path of {{Docker::inspect()}}, each continuation currently checks > if {{promise->future().hasDiscard()}}, where the {{promise}} is associated > with the output of the {{docker inspect}} call. However, if the call to > {{docker inspect}} becomes hung indefinitely, then continuations are never > invoked, and a subsequent discard of the returned {{Future}} will have no > effect. We should add proper {{onDiscard}} handling to that {{Future}} so > that appropriate cleanup is performed in such cases. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (MESOS-8576) Improve discard handling of 'Docker::inspect()'
[ https://issues.apache.org/jira/browse/MESOS-8576?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16379604#comment-16379604 ] Greg Mann commented on MESOS-8576: -- Review: https://reviews.apache.org/r/65683/ > Improve discard handling of 'Docker::inspect()' > --- > > Key: MESOS-8576 > URL: https://issues.apache.org/jira/browse/MESOS-8576 > Project: Mesos > Issue Type: Improvement > Components: containerization, docker >Affects Versions: 1.5.0 >Reporter: Greg Mann >Assignee: Greg Mann >Priority: Major > Labels: mesosphere > > In the call path of {{Docker::inspect()}}, each continuation currently checks > if {{promise->future().hasDiscard()}}, where the {{promise}} is associated > with the output of the {{docker inspect}} call. However, if the call to > {{docker inspect}} becomes hung indefinitely, then continuations are never > invoked, and a subsequent discard of the returned {{Future}} will have no > effect. We should add proper {{onDiscard}} handling to that {{Future}} so > that appropriate cleanup is performed in such cases. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (MESOS-8576) Improve discard handling of 'Docker::inspect()'
[ https://issues.apache.org/jira/browse/MESOS-8576?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16375252#comment-16375252 ] Greg Mann commented on MESOS-8576: -- Still working on this one. The problem is that {{Docker::inspect()}} has retry logic embedded within the library function, since we often call it before a container has started running in order to detect that the container is up. So, to avoid repeatedly registering {{onDiscard}} callbacks with every retry (which would constitute a memory leak), we need to pass the "context" of the current {{docker inspect}} call through the async call chain, and also make it accessible to the {{onDiscard}} callback which we install onto the returned future. Since the Docker library is not currently a libprocess actor, this is a bit difficult. WIP patch here: https://reviews.apache.org/r/65683/ > Improve discard handling of 'Docker::inspect()' > --- > > Key: MESOS-8576 > URL: https://issues.apache.org/jira/browse/MESOS-8576 > Project: Mesos > Issue Type: Improvement > Components: containerization, docker >Affects Versions: 1.5.0 >Reporter: Greg Mann >Assignee: Greg Mann >Priority: Major > Labels: mesosphere > > In the call path of {{Docker::inspect()}}, each continuation currently checks > if {{promise->future().hasDiscard()}}, where the {{promise}} is associated > with the output of the {{docker inspect}} call. However, if the call to > {{docker inspect}} becomes hung indefinitely, then continuations are never > invoked, and a subsequent discard of the returned {{Future}} will have no > effect. We should add proper {{onDiscard}} handling to that {{Future}} so > that appropriate cleanup is performed in such cases. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (MESOS-8576) Improve discard handling of 'Docker::inspect()'
[ https://issues.apache.org/jira/browse/MESOS-8576?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16367916#comment-16367916 ] Greg Mann commented on MESOS-8576: -- Closing in favor of MESOS-8575. > Improve discard handling of 'Docker::inspect()' > --- > > Key: MESOS-8576 > URL: https://issues.apache.org/jira/browse/MESOS-8576 > Project: Mesos > Issue Type: Improvement > Components: containerization, docker >Affects Versions: 1.5.0 >Reporter: Greg Mann >Assignee: Greg Mann >Priority: Major > Labels: mesosphere > > In the call path of {{Docker::inspect()}}, each continuation currently checks > if {{promise->future().hasDiscard()}}, where the {{promise}} is associated > with the output of the {{docker inspect}} call. However, if the call to > {{docker inspect}} becomes hung indefinitely, then continuations are never > invoked, and a subsequent discard of the returned {{Future}} will have no > effect. We should add proper {{onDiscard}} handling to that {{Future}} so > that appropriate cleanup is performed in such cases. -- This message was sent by Atlassian JIRA (v7.6.3#76005)