Signed-off-by: John Howard <jhoward@microsoft.com> Upstream-commit: 9a9dc5ba96d2661f5dc2037db44d0984d2129946 Component: engine
23 lines
606 B
Go
23 lines
606 B
Go
// +build !exclude_graphdriver_aufs,linux
|
|
|
|
package daemon
|
|
|
|
import (
|
|
"github.com/Sirupsen/logrus"
|
|
"github.com/docker/docker/daemon/graphdriver"
|
|
"github.com/docker/docker/daemon/graphdriver/aufs"
|
|
"github.com/docker/docker/graph"
|
|
)
|
|
|
|
// Given the graphdriver ad, if it is aufs, then migrate it.
|
|
// If aufs driver is not built, this func is a noop.
|
|
func migrateIfAufs(driver graphdriver.Driver, root string) error {
|
|
if ad, ok := driver.(*aufs.Driver); ok {
|
|
logrus.Debugf("Migrating existing containers")
|
|
if err := ad.Migrate(root, graph.SetupInitLayer); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
return nil
|
|
}
|