Skip to content

Commit

Permalink
change more info on node stopped returning log lines
Browse files Browse the repository at this point in the history
  • Loading branch information
iwilltry42 committed Aug 25, 2022
1 parent 1045276 commit 80889fa
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions pkg/client/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -811,6 +811,11 @@ func NodeWaitForLogMessage(ctx context.Context, runtime runtimes.Runtime, node *
break
}
}

running, status, err := runtime.GetNodeStatus(ctx, node)
if err == nil {
return fmt.Errorf("%v: node %s is running=%v in status=%s", errMsg, node.Name, running, status)
}
return errMsg
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/runtimes/runtime.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ type Runtime interface {
RenameNode(context.Context, *k3d.Node, string) error
GetNodesByLabel(context.Context, map[string]string) ([]*k3d.Node, error)
GetNode(context.Context, *k3d.Node) (*k3d.Node, error)
GetNodeStatus(context.Context, *k3d.Node) (bool, string, error)
GetNodeStatus(context.Context, *k3d.Node) (bool, string, error) // returns (running, status, error)
GetNodesInNetwork(context.Context, string) ([]*k3d.Node, error)
CreateNetworkIfNotPresent(context.Context, *k3d.ClusterNetwork) (*k3d.ClusterNetwork, bool, error) // @param context, name - @return NETWORK, EXISTS, ERROR
GetKubeconfig(context.Context, *k3d.Node) (io.ReadCloser, error)
Expand Down

0 comments on commit 80889fa

Please sign in to comment.