Skip to content

Concourse (garden) doesn't recognise death of init process it spawned in the container #212

Closed

Description

@redbaron

Simple example would be to kill initd process spawned for one of resource check steps.

If you do so, you'd get following error on resource UI page:

checking failed
resource script '/opt/resource/check []' failed: exit status 255

stderr:
start process: container_daemon: connect to socket: unix_socket: connect to server socket: dial unix /var/vcap/data/garden/depot/6g533psdahc/run/wshd.sock: connection refused

which doesn't go away even if you reboot worker

Activity

  1. concourse-bot commented on Nov 25, 2015

    @concourse-bot

    Hi there!

    We use Pivotal Tracker to provide visibility into what our team is working on. A story for this issue has been automatically created.

    The current status is as follows:

    • #108977146 Concourse (garden) doesn't recognise death of init process it spawned in the container

    This comment, as well as the labels on the issue, will be automatically updated as the status in Tracker changes.

  2. xoebus commented on Dec 3, 2015

    @xoebus
    Contributor

    @goonzoid @julz This sounds like it belongs to Garden. What do you think?

  3. goonzoid commented on Dec 7, 2015

    @goonzoid

    @xoebus yes, but I don't know what we'd be able to do about it. If you kill initd, the container is dead. The workaround is to not kill initd :trollface:.
    If you've spawned a container with a root user then you're implicitly allowing that user to kill the container. If you kill the container you will not then be able to run future processes in it.

    The comment about the error not going away when the worker is rebooted sounds like it's related to snapshot/restore. To restart a worker and have all containers recreated the worker needs to be recreated (rather than just restarted).

  4. vito commented on Dec 10, 2015

    @vito
    Contributor

    @goonzoid Yeah, I guess it's just a question of whether Garden should realize one of its containers is unrecoverable and have it go away from the API. I could see the argument for not having it do it; in CF your health checks would start failing anyway and the container would probably be destroyed. Having the API be the only way for containers to disappear (either grace time or .Destroy) sounds like the least presumptuous thing to do, which is already the case.

    In this case Concourse just keeps trying to run the process, not realizing the container is hopeless.

    Perhaps some way to indicate to the caller that the container is unrecoverable would help? Which arguably we'd get for free if we got richer errors back from Garden; we'd handle the known errors (i.e. command not found, network blip) and treat anything else as fatal.

  5. goonzoid commented on Dec 11, 2015

    @goonzoid

    Agreed, richer errors are certainly something I'd like Garden to provide.

    I've put #109944908 in Tracker as a placeholder to think about some kind of "container unrecoverable" error type that we can return from Container.Run (and possibly other calls).

  6. vito commented on Jan 9, 2016

    @vito
    Contributor

    Gonna close this out since it's been delegated to the proper team (there's nothing for us to really do on the Concourse side of things).

  7. ernado commented on May 1, 2016

    @ernado

    This error occurs when restarting worker with systemd. Cleaning worker folder and rebooting hosts works, but it is annoying. Any updates on this?

  8. added a commit that references this issue on Aug 4, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions