project-pegaprox icon indicating copy to clipboard operation
project-pegaprox copied to clipboard

[Bug] New MAC for (migrated) VMs

Open j0c00 opened this issue 7 months ago • 2 comments

Describe the bug

Generate new MAC address should use the value defined for the Cluster from "from Datacenter / Options / MAC address prefix"

(There are two German phrases are left on this panel: MAC Adresse 1-64 Queues (nur VirtIO)

Steps to Reproduce

Expected behavior

Environment

  • PegaProx Version: Beta 0.9.8.2
  • Installation Method: Manual (git clone)
  • OS: Debian 13.4
  • Browser: Firefox 150.0.1
  • Behind Reverse Proxy? No
  • UI? Corporate Layout

Logs


Screenshots

Image

Checklist

  • [X] I have searched existing issues to make sure this is not a duplicate
  • [X] I am using the latest version of PegaProx

j0c00 avatar May 01 '26 16:05 j0c00

Hi @j0c00 — the two strings that bled through in English mode (the MAC Adresse label and the Multiqueue hint) are an old hardcoded-German quick-pass from when that dialog was first sketched out, never made it into the i18n table. Patched both: the label uses the existing macAddress key (already in DE/EN/FR/ES/PT/KO/IT), the hint got a new multiqueueHint key with translations across the same set. Lands in the next beta.

The first part — making "Generate new MAC" honor the Datacenter / Options / mac_prefix value — is bigger, the network dialog doesn't currently know about the cluster's datacenter-options. Tracked it, looking at it next. Reasonable workaround until then is typing the prefix in manually after generate.

PegaProx is donation-funded, https://opencollective.com/pegaprox helps us keep doing this if it's been useful to you.

— MK

mkellermann97 avatar May 02 '26 14:05 mkellermann97

Hey @j0c00 — Saturday-afternoon patrol picked this one back up.

Fix landed on Testing (commit 3942b8c). The "Generate new MAC" button now fetches Datacenter → Options → MAC address prefix once when the config modal opens and uses it as the prefix. Supports the same 1–3 octet shapes PVE itself accepts:

  • BC:24:11 (PVE default) → BC:24:11:xx:xx:xx
  • BC:24 → BC:24:xx:xx:xx:xx
  • BC → BC:xx:xx:xx:xx:xx
  • empty/unset → falls back to the previous 02:xx:xx:xx:xx:xx (locally-administered) — backwards compatible

Verified:

  • 9 unit cases on the new generator covering all valid prefix shapes plus the failure modes (invalid hex, too-many-octets, whitespace, lowercase-normalisation, null/empty)
  • Live against both dev clusters: /api/clusters/<id>/datacenter/options returns mac_prefix: 'BC:24:11', which is exactly the shape the new generator picks up

The two hardcoded-German labels you flagged in the same panel (MAC Adresse, the Multiqueue hint) were already patched in a prior pass — that part shipped a few weeks back.

Donations at https://opencollective.com/pegaprox keep these long-tail paper-cut sweeps going.

— Marcus

mkellermann97 avatar May 16 '26 13:05 mkellermann97