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

By default logs don't work #106

Open
asnaylor opened this issue Jun 5, 2024 · 2 comments
Open

By default logs don't work #106

asnaylor opened this issue Jun 5, 2024 · 2 comments

Comments

@asnaylor
Copy link

asnaylor commented Jun 5, 2024

There are no logs created when running this container (which uses the default log driver journald):

$ podman-hpc run -dt -p 8080:80/tcp docker.io/library/httpd
$ podman-hpc ps
CONTAINER ID  IMAGE                           COMMAND           CREATED        STATUS        PORTS                 NAMES
776d474331b7  docker.io/library/httpd:latest  httpd-foreground  4 seconds ago  Up 4 seconds  0.0.0.0:8080->80/tcp  sad_torvalds
$ podman-hpc logs sad_torvalds
$ podman-hpc inspect sad_torvalds | jq '.[0].HostConfig.LogConfig'
{
  "Type": "journald",
  "Config": null,
  "Path": "",
  "Tag": "",
  "Size": "0B"
}

But if you change the log-driver to json-file it works:

$ podman-hpc run -dt -p 8080:80/tcp --log-driver=json-file docker.io/library/httpd
$ podman-hpc ps
CONTAINER ID  IMAGE                           COMMAND           CREATED        STATUS        PORTS                 NAMES
69429e7b84fa  docker.io/library/httpd:latest  httpd-foreground  4 seconds ago  Up 4 seconds  0.0.0.0:8080->80/tcp  stupefied_jang
$ podman-hpc logs stupefied_jang
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 10.0.2.100. Set the 'ServerName' directive globally to suppress this message
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 10.0.2.100. Set the 'ServerName' directive globally to suppress this message
[Tue Jun 04 23:59:32.460794 2024] [mpm_event:notice] [pid 1:tid 140334221084544] AH00489: Apache/2.4.59 (Unix) configured -- resuming normal operations
[Tue Jun 04 23:59:32.462677 2024] [core:notice] [pid 1:tid 140334221084544] AH00094: Command line: 'httpd -D FOREGROUND'
$ podman-hpc inspect stupefied_jang | jq '.[0].HostConfig.LogConfig'
{
  "Type": "json-file",
  "Config": null,
  "Path": "/images/75235_hpc/storage/overlay-containers/69429e7b84fa79191d35c5e77b03b3cf0e3fce78e9aec5be2ab72cee1120f1e0/userdata/ctr.log",
  "Tag": "",
  "Size": "0B"
}

Is it possible to get it working with the default log-driver journald?

@danfulton
Copy link
Member

What happens when you explicitly set --log-driver=journald ?

@asnaylor
Copy link
Author

asnaylor commented Jun 5, 2024

Still no logs

$ podman-hpc run -dt -p 8080:80/tcp --log-driver=journald docker.io/library/httpd
$ podman-hpc ps
CONTAINER ID  IMAGE                           COMMAND           CREATED        STATUS        PORTS                 NAMES
86c835c19850  docker.io/library/httpd:latest  httpd-foreground  4 seconds ago  Up 4 seconds  0.0.0.0:8080->80/tcp  lucid_shaw
$ podman-hpc logs 86c835c19850
$ podman-hpc inspect 86c835c19850 | jq '.[0].HostConfig.LogConfig'
{
  "Type": "journald",
  "Config": null,
  "Path": "",
  "Tag": "",
  "Size": "0B"
}

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

No branches or pull requests

2 participants