1
0
mirror of https://github.com/rancher/rke.git synced 2025-08-31 22:46:25 +00:00

Remove uncompressed snapshot after restore

This commit is contained in:
moelsayed
2019-08-17 02:15:58 +02:00
committed by Alena Prokharchyk
parent f8bac2c059
commit 06e87ebabb
2 changed files with 28 additions and 14 deletions

View File

@@ -3,9 +3,10 @@ package cluster
import (
"context"
"fmt"
"github.com/sirupsen/logrus"
"regexp"
"github.com/sirupsen/logrus"
"github.com/rancher/rke/docker"
"github.com/rancher/rke/hosts"
"github.com/rancher/rke/log"
@@ -141,7 +142,7 @@ func (c *Cluster) RestoreEtcdSnapshot(ctx context.Context, snapshotPath string)
func (c *Cluster) RemoveEtcdSnapshot(ctx context.Context, snapshotName string) error {
backupImage := c.getBackupImage()
for _, host := range c.EtcdHosts {
if err := services.RunEtcdSnapshotRemove(ctx, host, c.PrivateRegistriesMap, backupImage, snapshotName, true, c.Services.Etcd); err != nil {
if err := services.RunEtcdSnapshotRemove(ctx, host, c.PrivateRegistriesMap, backupImage, snapshotName, false, c.Services.Etcd); err != nil {
return err
}
}