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

Init script fails when running on Kubernetes #152

Closed
sauldhernandez opened this issue Jan 19, 2017 · 3 comments
Closed

Init script fails when running on Kubernetes #152

sauldhernandez opened this issue Jan 19, 2017 · 3 comments
Labels
kind/feature-request Issue requesting a new feature

Comments

@sauldhernandez
Copy link

sauldhernandez commented Jan 19, 2017

When using latest version, startup fails with the following error:

2017-01-19T20:39:48.090681185Z Error: can't get my container ID !

I noticed that the error is generated by the startup script, since it cannot find docker on /proc/self/cgroup. Kubernetes mounts all cgroups on the root. So instead of what you would get starting a container with docker itself:

10:net_cls:/docker/25ffc6544832215a020964755b584753464bdafa49357b0552a9c51673ee8508
9:freezer:/docker/25ffc6544832215a020964755b584753464bdafa49357b0552a9c51673ee8508
8:memory:/docker/25ffc6544832215a020964755b584753464bdafa49357b0552a9c51673ee8508
7:cpuset:/docker/25ffc6544832215a020964755b584753464bdafa49357b0552a9c51673ee8508
6:perf_event:/docker/25ffc6544832215a020964755b584753464bdafa49357b0552a9c51673ee8508
5:cpu,cpuacct:/docker/25ffc6544832215a020964755b584753464bdafa49357b0552a9c51673ee8508
4:blkio:/docker/25ffc6544832215a020964755b584753464bdafa49357b0552a9c51673ee8508
3:devices:/docker/25ffc6544832215a020964755b584753464bdafa49357b0552a9c51673ee8508
2:pids:/docker/25ffc6544832215a020964755b584753464bdafa49357b0552a9c51673ee8508
1:name=systemd:/docker/25ffc6544832215a020964755b584753464bdafa49357b0552a9c51673ee8508

You get this in Kubernetes:

10:net_cls:/53c173f34a43de2ee8197f5efe5aca38747389db6f2c7c2d1d2cb2a93102ee31
9:freezer:/53c173f34a43de2ee8197f5efe5aca38747389db6f2c7c2d1d2cb2a93102ee31
8:memory:/53c173f34a43de2ee8197f5efe5aca38747389db6f2c7c2d1d2cb2a93102ee31
7:cpuset:/53c173f34a43de2ee8197f5efe5aca38747389db6f2c7c2d1d2cb2a93102ee31
6:perf_event:/53c173f34a43de2ee8197f5efe5aca38747389db6f2c7c2d1d2cb2a93102ee31
5:cpu,cpuacct:/53c173f34a43de2ee8197f5efe5aca38747389db6f2c7c2d1d2cb2a93102ee31
4:blkio:/53c173f34a43de2ee8197f5efe5aca38747389db6f2c7c2d1d2cb2a93102ee31
3:devices:/53c173f34a43de2ee8197f5efe5aca38747389db6f2c7c2d1d2cb2a93102ee31
2:pids:/53c173f34a43de2ee8197f5efe5aca38747389db6f2c7c2d1d2cb2a93102ee31
1:name=systemd:/53c173f34a43de2ee8197f5efe5aca38747389db6f2c7c2d1d2cb2a93102ee31

Changing the lookup pattern so it looks for the container ID after the last / should probably fix the problem.

@JrCs JrCs added the kind/feature-request Issue requesting a new feature label Jan 20, 2017
@JrCs
Copy link
Collaborator

JrCs commented Feb 15, 2017

For kubernetes it's better to use traefik

@myoung34
Copy link
Contributor

#300 can help to resolve this if people still wish to use this container on k8s/ecs/etc

@buchdag
Copy link
Member

buchdag commented Mar 12, 2019

This should no longer be relevant after #491 #499 and #516

@buchdag buchdag closed this as completed Mar 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature-request Issue requesting a new feature
Projects
None yet
Development

No branches or pull requests

4 participants