Skip to content

Commit

Permalink
chore: adding more logs while creating an enclave to see what fails f…
Browse files Browse the repository at this point in the history
…etching a container image in Ubuntu (#1809)

## Description:
adding more logs while creating an enclave to see what fails fetching a
container image in Ubuntu

## Is this change user facing?
NO

## References (if applicable):
Related to this ticket:
#1768
  • Loading branch information
leoporoli authored Nov 16, 2023
1 parent 4e77667 commit 42c7251
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -170,11 +170,12 @@ func (backend *DockerKurtosisBackend) CreateAPIContainer(
).WithRestartPolicy(docker_manager.RestartOnFailure).Build()

if _, err = backend.dockerManager.FetchImageIfMissing(ctx, image); err != nil {
logrus.Warnf("Failed to pull the latest version of API container image '%v'; you may be running an out-of-date version", image)
logrus.Warnf("Failed to pull the latest version of API container image '%v'; you may be running an out-of-date version. Error:\n%v", image, err)
}

containerId, hostMachinePortBindings, err := backend.dockerManager.CreateAndStartContainer(ctx, createAndStartArgs)
if err != nil {
logrus.Debugf("Error occurred starting the API container. Err:\n%v", err)
return nil, stacktrace.Propagate(err, "An error occurred starting the API container")
}
shouldKillContainer := true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -526,6 +526,7 @@ func (manager *DockerManager) CreateAndStartContainer(

_, _, err := manager.FetchImage(ctx, dockerImage, args.imageDownloadMode)
if err != nil {
logrus.Debugf("Error occurred fetching image '%v'. Err:\n%v", dockerImage, err)
return "", nil, stacktrace.Propagate(err, "An error occurred fetching image '%v'", dockerImage)
}

Expand Down

0 comments on commit 42c7251

Please sign in to comment.