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

API Container State.Health must be ommited if empty for Docker compat #20029

Closed
rokiden opened this issue Sep 19, 2023 · 2 comments
Closed

API Container State.Health must be ommited if empty for Docker compat #20029

rokiden opened this issue Sep 19, 2023 · 2 comments
Labels
Good First Issue This issue would be a good issue for a first time contributor to undertake. kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.

Comments

@rokiden
Copy link

rokiden commented Sep 19, 2023

Issue Description

Podman API provide State.Health with empty values for running containers without healthcheck, when Docker ommit it. Some software rely on Docker's behaviour, for example Uptime Kuma. Issue. TcpDump attached.

Steps to reproduce the issue

Steps to reproduce the issue

  1. podman run --rm --name alpine -it alpine
  2. another pane podman inspect alpine

Describe the results you received

Healthcheck don't configured and State.Health present

Describe the results you expected

State.Health dont present

podman info output

podman version 4.6.2

Podman in a container

No

Privileged Or Rootless

None

Upstream Latest Release

No

Additional environment details

No response

Additional information

TcpDump:

GET /containers/keen_torvalds/json HTTP/1.1
Accept: /
User-Agent: Uptime-Kuma/1.23.1
Host: podmanproxy:2375
Connection: close

HTTP/1.1 200 OK
Api-Version: 1.41
Content-Type: application/json
Libpod-Api-Version: 4.6.2
Server: Libpod/4.6.2 (linux)
X-Reference-Id: 0xc000be6558
Date: Tue, 19 Sep 2023 11:41:08 GMT
Connection: close
Transfer-Encoding: chunked

