Skip to content

Commit aa5612f

Browse files
committed
Add not supported messages to the runners for the new credentialFiles feature
1 parent 1f22606 commit aa5612f

File tree

6 files changed

+18
-6
lines changed

6 files changed

+18
-6
lines changed

lib/runners/alioth.nix

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ let
99
user
1010
vcpu mem balloon initialBalloonMem hotplugMem hotpluggedMem interfaces volumes shares devices vsock
1111
kernel initrdPath
12-
storeDisk storeOnDisk;
12+
storeDisk storeOnDisk credentialFiles;
1313
in {
1414
command =
1515
if user != null
@@ -22,6 +22,8 @@ in {
2222
then throw "alioth does not support hotplugMem"
2323
else if hotpluggedMem != 0
2424
then throw "alioth does not support hotpluggedMem"
25+
else if credentialFiles != {}
26+
then throw "alioth does not support credentialFiles"
2527
else builtins.concatStringsSep " " (
2628
[
2729
"${pkgs.alioth}/bin/alioth" "run"

lib/runners/cloud-hypervisor.nix

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
let
99
inherit (pkgs) lib;
10-
inherit (microvmConfig) vcpu mem balloon initialBalloonMem deflateOnOOM hotplugMem hotpluggedMem user interfaces volumes shares socket devices hugepageMem graphics storeDisk storeOnDisk kernel initrdPath;
10+
inherit (microvmConfig) vcpu mem balloon initialBalloonMem deflateOnOOM hotplugMem hotpluggedMem user interfaces volumes shares socket devices hugepageMem graphics storeDisk storeOnDisk kernel initrdPath credentialFiles;
1111
inherit (microvmConfig.cloud-hypervisor) platformOEMStrings extraArgs;
1212

1313
hasUserConsole = (extractOptValues "--console" extraArgs).values != [];
@@ -147,6 +147,8 @@ in {
147147
command =
148148
if user != null
149149
then throw "cloud-hypervisor will not change user"
150+
else if credentialFiles != {}
151+
then throw "cloud-hypervisor does not support credentialFiles"
150152
else lib.escapeShellArgs (
151153
[
152154
(if graphics.enable

lib/runners/crosvm.nix

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ let
99
inherit (pkgs.stdenv) system;
1010
inherit (microvmConfig)
1111
vcpu mem balloon initialBalloonMem hotplugMem hotpluggedMem user volumes shares
12-
socket devices vsock graphics
12+
socket devices vsock graphics credentialFiles
1313
kernel initrdPath storeDisk storeOnDisk;
1414
inherit (microvmConfig.crosvm) pivotRoot extraArgs;
1515

@@ -53,6 +53,8 @@ in {
5353
then throw "crosvm does not support hotplugMem"
5454
else if hotpluggedMem != 0
5555
then throw "crosvm does not support hotpluggedMem"
56+
else if credentialFiles != {}
57+
then throw "crosvm does not support credentialFiles"
5658
else lib.escapeShellArgs (
5759
[
5860
"${pkgs.crosvm}/bin/crosvm" "run"

lib/runners/firecracker.nix

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ let
1010
vcpu mem balloon initialBalloonMem hotplugMem hotpluggedMem
1111
interfaces volumes shares devices
1212
kernel initrdPath
13-
storeDisk;
13+
storeDisk credentialFiles;
1414
inherit (microvmConfig.firecracker) cpu;
1515

1616
kernelPath = {
@@ -83,6 +83,8 @@ in {
8383
then throw "hotplugMem not implemented for Firecracker"
8484
else if hotpluggedMem != 0
8585
then throw "hotpluggedMem not implemented for Firecracker"
86+
else if credentialFiles != {}
87+
then throw "credentialFiles are not implemented for Firecracker"
8688
else lib.escapeShellArgs [
8789
"${pkgs.firecracker}/bin/firecracker"
8890
"--config-file" configFile

lib/runners/kvmtool.nix

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ let
88
inherit (microvmConfig)
99
hostName preStart user
1010
vcpu mem balloon initialBalloonMem hotplugMem hotpluggedMem interfaces volumes shares devices vsock
11-
kernel initrdPath
11+
kernel initrdPath credentialFiles
1212
storeDisk storeOnDisk;
1313
in {
1414
preStart = ''
@@ -25,6 +25,8 @@ in {
2525
then throw "kvmtool does not support hotplugMem"
2626
else if hotpluggedMem != 0
2727
then throw "kvmtool does not support hotpluggedMem"
28+
else if credentialFiles != {}
29+
then throw "kvmtool does not support credentialFiles"
2830
else builtins.concatStringsSep " " (
2931
[
3032
"${pkgs.kvmtool}/bin/lkvm" "run"

lib/runners/stratovirt.nix

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ let
1111
inherit (microvmConfig)
1212
hostName
1313
vcpu mem balloon initialBalloonMem hotplugMem hotpluggedMem interfaces shares socket forwardPorts devices
14-
kernel initrdPath
14+
kernel initrdPath credentialFiles
1515
storeOnDisk storeDisk;
1616

1717
tapMultiQueue = vcpu > 1;
@@ -79,6 +79,8 @@ in {
7979
then throw "stratovirt does not support hotplugMem"
8080
else if hotpluggedMem != 0
8181
then throw "stratovirt does not support hotpluggedMem"
82+
else if credentialFiles != {}
83+
then throw "stratovirt does not support credentialFiles"
8284
else lib.escapeShellArgs (
8385
[
8486
"${pkgs.expect}/bin/unbuffer"

0 commit comments

Comments
 (0)