mirror of
https://github.com/rancher/rke.git
synced 2025-09-18 08:06:20 +00:00
refactor etcd restoration process
This commit is contained in:
committed by
Alena Prokharchyk
parent
d5a5fd5879
commit
ff4c93e179
@@ -177,7 +177,7 @@ func ExtractBackupBundleOnHost(ctx context.Context, host *hosts.Host, alpineSyst
|
||||
return err
|
||||
}
|
||||
if status != 0 {
|
||||
containerLog, err := docker.GetContainerLogsStdoutStderr(ctx, host.DClient, BundleCertContainer, "5", false)
|
||||
containerErrLog, _, err := docker.GetContainerLogsStdoutStderr(ctx, host.DClient, BundleCertContainer, "5", false)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -185,7 +185,7 @@ func ExtractBackupBundleOnHost(ctx context.Context, host *hosts.Host, alpineSyst
|
||||
if err := docker.RemoveContainer(ctx, host.DClient, host.Address, BundleCertContainer); err != nil {
|
||||
return err
|
||||
}
|
||||
return fmt.Errorf("Failed to run certificate bundle extract, exit status is: %d, container logs: %s", status, containerLog)
|
||||
return fmt.Errorf("Failed to run certificate bundle extract, exit status is: %d, container logs: %s", status, containerErrLog)
|
||||
}
|
||||
log.Infof(ctx, "[certificates] successfully extracted certificate bundle on host [%s] to backup path [%s]", host.Address, TempCertPath)
|
||||
return docker.RemoveContainer(ctx, host.DClient, host.Address, BundleCertContainer)
|
||||
|
Reference in New Issue
Block a user