Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var CephPurgeOsdCmd = &cobra.Command{ Use: "purge-osd", Short: "Permanently remove an OSD from the cluster.", Args: cobra.ExactArgs(1), Example: "odf purge-osd <ID>", PreRunE: validateOsdID, Run: func(cmd *cobra.Command, args []string) { ctx := cmd.Context() forceflagValue := "false" osdID := args[0] safeToDestroy, err := osd.SafeToDestroy(ctx, root.ClientSets, root.OperatorNamespace, root.StorageClusterNamespace, osdID) if !safeToDestroy { var answer string yesForceDestroyOSD := "yes-force-destroy-osd" logging.Warning("Are you sure you want to purge osd.%s? The OSD is *not* safe to destroy. This may lead to data loss. If you are sure the OSD should be purged, enter '%s'", osdID, yesForceDestroyOSD) fmt.Scanf("%s", &answer) err := mons.PromptToContinueOrCancel(yesForceDestroyOSD, answer) if err != nil { logging.Fatal(err) } forceflagValue = "true" } else if err != nil { logging.Fatal(errors.Wrapf(err, "failed to check if osd.%s is safe to destroy", osdID)) } rook.PurgeOsd(ctx, root.ClientSets, root.OperatorNamespace, root.StorageClusterNamespace, osdID, forceflagValue) }, }
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.