Skip to content

Commit

Permalink
feat: add kubeadm reset -f for join node if error
Browse files Browse the repository at this point in the history
  • Loading branch information
QianChenglong committed Feb 28, 2020
1 parent 149a7fd commit d3a1711
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pkg/platform/provider/baremetal/phases/kubeadm/kubeadm.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ func JoinNode(s ssh.Interface, option *JoinNodeOption) error {
}
stdout, stderr, exit, err := s.Exec(string(cmd))
if err != nil || exit != 0 {
_, _, _, _ = s.Exec("kubeadm reset -f")
return fmt.Errorf("exec %q failed:exit %d:stderr %s:error %s", cmd, exit, stderr, err)
}
log.Info(stdout)
Expand Down

0 comments on commit d3a1711

Please sign in to comment.