Skip to content

fix(physicalmachines): use the current MAC for Wake-on-LAN#40

Merged
dkmstr merged 2 commits into
masterfrom
master-fix-wol-physical-machines
Jul 22, 2026
Merged

fix(physicalmachines): use the current MAC for Wake-on-LAN#40
dkmstr merged 2 commits into
masterfrom
master-fix-wol-physical-machines

Conversation

@aschumann-virtualcable

Copy link
Copy Markdown
Contributor

Problem

IPMachinesUserService.set_ready() sent the magic packet using the _mac stored in the user-service. User-services migrated from v3.6 carry an empty _mac, so the packet went nowhere and the machine never woke up.

Additionally, wake_on_lan_endpoint() accepted the null MAC (00:00:00:00:00:00) as a valid target and built an endpoint that could never work.

Changes

  • deployment_multi.py: call update_ip() in set_ready() so ip/mac are refreshed from the Server model before waking up.
  • provider.py: return an empty endpoint when the MAC is consts.NULL_MAC.

Notes

Backported from the equivalent 4.0 fix.

🤖 Generated with Claude Code

Rebuilt on current master (merge of master, ruff-format conflicts resolved).

set_ready() woke the machine up with the _mac stored in the user-service.
Records migrated from v3.6 carry an empty _mac, so the magic packet went
nowhere and the machine never came up. Refresh ip/mac from the Server model
before waking up.

Also skip the WOL endpoint when the MAC is the null one: an all-zeros MAC
is not a target, and building an endpoint for it only produced a request
that could never work.
@github-actions
github-actions Bot requested a review from dkmstr July 22, 2026 09:13
@dkmstr
dkmstr merged commit 6f0c468 into master Jul 22, 2026
5 checks passed
@aschumann-virtualcable
aschumann-virtualcable deleted the master-fix-wol-physical-machines branch July 22, 2026 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants