You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit fe8503b
Browse filesBrowse the repository at this point in the historyBrowse files
fix(backups): surface CLI stderr, own the demo pods, keep the nats password off argv
Addresses the review on the nats and kafka-metadata demos.
- The nats verify read (stream_message_count) and the kafka verify reads (topic_meta, topic_partitions) dropped the CLI's stderr with 2>/dev/null, so a failed exec still surfaced as an empty value -- the very defect this PR claims to fix. Keep only jq's and the describe's own suppression; the exec's stderr now says why. New bats cases fail the exec and assert the message reaches the caller, so a re-added 2>/dev/null reddens the suite.
- nats_cli passed NATS_PASSWORD in the --server URL, which the exec request carries into the apiserver audit log. Pass it in NATS_PASSWORD on stdin, as the redis demo does; a bats case asserts it stays out of argv.
- The CLI pods were addressed by name alone. Label them cozystack.io/backup-demo=<demo>, reuse only a Ready pod the demo owns, replace a leftover in a terminal phase instead of waiting 5m on it, refuse a same-named pod the demo does not own, and reap by label with --grace-period=1 so cleanup does not wait the full grace period on a sleep-as-PID1 pod.
- Move the kafka strategy-wait comment onto its own paragraph so the S3/CA comment sits with the if it describes.
Assisted-by: LLM
Signed-off-by: IvanHunters <[email protected]>
|| { log_error "cozy-default-kafka strategy did not appear: enable the platform default backups (backupstrategy-controller) before running this demo";exit 1; }
52
+
40
53
# The shipped cozy-default-kafka advertises the platform's EXTERNAL S3 ingress,
41
54
# which in-cluster Pods cannot resolve or TLS-validate in CI. Derive a demo
42
55
# strategy from it (so the driver script stays a single source of truth) pointed
43
56
# at an in-cluster, verifiable endpoint. With an S3_ENDPOINT override, copy the
44
57
# self-signed seaweedfs CA and mount it (CURL_CA_BUNDLE); with none, reuse the
45
58
# shipped endpoint and skip the CA mount (its cert is publicly trusted, and
46
59
# CURL_CA_BUNDLE would REPLACE the system bundle rather than extend it).
47
-
# Wait for it rather than read it once. The shipped strategy is rendered behind a
48
-
# lookup of the platform bucket, so it exists only once a Helm upgrade has run
49
-
# after that bucket was provisioned. The controller forces that upgrade, but
50
-
# helm-controller holds it while any release in its dependsOn is not Ready, so a
51
-
# platform change made just before this runs can keep it absent for minutes. Both
52
-
# the endpoint read below and provision_demo_strategy derive from it, so wait
53
-
# once here; kubectl wait keeps polling through NotFound and fails on any other
54
-
# error.
55
-
log_substep "Waiting for the platform's cozy-default-kafka strategy..."
|| { log_error "cozy-default-kafka strategy did not appear: enable the platform default backups (backupstrategy-controller) before running this demo";exit 1; }
0 commit comments