Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions services/iaasalpha/wait/wait.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@ func CreateServerWaitHandler(ctx context.Context, a APIClientInterface, projectI
return true, server, nil
}
if *server.Id == serverId && *server.Status == ErrorStatus {
if server.ErrorMessage != nil {
return true, server, fmt.Errorf("create failed for server with id %s: %s", serverId, *server.ErrorMessage)
}
return true, server, fmt.Errorf("create failed for server with id %s", serverId)
}
return false, server, nil
Expand All @@ -112,6 +115,9 @@ func resizingServerWaitHandler(ctx context.Context, a APIClientInterface, projec
return true, server, nil
}
if *server.Id == serverId && *server.Status == ErrorStatus {
if server.ErrorMessage != nil {
return true, server, fmt.Errorf("resizing failed for server with id %s: %s", serverId, *server.ErrorMessage)
}
return true, server, fmt.Errorf("resizing failed for server with id %s", serverId)
}
return false, server, nil
Expand Down Expand Up @@ -139,6 +145,9 @@ func ResizeServerWaitHandler(ctx context.Context, a APIClientInterface, projectI
return true, server, nil
}
if *server.Id == serverId && *server.Status == ErrorStatus {
if server.ErrorMessage != nil {
return true, server, fmt.Errorf("resizing failed for server with id %s: %s", serverId, *server.ErrorMessage)
}
return true, server, fmt.Errorf("resizing failed for server with id %s", serverId)
}
return false, server, nil
Expand Down