3.12.1 bz 1495858
This commit is contained in:
parent
b03a4df06f
commit
e9d8bde8fe
71
0001-cli_src_cli-cmd-parser.c.patch
Normal file
71
0001-cli_src_cli-cmd-parser.c.patch
Normal file
@ -0,0 +1,71 @@
|
|||||||
|
From 2562b1c40d790da00d218f8df30bf190f00dd41c Mon Sep 17 00:00:00 2001
|
||||||
|
From: Niels de Vos <ndevos@redhat.com>
|
||||||
|
Date: Tue, 26 Sep 2017 14:51:27 +0200
|
||||||
|
Subject: [PATCH] cli: Bypass the confirmation question creating replica 2
|
||||||
|
volume with force
|
||||||
|
|
||||||
|
When a replica 2 volume is created with the force option,
|
||||||
|
remove the warning message with the confirmation question,
|
||||||
|
whether they want to continue or not and Succeed the
|
||||||
|
volume creation.
|
||||||
|
|
||||||
|
Cherry picked from commit f449e53df7c07301b495b4ff688d165026dfd2d0:
|
||||||
|
> Change-Id: I4f3306659fa4cbf53dd8d45269a32d19ce86ac88
|
||||||
|
> BUG: 1493893
|
||||||
|
> Signed-off-by: karthik-us <ksubrahm@redhat.com>
|
||||||
|
|
||||||
|
While backporting the URL for the documentation has been adjusted as
|
||||||
|
well. This comes from commit eb2f1ab4cd which also corrects other URLs
|
||||||
|
(those are not included in this backport).
|
||||||
|
|
||||||
|
Change-Id: I4f3306659fa4cbf53dd8d45269a32d19ce86ac88
|
||||||
|
BUG: 1495858
|
||||||
|
Signed-off-by: Niels de Vos <ndevos@redhat.com>
|
||||||
|
---
|
||||||
|
cli/src/cli-cmd-parser.c | 30 +++++++++++++++++-------------
|
||||||
|
1 file changed, 17 insertions(+), 13 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/cli/src/cli-cmd-parser.c b/cli/src/cli-cmd-parser.c
|
||||||
|
index 984ce5bba..a7ebd5ce3 100644
|
||||||
|
--- a/cli/src/cli-cmd-parser.c
|
||||||
|
+++ b/cli/src/cli-cmd-parser.c
|
||||||
|
@@ -529,19 +529,23 @@ cli_cmd_volume_create_parse (struct cli_state *state, const char **words,
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
if (replica_count == 2) {
|
||||||
|
- question = "Replica 2 volumes are prone to "
|
||||||
|
- "split-brain. Use Arbiter or Replica"
|
||||||
|
- " 3 to avoid this. See: "
|
||||||
|
- " https://gluster.readthedocs.io/en/latest/Administrator%20Guide/Split%20brain%20and%20ways%20to%20deal%20with%20it/."
|
||||||
|
- "\nDo you still want to continue?\n";
|
||||||
|
- answer = cli_cmd_get_confirmation (state,
|
||||||
|
- question);
|
||||||
|
- if (GF_ANSWER_NO == answer) {
|
||||||
|
- gf_log ("cli", GF_LOG_ERROR,
|
||||||
|
- "Volume create cancelled, "
|
||||||
|
- "exiting");
|
||||||
|
- ret = -1;
|
||||||
|
- goto out;
|
||||||
|
+ if (strcmp (words[wordcount - 1], "force")) {
|
||||||
|
+ question = "Replica 2 volumes are prone"
|
||||||
|
+ " to split-brain. Use "
|
||||||
|
+ "Arbiter or Replica 3 to "
|
||||||
|
+ "avoid this. See: "
|
||||||
|
+ "http://docs.gluster.org/en/latest/Administrator%20Guide/Split%20brain%20and%20ways%20to%20deal%20with%20it/."
|
||||||
|
+ "\nDo you still want to "
|
||||||
|
+ "continue?\n";
|
||||||
|
+ answer = cli_cmd_get_confirmation (state,
|
||||||
|
+ question);
|
||||||
|
+ if (GF_ANSWER_NO == answer) {
|
||||||
|
+ gf_log ("cli", GF_LOG_ERROR,
|
||||||
|
+ "Volume create "
|
||||||
|
+ "cancelled, exiting");
|
||||||
|
+ ret = -1;
|
||||||
|
+ goto out;
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ret = dict_set_int32 (dict, "replica-count", replica_count);
|
||||||
|
--
|
||||||
|
2.13.5
|
||||||
|
|
@ -182,7 +182,7 @@ Summary: Distributed File System
|
|||||||
%if ( 0%{_for_fedora_koji_builds} )
|
%if ( 0%{_for_fedora_koji_builds} )
|
||||||
Name: glusterfs
|
Name: glusterfs
|
||||||
Version: 3.12.1
|
Version: 3.12.1
|
||||||
Release: 1%{?prereltag:.%{prereltag}}%{?dist}
|
Release: 2%{?prereltag:.%{prereltag}}%{?dist}
|
||||||
%else
|
%else
|
||||||
Name: @PACKAGE_NAME@
|
Name: @PACKAGE_NAME@
|
||||||
Version: @PACKAGE_VERSION@
|
Version: @PACKAGE_VERSION@
|
||||||
@ -201,6 +201,7 @@ Source8: glusterfsd.init
|
|||||||
%else
|
%else
|
||||||
Source0: @PACKAGE_NAME@-@PACKAGE_VERSION@.tar.gz
|
Source0: @PACKAGE_NAME@-@PACKAGE_VERSION@.tar.gz
|
||||||
%endif
|
%endif
|
||||||
|
Patch0: 0001-cli_src_cli-cmd-parser.c.patch
|
||||||
|
|
||||||
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
|
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
|
||||||
|
|
||||||
@ -675,6 +676,7 @@ This package provides the glusterfs server daemon.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n %{name}-%{version}%{?prereltag}
|
%setup -q -n %{name}-%{version}%{?prereltag}
|
||||||
|
%patch0 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%if ( 0%{?rhel} && 0%{?rhel} < 6 )
|
%if ( 0%{?rhel} && 0%{?rhel} < 6 )
|
||||||
@ -1397,6 +1399,9 @@ exit 0
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Sep 28 2017 Kaleb S. KEITHLEY <kkeithle[at]redhat.com> - 3.12.1-2
|
||||||
|
- 3.12.1 bz 1495858
|
||||||
|
|
||||||
* Mon Sep 11 2017 Kaleb S. KEITHLEY <kkeithle[at]redhat.com> - 3.12.1-1
|
* Mon Sep 11 2017 Kaleb S. KEITHLEY <kkeithle[at]redhat.com> - 3.12.1-1
|
||||||
- 3.12.1 GA
|
- 3.12.1 GA
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user