Skip to content

Commit 3a3cf70

Browse files
committed
Changes as requested in the PR
Signed-off-by: Tobias Stocker <tstocker@student.ethz.ch>
1 parent 49628dc commit 3a3cf70

File tree

3 files changed

+23
-20
lines changed

3 files changed

+23
-20
lines changed

cmd/loader.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,9 +151,7 @@ func parseYAMLSpecification(cfg *config.LoaderConfiguration) string {
151151
case "firecracker":
152152
return "workloads/firecracker/trace_func_go.yaml"
153153
default:
154-
platform := strings.ToLower(cfg.Platform)
155-
validPlatforms := []string{"dirigent", "dirigent-dandelion", "dirigent-dandelion-workflow"}
156-
if !slices.Contains(validPlatforms, platform) {
154+
if strings.ToLower(cfg.Platform) != "dirigent" {
157155
log.Fatal("Invalid 'YAMLSelector' parameter.")
158156
}
159157
}

docs/configuration.md

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
| Parameter name | Data type | Possible values | Default value | Description |
44
|------------------------------|-----------|---------------------------------------------------------------------|---------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
55
| Seed | int64 | any | 42 | Seed for specification generator (for reproducibility) |
6-
| Platform | string | Knative, OpenWhisk, AWSLambda, Dirigent, Dirigent-Dandelion | Knative | The serverless platform the functions will be executed on |
6+
| Platform | string | Knative, OpenWhisk, AWSLambda, Dirigent | Knative | The serverless platform the functions will be executed on |
77
| DirigentConfigPath [^9] | string | N/A | "" | Path to the Dirigent configuration file |
88
| InvokeProtocol | string | grpc, http1, http2 | N/A | Protocol to use to communicate with the sandbox |
99
| YAMLSelector | string | wimpy, container, firecracker | container | Service YAML depending on sandbox type |
@@ -76,21 +76,25 @@ that the node on which you run InVitro has SSH access to the target node.
7676
---
7777

7878
# Dirigent configuration
79-
| Parameter name | Data type | Possible values | Default value | Description |
80-
|--------------------------|-----------|------------------------------------------|---------------|--------------------------------------------------------------------------|
81-
| Backend | string | `containerd`, `firecracker`, `dandelion` | `containerd` | The backend used in Dirigent |
82-
| DirigentControlPlaneIP | string | N/A | N/A | IP address of the Dirigent control plane (for function deployment) |
83-
| BusyLoopOnSandboxStartup | bool | true/false | false | Enable artificial delay on sandbox startup |
84-
| AsyncMode | bool | true/false | false | Enable asynchronous invocations in Dirigent |
85-
| AsyncResponseURL | string | N/A | N/A | URL from which to collect invocation responses |
86-
| AsyncWaitToCollectMin | int | >= 0 | 0 | Time after experiment ends after which to collect invocation results |
87-
| RpsDataSizeMB | float64 | >= 0 | 0 | Amount of random data (same for all requests) to embed into each request |
88-
| Workflow [^1] | bool | true/false | false | Send workflow requests to Dirigent |
89-
| WorkflowConfigPath [^2] | string | N/A | N/A | Path to the configuration file for the workflow requests (see below) |
90-
91-
[^1] Only supported for backend `dandelion`.
92-
93-
[^2] Required only when Workflow is set to true.
79+
| Parameter name | Data type | Possible values | Default value | Description |
80+
|--------------------------|-----------|------------------------------------------|---------------|-----------------------------------------------------------------------------------------|
81+
| Backend | string | `containerd`, `firecracker`, `dandelion` | `containerd` | The backend used in Dirigent |
82+
| DirigentControlPlaneIP | string | N/A | N/A | IP address of the Dirigent control plane (for function deployment) |
83+
| BusyLoopOnSandboxStartup | bool | true/false | false | Enable artificial delay on sandbox startup |
84+
| AsyncMode | bool | true/false | false | Enable asynchronous invocations in Dirigent |
85+
| AsyncResponseURL | string | N/A | N/A | URL from which to collect invocation responses |
86+
| AsyncWaitToCollectMin | int | >= 0 | 0 | Time after experiment ends after which to collect invocation results |
87+
| RpsRequestedGpu | int | >= 0 | 0 | Number of gpus requested from Dirigent |
88+
| RpsFile [^1] | string | N/A | N/A | If given the payload is read from this file |
89+
| RpsDataSizeMB [^1] | float64 | >= 0 | 0 | If no rps file is given this amount of random data is generated (same for all requests) |
90+
| Workflow [^2] | bool | true/false | false | Send workflow requests to Dirigent |
91+
| WorkflowConfigPath [^3] | string | N/A | N/A | Path to the configuration file for the workflow requests (see below) |
92+
93+
[^1] Currently used only when requesting gpus (RpsRequestedGpu > 0) and ignored otherwise.
94+
95+
[^2] Only supported for backend `dandelion`.
96+
97+
[^3] Required only when Workflow is set to true.
9498

9599
---
96100

pkg/driver/clients/invoker.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package clients
22

33
import (
4+
"strings"
45
"sync"
56

67
"github.com/sirupsen/logrus"
@@ -21,7 +22,7 @@ func CreateInvoker(cfg *config.Configuration, announceDoneExe *sync.WaitGroup, r
2122
if cfg.DirigentConfiguration == nil {
2223
logrus.Fatal("Failed to create invoker: dirigent configuration is required for platform 'dirigent'")
2324
}
24-
if cfg.DirigentConfiguration.Backend == "Dandelion" || cfg.LoaderConfiguration.InvokeProtocol != "grpc" {
25+
if strings.ToLower(cfg.DirigentConfiguration.Backend) == "dandelion" || cfg.LoaderConfiguration.InvokeProtocol != "grpc" {
2526
return newHTTPInvoker(cfg)
2627
} else {
2728
return newGRPCInvoker(cfg.LoaderConfiguration, ExecutorRPC{})

0 commit comments

Comments
 (0)