Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/uds/services/PhysicalMachines/deployment_multi.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,9 @@ def get_unique_id(self) -> str:

@typing.override
def set_ready(self) -> types.states.TaskState:
# User-services migrated from v3.6 may carry an empty _mac, so refresh from
# the Server model before waking up or WOL would be sent to nothing.
self.update_ip()
self.service().wakeup(self._ip, self._mac)
return types.states.TaskState.FINISHED

Expand Down
3 changes: 2 additions & 1 deletion src/uds/services/PhysicalMachines/provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@

from django.utils.translation import gettext_noop as _

from uds.core import consts
from uds.core import exceptions
from uds.core import services
from uds.core import types
Expand Down Expand Up @@ -121,7 +122,7 @@ def wake_on_lan_endpoint(self, host: str, mac: str) -> str:
Returns:
str: URL of WOL server or empty ('') if no server for the ip is found
"""
if not self.config.value or not host or not mac:
if not self.config.value or not host or not mac or mac == consts.NULL_MAC:
return ""

# If host is a hostname, try to resolve it
Expand Down
Loading