add PartiallyFailed phase for backups, log+continue on errors (#1386)

Signed-off-by: Steve Kriss <krisss@vmware.com>
This commit is contained in:
Steve Kriss
2019-04-26 09:14:26 -07:00
committed by KubeKween
parent 42f351b000
commit 8392e6d83f
13 changed files with 355 additions and 145 deletions
+4 -1
View File
@@ -50,7 +50,10 @@ func NewLogsCommand(f client.Factory) *cobra.Command {
cmd.Exit("Error checking for backup %q: %v", backupName, err)
}
if backup.Status.Phase != v1.BackupPhaseCompleted && backup.Status.Phase != v1.BackupPhaseFailed {
switch backup.Status.Phase {
case v1.BackupPhaseCompleted, v1.BackupPhasePartiallyFailed, v1.BackupPhaseFailed:
// terminal phases, do nothing.
default:
cmd.Exit("Logs for backup %q are not available until it's finished processing. Please wait "+
"until the backup has a phase of Completed or Failed and try again.", backupName)
}