From 84374fa51a5ca20c3eabaaae54af3dc51d047340 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Steenis Date: Fri, 21 Aug 2020 14:10:05 +0200 Subject: [PATCH] Get base for copied statefile for snapshot --- pki/deploy.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pki/deploy.go b/pki/deploy.go index 77d5441e..096a3558 100644 --- a/pki/deploy.go +++ b/pki/deploy.go @@ -64,7 +64,9 @@ func DeployStateOnPlaneHost(ctx context.Context, host *hosts.Host, stateDownload DestinationClusterStateFilePath := path.Join(K8sBaseDir, "/", fmt.Sprintf("%s%s", snapshotName, ClusterStateExt)) // This is the location where the 1-on-1 copy from local will be placed in the container, this is later moved to DestinationClusterStateFilePath // Example: /etc/kubernetes/cluster.rkestate - SourceClusterStateFilePath := path.Join(K8sBaseDir, stateFilePath) + // Example: /etc/kubernetes/rancher-cluster.rkestate + baseStateFile := path.Base(stateFilePath) + SourceClusterStateFilePath := path.Join(K8sBaseDir, baseStateFile) logrus.Infof("[state] Deploying state file to [%v] on host [%s]", DestinationClusterStateFilePath, host.Address) imageCfg := &container.Config{