Skip to content

fix(infra): the destination could not install — five defects, found by deploying it - #441

Merged
athvin merged 1 commit into
mainfrom
bm/telemetry-openobserve-deployment
Nov 3, 2026
Merged

athvin merged 1 commit into
mainfrom
bm/telemetry-openobserve-deployment

Conversation

@athvin

@athvin athvin commented Nov 3, 2026

Copy link
Copy Markdown
Owner

#418 landed the span store and it had never run anywhere. The CI deploy job that would have rendered these values was being cancelled by images.yml's concurrency before it started, and make obs-up failed on its first line for anyone on a Mac. So nothing had ever executed them.

Deploying for real found five defects, in order of discovery.

1. make obs-up was broken on macOS

macOS ships bash 3.2, where expanding an empty array under set -u is an unbound variable error; bash 4.4+ (every CI runner) treats it as nothing. "${ctx[@]}" is now ${ctx[@]+"${ctx[@]}"} in all seven places.

This is the entire human half of the "one script, two callers" promise the script opens with — and the reason the other four defects survived review.

2. The chart could not render

replicaCount: 1 — the distributed chart wants an object keyed by role:

can't evaluate field scheduler in type interface {}

3. It was the wrong chart

openobserve/openobserve renders a workload per role (ingester, querier, router, scheduler, compactor, o2ai×2) and defaults to a NATS subchart plus a bundled Postgres. That is ~10 pods on a cluster with 4 total vCPU (two 2-vCPU nodes, account quota 8), beside er-api, er-dispatcher, the collector, Fluent Bit, the operator and external-secrets.

Meanwhile the values file said "Not four services" and set ZO_NODE_ROLE: all — single node, a design that chart cannot express. Replaced with a plain Deployment, and ZO_LOCAL_MODE corrected from "false" (cluster mode, which requires the NATS coordinator) to "true" with ZO_LOCAL_MODE_STORAGE: s3 — single node with remote storage.

Data is Parquet in S3 and metadata is in Aurora, so the pod holds nothing durable; the one exception is the WAL on an emptyDir, stated in the manifest header rather than left to be discovered. Recreate not rolling update, because two single-node instances sharing one bucket would both believe they owned compaction.

4. Fluent Bit sent empty credentials

Its output authenticates with HTTP_User ${OPENOBSERVE_USER} from the environment, and the values file had no env: at all. Every push was a 401, twice a second, visible only in OpenObserve's access log.

before after
POST /api/default/containers/_json 401 on every push 108 × 200, 0 failures

5. The collector sent an empty Authorization header

Same shape, worse failure mode — it logs the problem once and then runs happily, so every span would have been a silent 401:

warn envprovider: Configuration references unset environment variable  "name": "OPENOBSERVE_AUTH"

Now wired from the same secret; the warning is gone.

Plus the deprecation the first successful install printed

The collector chart renamed otlphttp → otlp_http and still auto-rewrites the old spelling while announcing that auto-rewrite will be removed. Renamed now rather than on a future chart bump.

Verified end to end, not merely deployed

A synthetic OTLP span posted to the collector in-cluster, then read back out of the store:

hits: 1
trace_id        ddcbb6ccc9d57dee68238f2c1f1a3ab4
span_id         5bca8cfad4f0e2e4
service_name    er-task
operation_name  db.query
er_statement    entity_membership.read.member_keys

So OTLP → collector → tail_sampling → otlp_http/openobserve → queryable works, and er.statement survives as a searchable field. The span carried status.code: ERROR deliberately, so the errors policy kept it rather than leaving the result to the 10% residual.

OpenObserve runs as one pod, 1/1, /healthz 200, no NATS and no bundled Postgres. Logs are flowing — 5,254 docs, storage_type: s3, 19 objects in the bucket. Trace Parquet has not flushed to S3 yet (OpenObserve flushes on an interval), so that half is demonstrated by the logs stream on the same storage path rather than claimed for traces.

