@@ -194,7 +194,7 @@ func (h *hostInfo) checkResetSafety(c *cli.Context) (bool, string, error) {
194194 }
195195 }
196196 if len (workers ) > 0 && len (controllers ) == 1 {
197- message := fmt .Sprintf ("Cannot uninstall the last %s node when there are other nodes in the cluster." , h .RoleName )
197+ message := fmt .Sprintf ("Cannot reset the last %s node when there are other nodes in the cluster." , h .RoleName )
198198 return false , message , nil
199199 }
200200 return true , "" , nil
@@ -284,19 +284,19 @@ func checkErrPrompt(c *cli.Context, err error) bool {
284284 if c .Bool ("force" ) {
285285 return true
286286 }
287- logrus .Info ("An error occurred while trying to uninstall this node." )
287+ logrus .Info ("An error occurred while trying to reset this node." )
288288 if c .Bool ("no-prompt" ) {
289289 return false
290290 }
291291 logrus .Info ("Continuing may leave the cluster in an unexpected state." )
292292 return prompts .New ().Confirm ("Do you want to continue anyway?" , false )
293293}
294294
295- var uninstallCommand = & cli.Command {
296- Name : "uninstall " ,
295+ var resetCommand = & cli.Command {
296+ Name : "reset " ,
297297 Before : func (c * cli.Context ) error {
298298 if os .Getuid () != 0 {
299- return fmt .Errorf ("uninstall command must be run as root" )
299+ return fmt .Errorf ("reset command must be run as root" )
300300 }
301301 return nil
302302 },
@@ -309,14 +309,14 @@ var uninstallCommand = &cli.Command{
309309 },
310310 & cli.BoolFlag {
311311 Name : "force" ,
312- Usage : "Ignore errors encountered when uninstalling the node (implies --no-prompt)" ,
312+ Usage : "Ignore errors encountered when resetting the node (implies --no-prompt)" ,
313313 Value : false ,
314314 },
315315 },
316316 Usage : fmt .Sprintf ("Uninstall %s from the current node" , binName ),
317317 Action : func (c * cli.Context ) error {
318318 logrus .Info ("This will remove this node from the cluster and completely reset it." )
319- logrus .Info ("Do not uninstall another node until this is complete." )
319+ logrus .Info ("Do not reset another node until this is complete." )
320320 if ! c .Bool ("force" ) && ! c .Bool ("no-prompt" ) && ! prompts .New ().Confirm ("Do you want to continue?" , false ) {
321321 return fmt .Errorf ("Aborting" )
322322 }
0 commit comments