fix(physicalmachines): use the current MAC for Wake-on-LAN#40
Merged
Conversation
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.
dkmstr
approved these changes
Jul 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
IPMachinesUserService.set_ready()sent the magic packet using the_macstored 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: callupdate_ip()inset_ready()so ip/mac are refreshed from theServermodel before waking up.provider.py: return an empty endpoint when the MAC isconsts.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).