Follow-ups, deliberately not here

  • The deploy starvation that hid all of this is its own change (separate workflow on workflow_run with cancel-in-progress: false, so deploys queue instead of cancelling).
  • tail_sampling has no ui-interactions policy yet. Not a gap today — there are no UI events — but P20 must add it, since the plan requires UI events be exempt from sampling entirely.

🤖 Generated with Claude Code

…y deploying it

#418 landed the span store and it had never run anywhere. The CI deploy job
that would have rendered it was being cancelled by images.yml's concurrency
before it started, and `make obs-up` failed on its first line for anyone on a
Mac. So nothing had ever executed these values. Deploying them for real found
five defects, in order of discovery:

1. **`make obs-up` was broken on macOS.** macOS ships bash 3.2, where
   expanding an EMPTY array under `set -u` is an "unbound variable" error;
   bash 4.4+ (every CI runner) treats it as nothing. `"${ctx[@]}"` is now
   `${ctx[@]+"${ctx[@]}"}` in all seven places. This is the entire human half
   of the "one script, two callers" promise the script opens with.

2. **The chart could not render.** `replicaCount: 1` — the distributed chart
   wants an OBJECT keyed by role, so it failed with `can't evaluate field
   scheduler in type interface {}`.

3. **The chart was the wrong chart.** `openobserve/openobserve` renders a
   workload per role (ingester, querier, router, scheduler, compactor, o2ai×2)
   and defaults to a NATS subchart plus a BUNDLED Postgres — about ten pods on
   a cluster with 4 total vCPU, beside er-api, er-dispatcher, the collector,
   Fluent Bit, the operator and external-secrets. The values file meanwhile
   said "Not four services" and set `ZO_NODE_ROLE: all`, which is single-node
   — a design the chart cannot express. Replaced with a plain Deployment, and
   `ZO_LOCAL_MODE` corrected from "false" (cluster mode, which REQUIRES the
   NATS coordinator) to "true" with `ZO_LOCAL_MODE_STORAGE: s3`, which is
   single node with remote storage.

4. **Fluent Bit sent empty credentials.** Its output authenticates with
   `HTTP_User ${OPENOBSERVE_USER}` from the ENVIRONMENT, and the values file
   had no `env:` at all — so every push was a 401, twice a second, visible
   only in OpenObserve's access log. Measured before: 401 on every POST;
   after: 108×200 and 0 failures.

5. **The collector sent an empty Authorization header.** Same shape, worse
   failure: it logs `Configuration references unset environment variable
   OPENOBSERVE_AUTH` ONCE and then runs happily, so every span would have been
   a silent 401. Now wired from the same secret; the warning is gone.

Plus the deprecation the first successful install printed: the collector chart
renamed `otlphttp` to `otlp_http` and still auto-rewrites the old spelling
while announcing that auto-rewrite will be removed. Renamed now rather than
discovering it on a chart bump.

## Verified end to end, not merely deployed

A synthetic OTLP span posted to the collector in-cluster, then read back out:

    hits: 1
    trace_id        ddcbb6ccc9d57dee68238f2c1f1a3ab4
    service_name    er-task
    operation_name  db.query
    er_statement    entity_membership.read.member_keys

So `OTLP -> collector -> tail_sampling -> otlp_http/openobserve -> queryable`
works, and `er.statement` survives as a searchable field. The span carried
`status.code: ERROR` deliberately, so the `errors` sampling policy kept it
rather than leaving the result to the 10% residual.

OpenObserve runs as one pod, 1/1, `/healthz` 200, no NATS and no bundled
Postgres. Logs are flowing (5,254 docs, storage_type s3, 19 objects in the
bucket).

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
@athvin
athvin merged commit 857a661 into main Nov 3, 2026
34 checks passed
@athvin
athvin deleted the bm/telemetry-openobserve-deployment branch November 3, 2026 04:55
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

Successfully merging this pull request may close these issues.

2 participants