chore(influxdb): probe token before influx backup
ci/woodpecker/manual/migrate-influxdb Pipeline failed
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:
@@ -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 }}
|
||||
|
||||
Reference in New Issue
Block a user