From 336006407bd4efebb77bfaacd758581470bfd02c Mon Sep 17 00:00:00 2001 From: liupei Date: Tue, 29 Oct 2024 19:34:33 +0800 Subject: [PATCH] DRBDmon: Add help text for new DRBD and DRBDmon commands --- ...-Add-help-text-for-new-DRBD-commands.patch | 50 +++++ ...d-help-text-for-new-DRBDmon-commands.patch | 180 ++++++++++++++++++ drbd.spec | 7 +- 3 files changed, 236 insertions(+), 1 deletion(-) create mode 100644 backport-DRBDmon-Add-help-text-for-new-DRBD-commands.patch create mode 100644 backport-DRBDmon-Add-help-text-for-new-DRBDmon-commands.patch diff --git a/backport-DRBDmon-Add-help-text-for-new-DRBD-commands.patch b/backport-DRBDmon-Add-help-text-for-new-DRBD-commands.patch new file mode 100644 index 0000000..142dd0a --- /dev/null +++ b/backport-DRBDmon-Add-help-text-for-new-DRBD-commands.patch @@ -0,0 +1,50 @@ +From 8b052fbed677e85148046265a6c23735329453a1 Mon Sep 17 00:00:00 2001 +From: Robert Altnoeder +Date: Wed, 28 Feb 2024 18:35:59 +0100 +Subject: [PATCH 075/100] DRBDmon: Add help text for new DRBD commands + +--- + user/drbdmon/terminal/HelpText.cpp | 14 +++++++++++++- + 1 file changed, 13 insertions(+), 1 deletion(-) + +diff --git a/user/drbdmon/terminal/HelpText.cpp b/user/drbdmon/terminal/HelpText.cpp +index 6c7539d0..79db8e55 100644 +--- a/user/drbdmon/terminal/HelpText.cpp ++++ b/user/drbdmon/terminal/HelpText.cpp +@@ -808,10 +808,14 @@ namespace helptext + " Forces promotion of an inconsistent or outdated DRBD resource to the Primary role\n" + "\x1B\x04" "//secondary" "\x1B\xFF" "\n" + " Demotes a DRBD resource to the Secondary role\n" ++ "\x1B\x04" "//force-secondary" "\x1B\xFF" "\n" ++ " Forces demotion of a DRBD resource to the Secondary role\n" + "\x1B\x04" "//connect" "\x1B\xFF" "\n" + " Connects a resource's replication link\n" + "\x1B\x04" "//disconnect" "\x1B\xFF" "\n" + " Disconnects a resource's replication link\n" ++ "\x1B\x04" "//force-disconnect" "\x1B\xFF" "\n" ++ " Forces disconnection of a resource's replication link\n" + "\x1B\x04" "//attach" "\x1B\xFF" "\n" + " Attaches local backing storage to a DRBD volume\n" + "\x1B\x04" "//detach" "\x1B\xFF" "\n" +@@ -822,9 +826,17 @@ namespace helptext + "\x1B\x04" "//verify" "\x1B\xFF" "\n" + " Starts a DRBD verification process to compare the data on the local volume to the data on the volume " + "of a peer node's resource\n" ++ "\x1B\x04" "//pause-sync" "\x1B\xFF" "\n" ++ " Pauses resynchronization of a volume\n" ++ "\x1B\x04" "//resume-sync" "\x1B\xFF" "\n" ++ " Resumes resynchronization of a volume\n" + "\x1B\x04" "//invalidate" "\x1B\xFF" "\n" + " Invalidates the data on a local DRBD volume, thereby causing a full resynchronization of the " +- "data from the volume of a peer node's resource\n"; ++ "data using another node as the data source\n" ++ "\x1B\x04" "//invalidate-remote" "\x1B\xFF" "\n" ++ " Invalidates the data on a DRBD peer volume, thereby causing a full resynchronization of the " ++ "data on a remote node, using another node as the data source\n"; ++ + + const char* const MAIN_MENU_HELP_1 = + "\x1B\x01" "Help - Main menu" "\x1B\xFF" "\n" +-- +2.33.1.windows.1 + diff --git a/backport-DRBDmon-Add-help-text-for-new-DRBDmon-commands.patch b/backport-DRBDmon-Add-help-text-for-new-DRBDmon-commands.patch new file mode 100644 index 0000000..f9b768d --- /dev/null +++ b/backport-DRBDmon-Add-help-text-for-new-DRBDmon-commands.patch @@ -0,0 +1,180 @@ +From 4d39f0b86c141c37c9b255305b4ef6bbf0de3661 Mon Sep 17 00:00:00 2001 +From: Robert Altnoeder +Date: Wed, 28 Feb 2024 19:01:59 +0100 +Subject: [PATCH 076/100] DRBDmon: Add help text for new DRBDmon commands + +--- + user/drbdmon/terminal/HelpText.cpp | 81 +++++++++++++++++++++++++++++- + 1 file changed, 79 insertions(+), 2 deletions(-) + +diff --git a/user/drbdmon/terminal/HelpText.cpp b/user/drbdmon/terminal/HelpText.cpp +index 79db8e55..5a6bf647 100644 +--- a/user/drbdmon/terminal/HelpText.cpp ++++ b/user/drbdmon/terminal/HelpText.cpp +@@ -728,6 +728,7 @@ namespace helptext + "\x1B\x01" "Description of available commands" "\x1B\xFF" "\n" + "\n" + "The following DRBDmon commands are available:\n" ++ + "\x1B\x04" "/display" "\x1B\xFF" "\n" + " Switches to the display the identifier of which is specified in the argument to the command. " + "The identifier of a display is shown below the title bar in the upper left corner of the " +@@ -736,14 +737,68 @@ namespace helptext + " Switches to the main menu display\n" + " The string " "\x1B\x04" "/d" "\x1B\xFF" " always completes to the " "\x1B\x04" "/display" "\x1B\xFF" + " command for convenience.\n" ++ ++ "\x1B\x04" "/cursor" "\x1B\xFF" "\n" ++ " Positions the cursor on the selected item\n" ++ " This command is available on the following displays:\n" ++ " Resource list\n" ++ " Connection list\n" ++ " Volume list\n" ++ " Peer volume list\n" ++ " The " "\x1B\x03" "*" "\x1B\xFF" " character is interpreted as a wildcard matching any string " ++ " on the resource list and connection list displays. If a wildcard character is present, the " ++ " argument to the " "\x1B\x04" "/cursor" "\x1B\xFF" " command is interpreted as a pattern, " ++ " and the command will select the first resource or connection, respectively, where the name " ++ " matches the pattern. If there is no match, the command is rejected.\n" ++ " If no wildcard character is present, then the command is treated as an alias for the " ++ " " "\x1B\x04" "/resource" "\x1BxFF" " or " "\x1B\x04" "/connection" "\x1B\xFF" " command, " ++ " respectively and will position the cursor on item with the literal name specified in the " ++ " argument to the command.\n" ++ " A wildcard character is not supported on the volume list and peer volume list displays, " ++ " the argument must be a volume number, and the command is treated as an alias for the " ++ " " "\x1B\x04" "/volume" "\x1B\xFF" " or " "\x1B\x04" "/peer-volume" "\x1B\xFF" " comamnd, " ++ " respectively.\n" ++ ++ "\x1B\x04" "/resource" "\x1B\xFF" "\n" ++ " Positions the cursor on the resource with the literal name specified in the argument " ++ " to the command\n" ++ ++ "\x1B\x04" "/connection" "\x1B\xFF" "\n" ++ " Positions the cursor on the connection with the literal name specified in the argument " ++ " to the command\n" ++ ++ "\x1B\x04" "/volume" "\x1B\xFF" "\n" ++ " Positions the cursor on the resource with the volume number specified in the argument " ++ " to the command\n" ++ ++ "\x1B\x04" "/peer-volume" "\x1B\xFF" "\n" ++ " Positions the cursor on the resource with the peer volume number specified in the argument " ++ " to the command\n" ++ ++ "\x1B\x04" "/close" "\x1B\xFF" "\n" ++ " Closes the current display\n" ++ ++ "\x1B\x04" "/select" "\x1B\xFF" "\n" ++ " Selects resources that have a resource name matching the specified pattern. The " ++ "\x1B\x03" "*" "\x1B\xFF" " character is interpreted as a wildcard matching any string.\n" ++ ++ "\x1B\x04" "/deselect" "\x1B\xFF" "\n" ++ " Deselects resources that have a resource name matching the specified pattern. The " ++ "\x1B\x03" "*" "\x1B\xFF" " character is interpreted as a wildcard matching any string.\n" ++ + "\x1B\x04" "/select-all" "\x1B\xFF" "\n" + " Selects all items of a list display. For example, running the /select-all command from the " + "resource list display selects all resources. If only items with warnings or alerts are displayed due " + "to a problem mode have been selected, only those items are selected.\n" +- "\x1B\x04" "/clear-selection" "\x1B\xFF" "\n" ++ ++ "\x1B\x04" "/deselect-all" "\x1B\xFF" "\n" + " Clears the selection of items of a list display. For example, running the " +- "\x1B\x04" "/clear-selection" "\x1B\xFF" ++ "\x1B\x04" "/deselect-all" "\x1B\xFF" + " command from the resource list display clears the selection of resources.\n" ++ ++ "\x1B\x04" "/clear-selection" "\x1B\xFF" "\n" ++ " This is an alias of the " "\x1B\x04" "/deselect-all" "\x1B\xFF" " command\n" ++ + "\x1B\x04" "/colors" "\x1B\xFF" "\n" + " Temporarily sets the selected color scheme.\n" + " Available color schemes are:\n" +@@ -757,6 +812,7 @@ namespace helptext + " 16 colors scheme for terminals with a light background color\n" + " DEFAULT\n" + " Default color scheme\n" ++ + "\x1B\x04" "/charset" "\x1B\xFF" "\n" + " Temporarily sets the selected color scheme.\n" + " Available color schemes are:\n" +@@ -768,6 +824,7 @@ namespace helptext + " ASCII character set\n" + " DEFAULT\n" + " Default character set\n" ++ + "\x1B\x04" "/exit" "\x1B\xFF" "\n" + " Exits DRBDmon\n"; + +@@ -791,48 +848,68 @@ namespace helptext + "\n" + "\x1B\x01" "Description of available commands" "\x1B\xFF" "\n" + "\n" ++ + "\x1B\x04" "//start" "\x1B\xFF" "\n" + " Starts a DRBD resource\n" ++ + "\x1B\x04" "//stop" "\x1B\xFF" "\n" + " Stops a DRBD resource\n" ++ + "\x1B\x04" "//up" "\x1B\xFF" "\n" + " Starts a DRBD resource (same as //start)\n" ++ + "\x1B\x04" "//down" "\x1B\xFF" "\n" + " Stops a DRBD resource (same as //stop)\n" ++ + "\x1B\x04" "//adjust" "\x1B\xFF" "\n" + " Adjusts a DRBD resource, in order to make its runtime state match the settings in its " + "configuration file\n" ++ + "\x1B\x04" "//primary" "\x1B\xFF" "\n" + " Promotes a DRBD resource to the Primary role\n" ++ + "\x1B\x04" "//force-primary" "\x1B\xFF" "\n" + " Forces promotion of an inconsistent or outdated DRBD resource to the Primary role\n" ++ + "\x1B\x04" "//secondary" "\x1B\xFF" "\n" + " Demotes a DRBD resource to the Secondary role\n" ++ + "\x1B\x04" "//force-secondary" "\x1B\xFF" "\n" + " Forces demotion of a DRBD resource to the Secondary role\n" ++ + "\x1B\x04" "//connect" "\x1B\xFF" "\n" + " Connects a resource's replication link\n" ++ + "\x1B\x04" "//disconnect" "\x1B\xFF" "\n" + " Disconnects a resource's replication link\n" ++ + "\x1B\x04" "//force-disconnect" "\x1B\xFF" "\n" + " Forces disconnection of a resource's replication link\n" ++ + "\x1B\x04" "//attach" "\x1B\xFF" "\n" + " Attaches local backing storage to a DRBD volume\n" ++ + "\x1B\x04" "//detach" "\x1B\xFF" "\n" + " Detaches local backing storage from a DRBD volume\n" ++ + "\x1B\x04" "//connect-discard" "\x1B\xFF" "\n" + " Connects a resource's replication link and discard the local volumes' data changes, which will cause it " + "to resynchronize with the volumes of a peer node's resource to resolve a split-brain situation\n" ++ + "\x1B\x04" "//verify" "\x1B\xFF" "\n" + " Starts a DRBD verification process to compare the data on the local volume to the data on the volume " + "of a peer node's resource\n" ++ + "\x1B\x04" "//pause-sync" "\x1B\xFF" "\n" + " Pauses resynchronization of a volume\n" ++ + "\x1B\x04" "//resume-sync" "\x1B\xFF" "\n" + " Resumes resynchronization of a volume\n" ++ + "\x1B\x04" "//invalidate" "\x1B\xFF" "\n" + " Invalidates the data on a local DRBD volume, thereby causing a full resynchronization of the " + "data using another node as the data source\n" ++ + "\x1B\x04" "//invalidate-remote" "\x1B\xFF" "\n" + " Invalidates the data on a DRBD peer volume, thereby causing a full resynchronization of the " + "data on a remote node, using another node as the data source\n"; +-- +2.33.1.windows.1 + diff --git a/drbd.spec b/drbd.spec index 049a2c2..7ebd162 100644 --- a/drbd.spec +++ b/drbd.spec @@ -1,7 +1,7 @@ Name: drbd Summary: DRBD user-land tools and scripts Version: 9.28.0 -Release: 12 +Release: 13 Source0: http://www.linbit.com/downloads/%{name}/utils/%{name}-utils-%{version}.tar.gz Patch0: drbd-utils-9.12.2-disable_xsltproc_network_read.patch Patch1: drbd-utils-9.15.0-make_configure-workaround.patch @@ -54,6 +54,8 @@ Patch30: backport-DRBDmon-Update-command-description-for-invalidate-im.pa Patch31: backport-DRBDmon-Add-debug-log-displays.patch Patch32: backport-DRBDmon-MDspTaskDetail-Reinitialize-information-if-t.patch Patch33: backport-DRBDmon-Version-V1R2M6.patch +Patch34: backport-DRBDmon-Add-help-text-for-new-DRBD-commands.patch +Patch35: backport-DRBDmon-Add-help-text-for-new-DRBDmon-commands.patch License: GPL-2.0-or-later ExclusiveOS: linux @@ -263,6 +265,9 @@ management utility. %systemd_preun drbd.service %changelog +* Tue Oct 29 2024 liupei - 9.28.0-13 +- DRBDmon: Add help text for new DRBD and DRBDmon commands + * Fri Oct 25 2024 liupei - 9.28.0-12 - DRBDmon: MDspTaskDetail: Reinitialize information if the selected task ID changes - DRBDmon: Version V1R2M6 -- Gitee