Skip to content

Commit

Permalink
cloud-hypervisor: rename doNotify to supportsNotifySocket which is us…
Browse files Browse the repository at this point in the history
…ed by the host nixosModule
  • Loading branch information
astro committed Sep 6, 2024
1 parent d52082c commit 0fb06e0
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions lib/runners/cloud-hypervisor.nix
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ let
};

# systemd>=256 hangs at stage-2 on notifying X_SYSTEMD_HOSTNAME
doNotify = builtins.compareVersions pkgs.systemd.version "256" < 0;
supportsNotifySocket =
builtins.compareVersions pkgs.systemd.version "256" < 0;

in {
inherit tapMultiQueue;
Expand All @@ -99,7 +100,7 @@ in {
rm -f '${socket}'
''}
'' + lib.optionalString doNotify ''
'' + lib.optionalString supportsNotifySocket ''
# Ensure notify sockets are removed if cloud-hypervisor didn't exit cleanly the last time
rm -f notify.vsock notify.vsock_8888
Expand All @@ -119,7 +120,7 @@ in {
done
'';

supportsNotifySocket = true;
inherit supportsNotifySocket;

command =
if user != null
Expand All @@ -141,7 +142,7 @@ in {
"--memory" memOps
]
++
lib.optionals doNotify [
lib.optionals supportsNotifySocket [
"--platform" "oem_strings=[io.systemd.credential:vmm.notify_socket=vsock-stream:2:8888]"
"--vsock" "cid=3,socket=notify.vsock"
]
Expand Down

0 comments on commit 0fb06e0

Please sign in to comment.