chore(influxdb): probe token before influx backup
ci/woodpecker/manual/migrate-influxdb Pipeline failed

Add a prefix+length dump and `influx auth list` probe so we can
distinguish three cases behind the 401: (a) Woodpecker secret didn't
propagate, (b) token missing read:authorizations despite All Access
label, (c) wrong InfluxDB instance on localhost:8086.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-23 19:52:30 +02:00
co-authored by Claude Opus 4.7
parent a1b844a3ab
commit 4ef2c3e7cd
+23
View File
@@ -87,6 +87,29 @@
path: "{{ influx_cli_path }}"
mode: "0755"
# Diagnostics: confirm the token passed through CI matches what the
# user expects and that it can actually list authorizations.
- name: Show token prefix and length (sanity check on CI secret plumbing)
debug:
msg: "token prefix: {{ influx_token[:6] }}..., length: {{ influx_token | length }}"
- name: Probe token — can it read authorizations?
command: >
{{ influx_cli_path }} auth list
--host http://localhost:8086
environment:
INFLUX_TOKEN: "{{ influx_token }}"
register: auth_probe
changed_when: false
failed_when: false
- name: Show auth probe result
debug:
msg:
- "rc: {{ auth_probe.rc }}"
- "stderr: {{ auth_probe.stderr }}"
- "stdout_head: {{ (auth_probe.stdout_lines | default([]))[:3] }}"
- name: Run influx backup (online, scoped to suedstr28/renner)
command: >
{{ influx_cli_path }} backup {{ backup_dir }}