86 lines
5.3 KiB
Markdown
86 lines
5.3 KiB
Markdown
# Registry discovery and retained-data migration
|
|
|
|
`./jeannie apps` and `./jeannie apps container-registry` reconcile registry
|
|
storage before updating the Argo Application. This uses pinned cluster identity,
|
|
live nodes/PVs and the existing worker inventory, rather than a profile-specific
|
|
manifest directory.
|
|
|
|
Existing local PVs retain their node, path and resource names. A fresh cluster
|
|
with the old registry worker still present uses that worker. A fresh single-node
|
|
cluster on the deployment host instead prepares its local retained directory.
|
|
An existing PV pointing to a missing node is refused rather than rewritten.
|
|
|
|
For the local destination, Jeannie inspects the previous registry worker over
|
|
SSH. If the worker is stopped, it checks its Proxmox VMID and name, temporarily
|
|
starts only that VM, and restores its stopped state with a graceful shutdown.
|
|
It does not start the old control plane. Failure to reach or inspect the source
|
|
blocks deployment; it is not treated as missing registry data.
|
|
|
|
If source data exists, it is copied into a new staging directory after a disk
|
|
capacity check. Source manifests before/after the copy and the copied files must
|
|
have identical SHA-256 checksums. Changed source data, special files, failed
|
|
transfers or verification errors stop publication. Staging directories are
|
|
retained for investigation, and source data is never removed. If source
|
|
inspection confirms an absent or empty directory, an empty retained destination
|
|
is prepared instead. An existing destination is checksummed and reused unchanged
|
|
when it already contains the source files. Otherwise, non-conflicting files are
|
|
merged in staging and the complete union is verified. The original destination
|
|
is renamed to a timestamped backup before publishing the staged directory; a
|
|
publication failure restores it. Mutable tag `current/link` conflicts prefer the
|
|
Pimox source after checking the linked schema-2 manifest/index and all referenced
|
|
blob hashes. Repository history (`dc59dc8`, October 1, 2026) moved the active
|
|
registry from Debian to Pimox and routed subsequent endpoint pushes there. This
|
|
is an explicit lineage policy, not an assumption about filesystem timestamps.
|
|
Every selection and its old/new checksum is recorded in the migration receipt;
|
|
the complete original Debian directory remains in the destination backup.
|
|
Immutable blob conflicts, other unknown file conflicts, or a running Docker
|
|
container with write access to the destination block automatic publication. Destination
|
|
checksums must also remain stable throughout reconciliation. Existing data is
|
|
never silently overwritten or discarded.
|
|
|
|
Successful copies write a profile-scoped `registry-migration.json` receipt.
|
|
Subsequent runs preserve existing destination data. The storage and deployment
|
|
placement are passed to Argo through `registry_placement` Kustomize patches;
|
|
the scheduling preflight renders those same patches. Legacy PV/PVC names remain
|
|
stable to preserve existing Pimox deployments.
|
|
|
|
When serving locally, only firewall rules bearing Jeannie's exact
|
|
`homelab-pimox-registry-forward` comment are retired, together with the matching
|
|
forwarding service. If the local runtime is k3s, its registry configuration is
|
|
merged with the HTTP mirror needed for the existing registry endpoint. Existing
|
|
configuration is backed up; custom mirror endpoints are refused. The first
|
|
configuration change restarts k3s and waits for API readiness. Repeat runs avoid
|
|
that restart.
|
|
|
|
Discovery overrides, when inventory uses different locations:
|
|
|
|
- `LAB_PIMOX_REGISTRY_STORAGE_PATH`: previous registry directory.
|
|
- `LAB_REGISTRY_STORAGE_PATH`: local destination directory.
|
|
- `LAB_PIMOX_REGISTRY_SOURCE_VMID`: source VMID (defaults to worker base VMID).
|
|
|
|
Registry paths must be specific directories below `/data`. Migration requires
|
|
passwordless sudo on the destination, source worker and Proxmox host. This is a
|
|
copy, not ongoing replication or failover between registries.
|
|
|
|
Source reads and bulk transfer now pass through the configured Proxmox host.
|
|
An A/B test transferred 64 MiB successfully through that host while direct
|
|
worker-to-Debian SSH repeatedly failed MAC verification. Authentication remains
|
|
end-to-end and private keys stay on the deployment host.
|
|
Bulk transfer uses a fresh, non-multiplexed SSH connection with AES-256-GCM,
|
|
compression disabled and mandatory source/destination SHA-256 verification.
|
|
`LAB_REGISTRY_TRANSFER_CIPHER` can select another supported authenticated cipher
|
|
(`aes128-gcm@openssh.com` or `chacha20-poly1305@openssh.com`). Negotiation and
|
|
transfer errors are retained in private diagnostic files. A MAC/authentication
|
|
failure aborts transfer and never publishes partial storage. Repeated SSH MAC
|
|
errors, especially alongside TLS bad-record-MAC failures, require investigation
|
|
of the endpoints and network path; cipher selection alone does not prove that
|
|
the underlying issue is repaired.
|
|
|
|
The retained `k3s` profile targets the existing x86 Debian cluster at `.73`.
|
|
The prepared `opi5-k3s` profile targets the Orange Pi host at `.80` with separate
|
|
state, kubeconfig and enrollment. Its host currently runs Pimox: direct k3s
|
|
bootstrap refuses an active hypervisor, and this profile is not ready to deploy
|
|
until host OS preparation and registry placement for the new target are resolved.
|
|
Do not reinstall the hypervisor or erase its disks before securing registry and
|
|
other required VM data.
|