collectorDataSource: Assets never populate, so includeIdle queries hang and the bundled UI reads $0
What happened
With collectorDataSource enabled and no Prometheus, the Allocation API works correctly but the Assets pipeline never populates, which makes every idle-inclusive query hang indefinitely. Because the bundled UI's Home dashboard defaults includeIdle=true, the UI is unusable out of the box: it times out against its own nginx proxy and renders $0.00 cluster cost, 0.0% efficiency, and "No allocation data available."
Node pricing itself is fine — /metrics exposes correctly priced node series. It is only the asset records that lose the node type, and idle is then computed against $0 nodes.
Reproduction
OpenCost 1.121.1, helm chart 2.5.29, AKS, collectorDataSource.enabled=true, COLLECTOR_SCRAPE_INTERVAL=5m, no Prometheus reachable (PROMETHEUS_SERVER_ENDPOINT resolves NXDOMAIN and is never dialed — no Prometheus mentions appear in the log at all).
Measured against the exporter on :9003:
| Request | Result |
|---|---|
/allocation/compute?window=7d&aggregate=namespace&includeIdle=false&accumulate=day |
200 in 4.5s, 127 KB, correct per-namespace data |
/allocation/compute?window=7d&aggregate=namespace&includeIdle=true&accumulate=day |
never returns (aborted at 300s) |
/allocation/compute?window=24h&...&includeIdle=true&... |
never returns (aborted at 240s) |
/allocation/compute?window=1h&...&includeIdle=true&... |
never returns (aborted at 140s) |
/assets?window=7d |
{"code":200,"data":{}} — instantly empty |
/assets?window=24h |
never returns (aborted at 150s) |
The first row and the second row differ only in includeIdle.
Impact on the bundled UI
The UI's Home dashboard issues exactly one allocation query, with idle on by default:
GET /model/allocation/compute?window=7d&aggregate=namespace&includeIdle=true&accumulate=dayopencost-ui nginx has proxy_read_timeout 180, so it logs:
[error] upstream timed out (110: Operation timed out) while reading response header from upstream,
request: "GET /model/allocation/compute?window=7d&aggregate=namespace&includeIdle=true&accumulate=day"Two secondary notes on that path:
- The UI image has no
/var/www/custom_504.html, so the configured 504 page fails to open and nginx returns a 404 body for the 504. The UI renders that as "no data" rather than an error, which makes a backend timeout look like an empty cluster. report-contextalso defaultsincludeIdle: true, so the Reports view fails the same way. The only workaround is unticking "Include idle costs" in each view, which persists to browserlocalStorage(opencost-dashboards-v2,opencost-reports-v1) — per-browser, and not settable via Helm.
Exporter log
Counts are from a single 12-minute window:
122x WRN ClusterNodes: Type does not exist for node identifier
{<cluster> aks-<pool>-spot-xxxxx azure:///subscriptions/<subscription-id>/resourceGroups/<mc-rg>/providers/Microsoft.Compute/virtualMachines/aks-<pool>-spot-xxxxx}
16x WRN ClusterNodes: Type does not exist for node identifier {<cluster> aks-<pool>-spot-xxxxx } <- empty providerID
10x WRN CostModel.ComputeAllocation: Node CPU cost query result missing field: provider_id for node "aks-<pool>-spot-xxxxx"
10x WRN CostModel.ComputeAllocation: Node RAM cost query result missing field: provider_id for node "aks-<pool>-spot-xxxxx"
10x WRN unable to compute overhead for node aks-<pool>-spot-xxxxx - defaulting to no overhead
WRN ComputeTotals: node cost adjusted to $0.00 for aks-<pool>-spot-xxxxx
302x WRN Resource-cost inversion for aks-<pool>-spot-xxxxx RAM: asset has MORE byte-hours (1963397154.13)
but LESS cost (0.0000) than allocations (byte-hours: 129363071.87, cost: 0.0005)So: the asset record has no Type → the node is priced at $0.00 → idle (asset - allocation) inverts against every allocation on that node.
The contradiction: live pricing is correct
/metrics on the same pod, at the same time, has 85 fully-priced node series carrying both instance_type and provider_id:
node_total_hourly_cost{arch="amd64",instance="aks-<pool>-demand-xxxxx",instance_type="Standard_D8s_v3",
node="aks-<pool>-demand-xxxxx",provider_id="azure:///subscriptions/<subscription-id>/...",region="eastus",
uid="..."} 0.38398827883148196All 85 series are non-zero. The Kubernetes Node objects also carry node.kubernetes.io/instance-type and topology.kubernetes.io/region normally. The instance type is therefore available to the process — the asset path just doesn't carry it through.
Possibly relevant environment detail
This cluster has ~95 nodes and heavy churn from autoscaled spot pools. Of the distinct node names in the Type does not exist warnings, 25 no longer exist and 12 are currently live, so the problem is not only stale nodes. Alongside it, a handful of live nodes fail the kubelet scrape:
WRN Error making request to https://<apiserver>/api/v1/nodes/aks-<pool>-spot-xxxxx/proxy/stats/summary: invalid response 503
WRN Error making request to https://<node-ip>:10250/stats/summary: remote error: tls: internal error
ERR error retrieving node stat data: problem getting node address: stats/summaryThere is also persistent client-go throttling during these requests, ~1.6s per call, all on /version:
"Waited before sending request" delay="1.597307785s" reason="client-side throttling, not priority and fairness" verb="GET" URL="https://<apiserver>/version"Expected behaviour
With collectorDataSource enabled, either:
- Assets populate so that
includeIdle=trueworks, or - idle-inclusive queries fail fast with a clear error instead of hanging past any reasonable proxy timeout, and the bundled UI does not default to a query the backend cannot serve in this mode.
Happy to supply more logs or test a patch.
Source: opencost/opencost