{"Id":"496a2cb6e16a7822d7669be2ebbf1f32f6d09751d677a93d54b67c3020e66f72","Created":"2023-09-19T09:41:10.589808818Z","Path":"sh","Args":["-c","apk add tcpdump socat; tcpdump -w - -Unq tcp port not 9999 | socat -t0 -T0 - tcp:laptop.lan:9999"],"State":{"Status":"running","Running":true,"Paused":false,"Restarting":false,"OOMKilled":false,"Dead":false,"Pid":3089279,"ExitCode":0,"Error":"","StartedAt":"2023-09-19T09:41:10.64045291Z","FinishedAt":"0001-01-01T00:00:00Z","Health":{"Status":"","FailingStreak":0,"Log":null}},"Image":"sha256:7e01a0d0a1dcd9e539f8e9bbd80106d59efbdf97293b3d38f5d7a34501526cdb","ResolvConfPath":"/run/containers/storage/btrfs-containers/42fca70f376092b3d93fbe719df76b824c99ea689fbb8bfcab416371d17d6d18/userdata/resolv.conf","HostnamePath":"/run/containers/storage/btrfs-containers/496a2cb6e16a7822d7669be2ebbf1f32f6d09751d677a93d54b67c3020e66f72/userdata/hostname","HostsPath":"/run/containers/storage/btrfs-containers/42fca70f376092b3d93fbe719df76b824c99ea689fbb8bfcab416371d17d6d18/userdata/hosts","LogPath":"","Name":"/keen_torvalds","RestartCount":0,"Driver":"btrfs","Platform":"linux","MountLabel":"","ProcessLabel":"","AppArmorProfile":"","ExecIDs":[],"HostConfig":{"Binds":[],"ContainerIDFile":"","LogConfig":{"Type":"journald","Config":null},"NetworkMode":"container:42fca70f376092b3d93fbe719df76b824c99ea689fbb8bfcab416371d17d6d18","PortBindings":{},"RestartPolicy":{"Name":"","MaximumRetryCount":0},"AutoRemove":true,"VolumeDriver":"","VolumesFrom":null,"ConsoleSize":[0,0],"CapAdd":["NET_RAW"],"CapDrop":[],"CgroupnsMode":"","Dns":[],"DnsOptions":[],"DnsSearch":[],"ExtraHosts":[],"GroupAdd":[],"IpcMode":"shareable","Cgroup":"","Links":null,"OomScoreAdj":0,"PidMode":"private","Privileged":false,"PublishAllPorts":false,"ReadonlyRootfs":false,"SecurityOpt":[],"UTSMode":"private","UsernsMode":"","ShmSize":65536000,"Runtime":"oci","Isolation":"","CpuShares":0,"Memory":0,"NanoCpus":0,"CgroupParent":"","BlkioWeight":0,"BlkioWeightDevice":null,"BlkioDeviceReadBps":null,"BlkioDeviceWriteBps":null,"BlkioDeviceReadIOps":null,"BlkioDeviceWriteIOps":null,"CpuPeriod":0,"CpuQuota":0,"CpuRealtimePeriod":0,"CpuRealtimeRuntime":0,"CpusetCpus":"","CpusetMems":"","Devices":[],"DeviceCgroupRules":null,"DeviceRequests":null,"MemoryReservation":0,"MemorySwap":0,"MemorySwappiness":0,"OomKillDisable":false,"PidsLimit":2048,"Ulimits":[{"Name":"RLIMIT_NPROC","Hard":4194304,"Soft":4194304}],"CpuCount":0,"CpuPercent":0,"IOMaximumIOps":0,"IOMaximumBandwidth":0,"MaskedPaths":null,"ReadonlyPaths":null},"GraphDriver":{"Data":null,"Name":"btrfs"},"SizeRootFs":0,"Mounts":[],"Config":{"Hostname":"496a2cb6e16a","Domainname":"","User":"","AttachStdin":false,"AttachStdout":false,"AttachStderr":false,"ExposedPorts":{"2375/tcp":{}},"Tty":true,"OpenStdin":true,"StdinOnce":false,"Env":["PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin","TERM=xterm","container=podman","HOME=/root","HOSTNAME=496a2cb6e16a"],"Cmd":["sh","-c","apk add tcpdump socat; tcpdump -w - -Unq tcp port not 9999 | socat -t0 -T0 - tcp:gram.lan:9999"],"Image":"docker.io/library/alpine:latest","Volumes":null,"WorkingDir":"/","Entrypoint":[],"OnBuild":null,"Labels":{},"StopSignal":"15","StopTimeout":10},"NetworkSettings":{"Bridge":"","SandboxID":"","HairpinMode":false,"LinkLocalIPv6Address":"","LinkLocalIPv6PrefixLen":0,"Ports":{"2375/tcp":null},"SandboxKey":"/run/netns/netns-0ceac2ae-63a2-0a69-b779-3f25d373ed50","SecondaryIPAddresses":null,"SecondaryIPv6Addresses":null,"EndpointID":"","Gateway":"","GlobalIPv6Address":"","GlobalIPv6PrefixLen":0,"IPAddress":"","IPPrefixLen":0,"IPv6Gateway":"","MacAddress":"","Networks":{"podwg":{"IPAMConfig":null,"Links":null,"Aliases":["42fca70f3760"],"NetworkID":"podwg","EndpointID":"","Gateway":"10.89.0.1","IPAddress":"10.89.0.133","IPPrefixLen":24,"IPv6Gateway":"","GlobalIPv6Address":"","GlobalIPv6PrefixLen":0,"MacAddress":"5a:bb:0a:f9:56:a0","DriverOpts":null}}}}

@rokiden rokiden added the kind/bug Categorizes issue or PR as related to a bug. label Sep 19, 2023
@mheon mheon added the Good First Issue This issue would be a good issue for a first time contributor to undertake. label Sep 19, 2023
@jakecorrenti
Copy link
Member

/assign

@jakecorrenti jakecorrenti removed their assignment Sep 21, 2023
@jakecorrenti
Copy link
Member

This is a repeat of #18792 which is tagged for v5.0. @mheon can you close this?

Original PR for context: #18807

@rokiden rokiden closed this as not planned Won't fix, can't repro, duplicate, stale Sep 22, 2023
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Dec 22, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Good First Issue This issue would be a good issue for a first time contributor to undertake. kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.
Projects
None yet
Development

No branches or pull requests

3 participants