alunduil / alunduil/alunduil-infrastructure

TrueNAS is named truenas on every surface

未關閉
#536 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
enhancement
主要語言
Shell
星號
0
分支
0
平均合併
6 小時 30 分鐘
30 天內合併 PR
97

描述

## Summary

Retire `truenas-scale` as a name for the NAS. Two surfaces still carry
it while every other surface already says `truenas`.

## Motivation

SCALE was the name of one of two TrueNAS editions. iXsystems merged
them, and the box runs 25.10.7 as plain TrueNAS, so the name encodes a
distinction that no longer exists.

The divergence is narrower than it looks. These already say `truenas`:

- the operating system hostname, per the middleware's own `system_info`
- mDNS, which answers `truenas.local`
- the Loki job label
- the web certificate, issued for `truenas.alunduil.com`

These say `truenas-scale`:

- the tailnet device, so MagicDNS resolves `truenas-scale.`
- the Prometheus job label

## Scope

- Rename the tailnet device to `truenas`.
- Rename the Prometheus job label to `truenas` in the alloy
configuration on the NAS.
- Update `terraform/alunduil/tailscale.tf` and
`docs/reference/asset-register.md`, then confirm no `truenas-scale`
remains in the repository.

## Three things to get right

**The Tailscale app advertises its own hostname.** `tailscale status
--json` reports the peer's `HostName` as `truenas-scale` while the
operating system's hostname is `truenas`, so the container sets its
own rather than inheriting the host's. Renaming in the admin console
alone risks the old name returning when the container re-registers.
Change the app's configuration, then confirm the name survives a
restart.

**Terraform keys routes on the current name.**
`terraform/alunduil/tailscale.tf:85` uses `"truenas-scale"` as a key in
`tailscale_enabled_routes`, and `local.tailscale_node_ids` is built by
splitting device names. Rename the device without editing that map and
the key matches no device, which takes the subnet route and both exit
node routes with it. The two changes land together or not at all.

**The metrics rename breaks history.** Renaming a job label starts a
new series; queries spanning the change see a gap unless they ask for
both names. No dashboard in `grafana/` references the label, and the
instance's other dashboards are Grafana's bundled integrations, but
#482 is open so dashboards live outside git and this isn't a complete
check. Confirm before renaming, and decide deliberately whether the
discontinuity is acceptable rather than discovering it in a panel.

## Acceptance criteria

- [ ] The tailnet device resolves as `truenas`, and the name survives
a restart of the Tailscale app
- [ ] Prometheus metrics arrive under `job="truenas"`
- [ ] Subnet and exit node routes still apply after the Terraform edit
- [ ] No occurrence of `truenas-scale` remains in this repository

## Additional context

Worth pairing with #535. Both change a MagicDNS name, so doing them in
one pass costs one round of broken links and one edit of the asset
register instead of two. Neither blocks the other.

The alloy configuration this touches is the on-NAS file #283 wants
reduced to a secret-free bootstrap, and #281 wants its pipelines
declared in Terraform. Renaming the label by hand now is compatible
with both; it just moves once more when they land.

貢獻指南

這個儲存庫沒有索引到貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。