1
0
mirror of https://github.com/rancher/rke.git synced 2025-08-31 14:36:32 +00:00

Merge pull request #2212 from superseb/basepath_statefile

Get base for copied statefile for snapshot
This commit is contained in:
Sebastiaan van Steenis
2020-08-21 20:02:14 +02:00
committed by GitHub

View File

@@ -71,7 +71,9 @@ func DeployStateOnPlaneHost(ctx context.Context, host *hosts.Host, stateDownload
DestinationClusterStateFilePath := path.Join(K8sBaseDir, "/", fmt.Sprintf("%s%s", snapshotName, ClusterStateExt)) 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 // 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 // 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) logrus.Infof("[state] Deploying state file to [%v] on host [%s]", DestinationClusterStateFilePath, host.Address)
imageCfg := &container.Config{ imageCfg := &container.Config{