Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions internal/layers/layers.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"fmt"
"os"
"path/filepath"
"time"

hcsschema "github.com/Microsoft/hcsshim/internal/hcs/schema2"
"github.com/Microsoft/hcsshim/internal/hcserror"
Expand Down Expand Up @@ -115,6 +116,9 @@ func MountContainerLayers(ctx context.Context, containerId string, layerFolders
// for ERROR_NOT_READY as well.
if hcserr, ok := lErr.(*hcserror.HcsError); ok {
if hcserr.Err == windows.ERROR_NOT_READY || hcserr.Err == windows.ERROR_DEVICE_NOT_CONNECTED {
// Sleep for a little before a re-attempt. A probable cause for these issues in the first place is events not getting
// reported in time so might be good to give some time for things to "cool down" or get back to a known state.
time.Sleep(time.Millisecond * 100)
continue
}
}
Expand Down