raintank / raintank-docker

raintank docker images and dev stack DEPRECATED / UNMAINTAINED
https://blog.raintank.io/docker-based-development-environment/
16 stars 4 forks source link

graphite-api log directory weirdness #16

Closed Dieterbe closed 9 years ago

Dieterbe commented 9 years ago

in graphite-api/Dockerfile i see:

RUN mkdir /log
VOLUME /log
ADD start-graphite.py /usr/bin/start-graphite.py
RUN chmod a+x /usr/bin/start-graphite.py

RUN mkdir -p /var/log/raintank

so, on util1 (tinyalpha)

root@util1:~# docker inspect a6483b3b1027
(...)
    "Volumes": {
        "/log": "/var/lib/docker/vfs/dir/2e47b35c53ba924d44515048cf47f9170f8f68fb6bb90bebda67babfad0f876f"
    },
    "VolumesRW": {
        "/log": true
    }
root@util1:~# ls -alh /var/lib/docker/vfs/dir/2e47b35c53ba924d44515048cf47f9170f8f68fb6bb90bebda67babfad0f876f
total 16K
drwxr-xr-x  2 root root 4.0K Apr 28 06:11 .
drwx------ 87 root root  12K May 13 15:04 ..
root@util1:~# 

so we have a log volume but it stays empty because in the container we log to /var/log/raintank which is inaccessible to the host?

Dieterbe commented 9 years ago

since everything was broken anyway, i tried changing this in supervisor config:

stdout_logfile=/log/graphite-api.log

and then

supervisorctl restart all ; tail -100f /log/graphite-api.log
[ root@a6483b3b1027:~ ]$ touch /log/graphite-api.log
[ root@a6483b3b1027:~ ]$ chmod 777 /log/graphite-api.log
[ root@a6483b3b1027:~ ]$ supervisorctl restart all

but the file would never populate for some reason, so i just reverted my changes