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

Metric nomad.client.allocs.memory.cache always 0 since Nomad 1.9.0 #24920

Open
SCORP111 opened this issue Jan 23, 2025 · 1 comment
Open

Metric nomad.client.allocs.memory.cache always 0 since Nomad 1.9.0 #24920

SCORP111 opened this issue Jan 23, 2025 · 1 comment
Labels
stage/accepted Confirmed, and intend to work on. No timeline committment though. theme/driver/docker type/bug

Comments

@SCORP111
Copy link

Follow-up to #24524

Nomad version

1.9.0 to 1.9.5

Operating system and Environment details

Ubuntu 24.04 with cgroupsv1 (testet in a VM and in WSL2)

Issue

The value of the metric nomad.client.allocs.memory.cache is always 0 since Nomad version 1.9.0

Reproduction steps

Start nomad in dev-mode with config that has telemetry enabled: sudo nomad agent -dev -config=config.hcl

config.hcl:

telemetry {
  collection_interval = "1s"
  publish_allocation_metrics = true
  publish_node_metrics       = true
  prometheus_metrics = true
}

Run job thats consuming some RAM:

job "mysql" {
  datacenters = ["dc1"]

  group "mysql" {
    network {
      port "http" {
        static = "5678"
      }
    }
    task "server" {
      driver = "docker"

      env {
        MYSQL_ROOT_PASSWORD = secret
        MYSQL_ALLOW_EMPTY_PASSWORD = true
        MYSQL_RANDOM_ROOT_PASSWORD = false
      }

      config {
        image = "mysql"
        ports = ["http"]
      }

      resources{
        memory = 1024
      }
    }
  }
}

Expected Result

nomad.client.allocs.memory.cache should output a non-zero-value like this:

curl 127.0.0.1:4646/v1/metrics | jq | grep -A1 cache

"Name": "nomad.client.allocs.memory.cache",
"Value": 5763072.0

Actual Result

Nomad version 1.9.0:

curl 127.0.0.1:4646/v1/metrics | jq | grep -A1 cache

"Name": "nomad.client.allocs.memory.cache",
"Value": 0.0

Nomad version 1.9.5:

curl 127.0.0.1:4646/v1/metrics | jq | grep -A1 cache

"Name": "nomad.client.allocs.memory.cache",
"Value": 0.0

Nomad version 1.8.0:

curl 127.0.0.1:4646/v1/metrics | jq | grep -A1 cache

"Name": "nomad.client.allocs.memory.cache",
"Value": 5844992.0

Nomad version 1.8.1:

curl 127.0.0.1:4646/v1/metrics | jq | grep -A1 cache

"Name": "nomad.client.allocs.memory.cache",
"Value": 10321920.0

Nomad version 1.8.4:

curl 127.0.0.1:4646/v1/metrics | jq | grep -A1 cache

"Name": "nomad.client.allocs.memory.cache",
"Value": 9773056.0

Thanks for your help!

@Juanadelacuesta
Copy link
Member

Hello @SCORP111 Thank you for reporting this bug, there was a big update of the docker driver done in the 1.9.x releases and unfortunately some things, like metrics, were affected by it, but we are working hard to bring everything back to normal.
I will move this to our TODOs list and hopefully it will be picked up soon.

@Juanadelacuesta Juanadelacuesta added the stage/accepted Confirmed, and intend to work on. No timeline committment though. label Jan 23, 2025
@Juanadelacuesta Juanadelacuesta moved this from Needs Triage to Needs Roadmapping in Nomad - Community Issues Triage Jan 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stage/accepted Confirmed, and intend to work on. No timeline committment though. theme/driver/docker type/bug
Projects
Status: Needs Roadmapping
Development

No branches or pull requests

2 participants