Merge pull request #4160 from danfengliu/add-previous-fix-for-aws-back

Recovery the workround for aws pending issue
This commit is contained in:
Daniel Jiang
2021-09-19 16:26:56 +08:00
committed by GitHub
2 changed files with 17 additions and 0 deletions

View File

@@ -68,6 +68,14 @@ func runKibishiiTests(client testClient, providerName, veleroCLI, veleroNamespac
return errors.Wrapf(err, "failed to delete namespace %s", kibishiiNamespace)
}
// the snapshots of AWS may be still in pending status when do the restore, wait for a while
// to avoid this https://github.com/vmware-tanzu/velero/issues/1799
// TODO remove this after https://github.com/vmware-tanzu/velero/issues/3533 is fixed
if providerName == "aws" && useVolumeSnapshots {
fmt.Println("Waiting 5 minutes to make sure the snapshots are ready...")
time.Sleep(5 * time.Minute)
}
if err := veleroRestore(oneHourTimeout, veleroCLI, veleroNamespace, restoreName, backupName); err != nil {
runDebug(context.Background(), veleroCLI, veleroNamespace, "", restoreName)
return errors.Wrapf(err, "Restore %s failed from backup %s", restoreName, backupName)

View File

@@ -134,6 +134,15 @@ func runUpgradeTests(client testClient, upgradeToVeleroImage, upgradeToVeleroVer
if err := deleteNamespace(oneHourTimeout, client, upgradeNamespace, true); err != nil {
return errors.Wrapf(err, "failed to delete namespace %s", upgradeNamespace)
}
// the snapshots of AWS may be still in pending status when do the restore, wait for a while
// to avoid this https://github.com/vmware-tanzu/velero/issues/1799
// TODO remove this after https://github.com/vmware-tanzu/velero/issues/3533 is fixed
if providerName == "aws" && useVolumeSnapshots {
fmt.Println("Waiting 5 minutes to make sure the snapshots are ready...")
time.Sleep(5 * time.Minute)
}
if err := veleroInstall(context.Background(), veleroCLI, upgradeToVeleroImage, resticHelperImage, veleroNamespace, cloudProvider, objectStoreProvider, useVolumeSnapshots,
cloudCredentialsFile, bslBucket, bslPrefix, bslConfig, vslConfig, crdsVersion, "", registryCredentialFile); err != nil {
return errors.Wrapf(err, "Failed to install velero from image %s", upgradeToVeleroImage)