Commit 595c508a authored by Anatoly Stansler's avatar Anatoly Stansler 🎯

Merge branch '108-fix-mount-dir-slash' into 'master'

fix: trailing slash in mount dir problem

Closes #108

See merge request !89
parents 6a192874 3a1c330f
Pipeline #123188282 passed with stages
in 4 minutes and 12 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