Skip to content

Commit

Permalink
Merge pull request google#1771 from runcom/fix-overlay2-crio
Browse files Browse the repository at this point in the history
CRI-O: fix handling of overlay2 storage
  • Loading branch information
dashpole authored Oct 23, 2017
2 parents 65f8fdd + 088aaf1 commit 99716b0
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions container/crio/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package crio
import (
"fmt"
"path"
"path/filepath"
"strconv"
"strings"
"time"
Expand Down Expand Up @@ -142,6 +143,12 @@ func newCrioContainerHandler(
// get device ID from root, otherwise, it's going to error out as overlay
// mounts doesn't have fixed dev ids.
rootfsStorageDir = strings.TrimSuffix(rootfsStorageDir, "/merged")
switch storageDriver {
case overlayStorageDriver, overlay2StorageDriver:
// overlay and overlay2 driver are the same "overlay2" driver so treat
// them the same.
rootfsStorageDir = filepath.Join(rootfsStorageDir, "diff")
}

// TODO: extract object mother method
handler := &crioContainerHandler{
Expand Down

0 comments on commit 99716b0

Please sign in to comment.