How to avoid the auto-generated numbered suffix in the node name (i.e. `mynode-1`)
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 35/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Da chiarire
- Stato di attività
- Ferma
- Stack tecnologico
- go
- Ambito
- networking
Direzione di ricerca
Il payload non indica alcun file sorgente o test. Inizia tracciando il modo in cui caddy-tailscale crea i suoi nodi e il modo in cui tailscaled configura l'impostazione --state=mem:, quindi confronta questo percorso con quello dei normali nodi Tailscale. Il lavoro è completato quando i nodi caddy ricreati mantengono il nome di base invece di ricevere un suffisso intero, in corrispondenza dei casi prima-dopo descritti.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Hi. I'm using this plugin in CI pipeline, where it creates some nodes in the tailnet for per-PR preview environments. Sometimes, while iterating on the project, the underlying VPS is destroyed and immediately recreated. This results in undesirable behavior where node names are automatically suffixed with an integer:
Tailnet (before):
- myvps (online)
- mycaddynode (online)
Tailnet (after):
- myvps (offline)
- myvps-1 (online)
- mycaddynode (offline)
- mycaddynode-1 (online)
This breaks the project's naming scheme. To fix it, I log on to the tailscale admin UI, remove mycaddynode from the tailnet, then rename mycaddynode-1 to mycaddynode. The fix is simple, but can get tedious at times as it first requires identifying that this event has occured in the first place.
Therefore, I'd like to automate the fix. After searching around for a bit, I found that tailscaled's --state=mem: flag essentially works around this auto-suffix naming issue.
After trying it, the --state=mem: does indeed fix the issue, but only for "regular" tailscale nodes and not for nodes that are generated by this caddy-tailscale plugin:
Tailnet (before):
- myvps (online)
- mycaddynode (online)
Tailnet (after):
- myvps (online)
- mycaddynode (offline)
- mycaddynode-1 (online)
Is there a way to get the same behavior for the "caddy nodes" too?
Workarounds
For now, I think my best bet would be to write a script that leverages that tailscale's Rest API to remove the stale offline nodes and rename the replacement node names (POST /device/{deviceId}/name) (i.e. mycaddynode-1 -> mycaddynode).
- Lingua principale
- Go
- Stelle
- 995
- Fork
- 101
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Nessun modello di pull request
- Nessuna guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di tailscale/caddy-tailscale
-
tailscale_auth leaks LocalAPI connections on every config reload, even with #140 or #146Forse già presa @anuragbanerjee l’ha presa 14 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 35/100
tailscale/caddy-tailscale#147 ·
-
Bug: Plugin crashes with read-only file system when using non-filesystem state_dir (e.g., `kube:`)Forse già presa @wgordon17 l’ha presa 51 giorni fa. Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 70/100
tailscale/caddy-tailscale#145 ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 68/100
tailscale/caddy-tailscale#143 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 45/100
tailscale/caddy-tailscale#133 · 2 commenti · 1 reazione ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
tailscale/caddy-tailscale#124 ·
Tutte le issue di tailscale/caddy-tailscale
Issue simili
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 72/100
kubescape/node-agent#1099 ·
I maintainer di solito rispondono entro 1 giorno
-
import-export
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
genealogix/glx#1498 ·
I maintainer di solito rispondono entro 2 giorni
-
Docs: 2 broken linksApertaBug pulumi/pulumi-terraform-bridge R2 S2
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 72/100
pulumi/pulumi-terraform-bridge#3713 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
ossf/pvtr-github-repo-scanner#539 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
goreleaser/goreleaser#7316 ·
I maintainer di solito rispondono entro 1 giorno