Skip to content

Commit

Permalink
Change directory that experiments data is saved to. Correct log messages
Browse files Browse the repository at this point in the history
  • Loading branch information
Joshua Krstic committed Sep 18, 2023
1 parent c2f108f commit bc40171
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
10 changes: 7 additions & 3 deletions launcher/launcher/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,17 +79,21 @@ func main() {
return
}

experimentsFile := path.Join(launcherfile.HostTmpPath, experimentDataFile)
err = os.MkdirAll(launcherfile.HostExperimentsPath, os.ModePerm)
if err != nil {
logger.Printf("failure to create experiments directory: %v", err)
}
experimentsFile := path.Join(launcherfile.HostExperimentsPath, experimentDataFile)

args := fmt.Sprintf("-output=%s", experimentsFile)
err = exec.Command(binaryPath, args).Run()
if err != nil {
logger.Printf("failure during experiment sync: %v", err)
logger.Printf("failure during experiment sync: %v\n", err)
}

e, err := experiments.New(experimentsFile)
if err != nil {
logger.Printf("failed to read experiment file %v\n", err)
logger.Printf("failed to read experiment file: %v\n", err)
// do not fail if experiment retrieval fails
}
launchSpec.Experiments = e
Expand Down
2 changes: 2 additions & 0 deletions launcher/launcherfile/launcherfile.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ package launcherfile
const (
// HostTmpPath defined the directory in the host that will store attestation tokens
HostTmpPath = "/tmp/container_launcher/"
// HostExperimentsPath defines the directory in the host that will store experiment state.
HostExperimentsPath = "/tmp/experiments_data/"
// ContainerRuntimeMountPath defined the directory in the container stores attestation tokens
ContainerRuntimeMountPath = "/run/container_launcher/"
// AttestationVerifierTokenFilename defines the name of the file the attestation token is stored in.
Expand Down

0 comments on commit bc40171

Please sign in to comment.