Skip to content

Commit

Permalink
doks: fix panic during create
Browse files Browse the repository at this point in the history
If a user creates a DOKS cluster through doctl and deletes it through
some other means while doctl is waiting for the creation the command
panics. This fixes the panic and returns an appropriate error.
  • Loading branch information
gottwald committed Oct 16, 2024
1 parent bbe6124 commit 5bc0cc6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions commands/kubernetes.go
Original file line number Diff line number Diff line change
Expand Up @@ -764,6 +764,9 @@ func (s *KubernetesCommandService) RunKubernetesClusterCreate(defaultNodeSize st
if err != nil {
warn("Cluster couldn't enter `running` state: %v", err)
}
if cluster == nil {
return errors.New("cluster vanished while waiting for creation")
}
}

if update {
Expand Down

0 comments on commit 5bc0cc6

Please sign in to comment.