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

coprocess logs missing from container output #294

Closed
sourcec0de opened this issue Mar 9, 2017 · 10 comments
Closed

coprocess logs missing from container output #294

sourcec0de opened this issue Mar 9, 2017 · 10 comments

Comments

@sourcec0de
Copy link

Hey guys, awesome work on container pilot. This is way easier than stuffing supervisor into a container.

I've got an issue where the coprocesses output is not being captured.

Here's my container pilot installation script.

ENV CONTAINERPILOT_VERSION 2.7.0
ENV CONTAINERPILOT file:///etc/containerpilot.json
RUN export CP_SHA1=687f7d83e031be7f497ffa94b234251270aee75b \
    && curl -Lso /tmp/containerpilot.tar.gz \
         "https://github.com/joyent/containerpilot/releases/download/${CONTAINERPILOT_VERSION}/containerpilot-${CONTAINERPILOT_VERSION}.tar.gz" \
    && echo "${CP_SHA1}  /tmp/containerpilot.tar.gz" | sha1sum -c \
    && tar zxf /tmp/containerpilot.tar.gz -C /bin \
    && rm /tmp/containerpilot.tar.gz

Here's my containerpilot.json

{
  "consul": "consul:8500",
  "preStart": "/etc/lifecycle/preStart",
  "coprocesses": [
    {
      "name": "sync-nginx",
      "command": ["python3", "sync-nginx.py"],
      "restarts": "unlimited"
    }
  ]
}

I can see the process is running but the output is missing from the logs.
The process isn't crashing and it's working as expected. Any ideas?

Thanks again.

@tgross
Copy link
Contributor

tgross commented Mar 9, 2017

Are you getting any log output from the container? For example, are you seeing the output of your preStart and/or the main process?

In any event, can you run with debug logging and drop the output here? Add the following section to your config:

  "logging": {
    "level": "DEBUG",
    "format": "default",
    "output": "stdout"
  }

@sourcec0de
Copy link
Author

@tgross it looks like the output was just really delayed.

I just opened my laptop again and the output was there. Odd.

@tgross
Copy link
Contributor

tgross commented Mar 9, 2017

That's strange. Can you tell me a bit about where you're deploying this? Is this all in Docker on your laptop or something like Triton?

@sourcec0de
Copy link
Author

@tgross

Locally: Docker for mac via docker-compose
Production: I'm on Google Container Engine (GKE) kubernetes.

@tgross
Copy link
Contributor

tgross commented Mar 10, 2017

And you saw this behavior in both environments?

@tgross
Copy link
Contributor

tgross commented Mar 13, 2017

Possibly related: #295

@sourcec0de
Copy link
Author

@tgross I did see this issue on both environments.

I'll continue my comments on #295

@tgross
Copy link
Contributor

tgross commented Mar 21, 2017

Added a comment here for this: #295 (comment)

@tgross
Copy link
Contributor

tgross commented Mar 24, 2017

Released in https://github.com/joyent/containerpilot/releases/tag/2.7.1. I'm going to mark this as fixed and close this issue, but feel free to reopen if it looks like we missed something.

@tgross tgross closed this as completed Mar 24, 2017
@sourcec0de
Copy link
Author

@tgross it's resolved.

Thanks for the awesome work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants