Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adopt Docker's own container restarts #816

Closed
thockin opened this issue Aug 7, 2014 · 6 comments
Closed

Adopt Docker's own container restarts #816

thockin opened this issue Aug 7, 2014 · 6 comments
Labels
area/docker priority/awaiting-more-evidence Lowest priority. Possibly useful, but not yet enough support to actually get it done. sig/node Categorizes an issue or PR as relevant to SIG Node.

Comments

@thockin
Copy link
Member

thockin commented Aug 7, 2014

moby/moby#7414

As I understand, when the docker daemon dies, this only restarts containers with a policy of always which means we still have to handle the on failure case ourselves.

@crosbymichael
Copy link

I updated the PR to handle the policy of on-failure so you don't have to worry about doing that yourself ;)

Thanks!

@bgrant0607 bgrant0607 added the priority/awaiting-more-evidence Lowest priority. Possibly useful, but not yet enough support to actually get it done. label Dec 3, 2014
@bgrant0607 bgrant0607 added the sig/node Categorizes an issue or PR as relevant to SIG Node. label Feb 28, 2015
@mikebrow
Copy link
Member

mikebrow commented Apr 1, 2016

@thockin was there anything else you wanted to cover with this issue?

@thockin
Copy link
Member Author

thockin commented Apr 2, 2016

I think this is a question for @kubernetes/sig-node and the relevant devs to discuss.

Could/should restarting be delegated to the container runtimes (because it is plural now) or do we need a hook to do stuff when containers need restart? I feel like we need to own it, at least for some cases - e.g. a restart of the infra container necessitates a full pod restart, and Docker just can't know that (AFAIK anyway). So even if we assert that restarts are delegated to container runtimes, we still can't use Docker's restarts because Docker is ignorant of pods (or generically restart dependencies).

@dchen1107 @yujuhong I propose this be closed. If you concur, please put a bullet in it and close.

@yujuhong
Copy link
Contributor

yujuhong commented Apr 3, 2016

There are a couple of issues that we need to deal with before we can (if we choose to) completely delegate the container restarts to either the container runtimes or other daemons (e.g., systemd):

  1. The ability to execute k8s-defined lifecycle hooks, as @thockin mentioned
  2. The infra container restarts, which may be handled through proper hooks(?). We may not always need the infra containers in the future though.
  3. In-place container restarts vs creating a new container. We use the latter but both docker and systemd (at least the way rkt uses it now) supports the former. If we ever want to switch to in-place restarts, we'll need to eliminate the need of having the exited container around for logs and various status examination.
  4. Other advanced restart mechanisms such as backoffs, etc.

I think we will want to explore the possibility of delegating this responsibility to something else while or after converging to a new runtime interface. However, I don't see we directly using docker restart policy due to the required features stated above. I'm okay with closing this one and will open a issue if we want to discuss the issues for all container runtimes.

@thockin
Copy link
Member Author

thockin commented Apr 4, 2016

To be clear, when I said:

if we assert that restarts are delegated to container runtimes, we still
can't use Docker's restarts because
Docker is ignorant of pods

I meant that restarts could be delegated to the kubelet runtime
abstraction, wherein we wrap Docker's API and do things like the infra
container that don't apply to non-docker runtimes. I still think we can't
use Docker's own restarts. Agree we should probably close this.

On Sun, Apr 3, 2016 at 11:45 AM, Yu-Ju Hong notifications@github.com
wrote:

There are a couple of issues that we need to deal with before we can (if
we choose to) completely delegate the container restarts to either the
container runtimes or other daemons (e.g., systemd):

  1. The ability to execute k8s-defined lifecycle hooks, as @thockin
    https://github.com/thockin mentioned
  2. The infra container restarts, which may be handled through proper
    hooks(?). We may not always need the infra containers in the future though.
  3. In-place container restarts vs creating a new container. We use the
    latter and but both docker and systemd (at least the way rkt uses it now)
    supports the former. If we ever want to switch to in-place restarts, we'll
    need to eliminate the need of having the exited container around for logs
    and various status examination.
  4. Other advanced restart mechanisms such as backoffs, etc.

I think we will want to explore the possibility of delegating this
responsibility to something else while or after converging to a new
runtime interface. However, I don't see we directly using docker restart
policy due to the required features stated above. I'm okay with closing
this one and will open a issue if we want to discuss the issues for all
container runtimes.


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#816 (comment)

@yujuhong
Copy link
Contributor

yujuhong commented Apr 4, 2016

Closing based on the discussion above.

@yujuhong yujuhong closed this as completed Apr 4, 2016
vishh pushed a commit to vishh/kubernetes that referenced this issue Apr 6, 2016
Include custom metrics in ContainerStats structure
seans3 pushed a commit to seans3/kubernetes that referenced this issue Apr 10, 2019
b3atlesfan pushed a commit to b3atlesfan/kubernetes that referenced this issue Feb 5, 2021
linxiulei pushed a commit to linxiulei/kubernetes that referenced this issue Jan 18, 2024
Remove dependency on code.cloudfoundry.org/clock
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/docker priority/awaiting-more-evidence Lowest priority. Possibly useful, but not yet enough support to actually get it done. sig/node Categorizes an issue or PR as relevant to SIG Node.
Projects
None yet
Development

No branches or pull requests

6 participants