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

Podman container Pending without healthcheck #3767

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

Podman container Pending without healthcheck #3767

rokiden opened this issue Sep 19, 2023 · 4 comments
Labels
area:monitor Everything related to monitors blocked-upstream upstream (i.e. a dependency we depend on will have to do this work) help Stale

Comments

@rokiden
Copy link

rokiden commented Sep 19, 2023

⚠️ Please verify that this bug has NOT been raised before.

  • I checked and didn't find similar issue

🛡️ Security Policy

Description

Podman API provide State.Health with empty values for containers without healthcheck, which detected as PENDING by Kuma.

Podman container with healthcheck defined:

....
   "State":{
      "Status":"running",
      "Running":true,
      "Paused":false,
      "Restarting":false,
      "OOMKilled":false,
      "Dead":false,
      "Pid":165204,
      "ExitCode":0,
      "Error":"",
      "StartedAt":"2023-09-13T12:01:30.947248168Z",
      "FinishedAt":"0001-01-01T00:00:00Z",
      "Health":{
         "Status":"healthy",
         "FailingStreak":0,
         "Log":[ SKIPPED ]
      }
   },
....

Podman container without healthcheck defined:

....
   "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
      }
   },
....

👟 Reproduction steps

  • run container without healthcheck in podman
  • configure kuma to monitor it

👀 Expected behavior

Kuma detect container as UP

😓 Actual Behavior

Kuma detect container as PENDING

🐻 Uptime-Kuma Version

Uptime Kuma Version: 1.23.1

💻 Operating System and Arch

Fedora 37 amd64

🌐 Browser

Firefox

🐋 Docker Version

podman version 4.6.2

🟩 NodeJS Version

No response

📝 Relevant log output

Kuma log:

2023-09-19T17:42:08+06:00 [MONITOR] WARN: Monitor #25 'TEST': Pending:  | Max retries: 1 | Retry: 0 | Retry Interval: 60 seconds | Type: docker

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 bug Something isn't working label Sep 19, 2023
@louislam
Copy link
Owner

louislam commented Sep 19, 2023

Changed to help as the feature was written for Docker only.

Feel free to create a pull request or create a feature-reuqest if you want this.

@MathieuMoalic
Copy link

For those that don't want to wait for podman support, this image from 3 months ago works as intended for podman:
docker.io/louislam/uptime-kuma:1.22.1-alpine

@CommanderStorm CommanderStorm added blocked-upstream upstream (i.e. a dependency we depend on will have to do this work) area:monitor Everything related to monitors labels Dec 21, 2023
nougad added a commit to nougad/uptime-kuma that referenced this issue Jan 14, 2024
Podman will include the Health dict even if no health check is defined
for the container (see
containers/podman#20029).

This makes the check in uptime-kuma stuck in Pending

Fixes louislam#3767
nougad added a commit to nougad/uptime-kuma that referenced this issue Jan 14, 2024
Podman will include the Health dict even if no health check is defined
for the container (see
containers/podman#20029).

This makes the check in uptime-kuma stuck in Pending

Fixes louislam#3767
vfosnar added a commit to vfosnar/uptime-kuma that referenced this issue Jan 15, 2024
louislam pushed a commit to vfosnar/uptime-kuma that referenced this issue Jan 19, 2024
Copy link

We are clearing up our old help-issues and your issue has been open for 60 days with no activity.
If no comment is made and the stale label is not removed, this issue will be closed in 7 days.

@github-actions github-actions bot added the Stale label Feb 19, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Feb 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:monitor Everything related to monitors blocked-upstream upstream (i.e. a dependency we depend on will have to do this work) help Stale
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants