Repository navigation
fix(infra): the destination could not install — five defects, found by deploying it - #441
Merged
Merged
Conversation
…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]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#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, andmake obs-upfailed 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-upwas broken on macOSmacOS ships bash 3.2, where expanding an empty array under
set -uis anunbound variableerror; 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:3. It was the wrong chart
openobserve/openobserverenders 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, andZO_LOCAL_MODEcorrected from"false"(cluster mode, which requires the NATS coordinator) to"true"withZO_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.Recreatenot 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 noenv:at all. Every push was a 401, twice a second, visible only in OpenObserve's access log.POST /api/default/containers/_json5. 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:
Now wired from the same secret; the warning is gone.
Plus the deprecation the first successful install printed
The collector chart renamed
otlphttp→otlp_httpand 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:
So
OTLP → collector → tail_sampling → otlp_http/openobserve → queryableworks, ander.statementsurvives as a searchable field. The span carriedstatus.code: ERRORdeliberately, so theerrorspolicy kept it rather than leaving the result to the 10% residual.OpenObserve runs as one pod, 1/1,
/healthz200, 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
workflow_runwithcancel-in-progress: false, so deploys queue instead of cancelling).tail_samplinghas noui-interactionspolicy 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