Commit 3a1c330f authored by Anatoly Stansler's avatar Anatoly Stansler 🎯

fix: trailing slash in mount dir problem

parent 6a192874
Pipeline #122930274 passed with stages
in 3 minutes and 55 seconds
......@@ -89,21 +89,6 @@ func NewProvisionModeLocal(ctx context.Context, config Config, dockerClient *cli
},
}
thinCloneManager, err := thinclones.NewManager(p.config.ModeLocal.ThinCloneManager,
p.runner, thinclones.ManagerConfig{
Pool: p.config.ModeLocal.ClonePool,
SnapshotFilterSuffix: p.config.ModeLocal.SnapshotFilterSuffix,
MountDir: p.config.ModeLocal.MountDir,
OSUsername: p.config.OSUsername,
ClonePrefix: ClonePrefix,
})
if err != nil {
return nil, errors.Wrap(err, "failed to initialize thin-clone manager")
}
p.thinCloneManager = thinCloneManager
if len(p.config.ModeLocal.MountDir) == 0 {
p.config.ModeLocal.MountDir = "/var/lib/dblab/clones/"
}
......@@ -128,6 +113,21 @@ func NewProvisionModeLocal(ctx context.Context, config Config, dockerClient *cli
p.config.PgMgmtPassword = DefaultPassword
}
thinCloneManager, err := thinclones.NewManager(p.config.ModeLocal.ThinCloneManager,
p.runner, thinclones.ManagerConfig{
Pool: p.config.ModeLocal.ClonePool,
SnapshotFilterSuffix: p.config.ModeLocal.SnapshotFilterSuffix,
MountDir: p.config.ModeLocal.MountDir,
OSUsername: p.config.OSUsername,
ClonePrefix: ClonePrefix,
})
if err != nil {
return nil, errors.Wrap(err, "failed to initialize thin-clone manager")
}
p.thinCloneManager = thinCloneManager
return p, nil
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment