{"action":"created","issue":{"url":"https://api.github.com/repos/docker/docker/issues/10994","labels_url":"https://api.github.com/repos/docker/docker/issues/10994/labels{/name}","comments_url":"https://api.github.com/repos/docker/docker/issues/10994/comments","events_url":"https://api.github.com/repos/docker/docker/issues/10994/events","html_url":"https://github.com/docker/docker/pull/10994","id":58815360,"number":10994,"title":"Implement journalctl to see journald data within a docker container","user":{"login":"rhatdan","id":2000835,"avatar_url":"https://avatars.githubusercontent.com/u/2000835?v=3","gravatar_id":"","url":"https://api.github.com/users/rhatdan","html_url":"https://github.com/rhatdan","followers_url":"https://api.github.com/users/rhatdan/followers","following_url":"https://api.github.com/users/rhatdan/following{/other_user}","gists_url":"https://api.github.com/users/rhatdan/gists{/gist_id}","starred_url":"https://api.github.com/users/rhatdan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rhatdan/subscriptions","organizations_url":"https://api.github.com/users/rhatdan/orgs","repos_url":"https://api.github.com/users/rhatdan/repos","events_url":"https://api.github.com/users/rhatdan/events{/privacy}","received_events_url":"https://api.github.com/users/rhatdan/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/docker/docker/labels/status/1-needs-design-review","name":"status/1-needs-design-review","color":"fef2c0"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2015-02-24T22:23:48Z","updated_at":"2015-04-01T16:35:30Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/docker/docker/pulls/10994","html_url":"https://github.com/docker/docker/pull/10994","diff_url":"https://github.com/docker/docker/pull/10994.diff","patch_url":"https://github.com/docker/docker/pull/10994.patch"},"body":"The basic idea is to allow us to run systemd/journald within a container and have the journal data exposed to the host.\r\n\r\nIn order to do this, we had to implement three different things.  \r\n1. Define a container_uuid environment variable in a systemd with a UUID.  We do this using the container ID.(Patch 1)\r\n2. Create a directory on the host in /var/log/journald/CONTAINER.ID (Truncated to 32 chars), volume mount this directory into the container.\r\n3. Register the container with systemd using machinectl over systemd dbus.\r\n\r\nWith this patch you can do a \r\njournalctl -M CONTAINER_NAME\r\nAnd see the journal data within a systemd based container.\r\n\r\nThis has a secondary effect of allowing us to see and manipulate docker containers using machinectl.  This will list all running containers, even if they are docker containers or systemd-nspawn containers.  It will also list any VM's running on the machine.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/docker/docker/issues/comments/88547603","html_url":"https://github.com/docker/docker/pull/10994#issuecomment-88547603","issue_url":"https://api.github.com/repos/docker/docker/issues/10994","id":88547603,"user":{"login":"LK4D4","id":101445,"avatar_url":"https://avatars.githubusercontent.com/u/101445?v=3","gravatar_id":"","url":"https://api.github.com/users/LK4D4","html_url":"https://github.com/LK4D4","followers_url":"https://api.github.com/users/LK4D4/followers","following_url":"https://api.github.com/users/LK4D4/following{/other_user}","gists_url":"https://api.github.com/users/LK4D4/gists{/gist_id}","starred_url":"https://api.github.com/users/LK4D4/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LK4D4/subscriptions","organizations_url":"https://api.github.com/users/LK4D4/orgs","repos_url":"https://api.github.com/users/LK4D4/repos","events_url":"https://api.github.com/users/LK4D4/events{/privacy}","received_events_url":"https://api.github.com/users/LK4D4/received_events","type":"User","site_admin":false},"created_at":"2015-04-01T16:35:30Z","updated_at":"2015-04-01T16:35:30Z","body":"@rhatdan Hmm, maybe I'm doing something wrong, but I get\r\n```\r\njournalctl -M test\r\nFailed to open journal: Host is down\r\n```\r\nfrom your example. Could you recheck it pls?"}}