remove calls to restic check before/after prune (#1794)

* remove calls to restic check before/after prune

Signed-off-by: Steve Kriss <krisss@vmware.com>

* changelog

Signed-off-by: Steve Kriss <krisss@vmware.com>
This commit is contained in:
Steve Kriss
2019-08-23 11:53:00 -06:00
committed by Adnan Abdulhussein
parent 3a0c1be7f0
commit 686f41ebec
5 changed files with 1 additions and 35 deletions

View File

@@ -91,13 +91,6 @@ func SnapshotsCommand(repoIdentifier string) *Command {
}
}
func CheckCommand(repoIdentifier string) *Command {
return &Command{
Command: "check",
RepoIdentifier: repoIdentifier,
}
}
func PruneCommand(repoIdentifier string) *Command {
return &Command{
Command: "prune",

View File

@@ -103,13 +103,6 @@ func TestSnapshotsCommand(t *testing.T) {
assert.Equal(t, "repo-id", c.RepoIdentifier)
}
func TestCheckCommand(t *testing.T) {
c := CheckCommand("repo-id")
assert.Equal(t, "check", c.Command)
assert.Equal(t, "repo-id", c.RepoIdentifier)
}
func TestPruneCommand(t *testing.T) {
c := PruneCommand("repo-id")

View File

@@ -49,9 +49,6 @@ type RepositoryManager interface {
// authenticated to.
ConnectToRepo(repo *velerov1api.ResticRepository) error
// CheckRepo checks the specified repo for errors.
CheckRepo(repo *velerov1api.ResticRepository) error
// PruneRepo deletes unused data from a repo.
PruneRepo(repo *velerov1api.ResticRepository) error
@@ -200,14 +197,6 @@ func (rm *repositoryManager) ConnectToRepo(repo *velerov1api.ResticRepository) e
return rm.exec(snapshotsCmd, repo.Spec.BackupStorageLocation)
}
func (rm *repositoryManager) CheckRepo(repo *velerov1api.ResticRepository) error {
// restic check requires an exclusive lock
rm.repoLocker.LockExclusive(repo.Name)
defer rm.repoLocker.UnlockExclusive(repo.Name)
return rm.exec(CheckCommand(repo.Spec.ResticIdentifier), repo.Spec.BackupStorageLocation)
}
func (rm *repositoryManager) PruneRepo(repo *velerov1api.ResticRepository) error {
// restic prune requires an exclusive lock
rm.repoLocker.LockExclusive(repo.Name)