Skip to content

Commit

Permalink
Merge pull request #1272 from ksamoray/upload_fail_fix
Browse files Browse the repository at this point in the history
Handle upload failures properly
  • Loading branch information
ksamoray authored Jul 24, 2024
2 parents a77a8bc + b99951d commit a4cf354
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions nsxt/resource_nsxt_upgrade_prepare.go
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,9 @@ func waitForBundleUpload(m interface{}, bundleID string, timeout int) error {
}

log.Printf("[DEBUG] Current status for uploading bundle %s is %s", bundleID, *state.Status)
if *state.Status == nsxModel.UpgradeBundleUploadStatus_STATUS_FAILED {
return state, nsxModel.UpgradeBundleUploadStatus_STATUS_FAILED, fmt.Errorf(*state.DetailedStatus)
}

return state, *state.Status, nil
},
Expand Down

0 comments on commit a4cf354

Please sign in to comment.