Bug 1495858 - gluster volume create asks for confirmation for replica-2 volume even with force
Summary: gluster volume create asks for confirmation for replica-2 volume even with force
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: cli
Version: 3.12
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Niels de Vos
QA Contact:
URL:
Whiteboard:
Depends On: 1493893
Blocks: glusterfs-3.12.2
TreeView+ depends on / blocked
 
Reported: 2017-09-26 12:42 UTC by Niels de Vos
Modified: 2017-10-13 12:46 UTC (History)
5 users (show)

Fixed In Version: glusterfs-glusterfs-3.12.2
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1493893
Environment:
Last Closed: 2017-10-13 12:46:54 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

Description Niels de Vos 2017-09-26 12:42:44 UTC
+++ This bug was initially created as a clone of Bug #1493893 +++

Description of problem:

When creating dispersed volume, replica 2, cli asks for confirmation even when force is give. This is a breaking change as it used to work before and even without force, although I cannot confirm this, because we don't have 3.4 anymore.


Version-Release number of selected component (if applicable):

glusterfs-3.12.1


How reproducible:

Every time/easy.


Steps to Reproduce:

gluster volume create myvolume replica 2 transport tcp host01.example.com:/brick/myvolume host02.example.com:/brick/myvolume force
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/.
Do you still want to continue?
 (y/n)

Actual results:

GlusterFS volume not created.

Expected results:

GlusterFS volume is created at least when force is given.

Additional info:

Breaking change which breaks tooling built around cli.

--- Additional comment from Atin Mukherjee on 2017-09-20 00:27:41 EDT ---

Please note that the command you have mentioned here refers to creating a replica 2 volume (not disperse one) and that's the expected behavior. We encourage users to use arbiter or replica 3 volumes instead of replica 2 and this confirmation is in place even with a force option.

--- Additional comment from Zdenek Styblik on 2017-09-20 00:42:30 EDT ---

(In reply to Atin Mukherjee from comment #1)
> Please note that the command you have mentioned here refers to creating a
> replica 2 volume (not disperse one) and that's the expected behavior. We
> encourage users to use arbiter or replica 3 volumes instead of replica 2 and
> this confirmation is in place even with a force option.

I'm sorry, but WHAT? Alright, I understand I got terminology mixed up, but you what? Are you serious? It kind of feels like #NotABugFeature to me.

Let me repeat. You've broken backwards compatibility of CLI **EVEN** when force is provided. Since you want to encourage users, why not to document it or just a print notification and link to documentation. But to add confirmation which 1. wasn't there before and breaks stuff 2. which appears even with force makes no sense to me.

Have a good day.

--- Additional comment from Atin Mukherjee on 2017-09-20 04:26:57 EDT ---

I think your concern is valid. I'm passing down this issue to the author of the patch, Karthick. Ideally the force option should bypass this validation.

@Karthick - Would you send a patch for the same?

--- Additional comment from Worker Ant on 2017-09-21 08:50:59 CEST ---

REVIEW: https://review.gluster.org/18331 (cli: Bypass the confirmation question creating replica 2 volume with force) posted (#1) for review on master by Karthik U S (ksubrahm)

--- Additional comment from Worker Ant on 2017-09-21 14:04:25 CEST ---

REVIEW: https://review.gluster.org/18331 (cli: Bypass the confirmation question creating replica 2 volume with force) posted (#2) for review on master by Karthik U S (ksubrahm)

--- Additional comment from Worker Ant on 2017-09-22 18:01:23 CEST ---

COMMIT: https://review.gluster.org/18331 committed in master by Atin Mukherjee (amukherj) 
------
commit f449e53df7c07301b495b4ff688d165026dfd2d0
Author: karthik-us <ksubrahm>
Date:   Thu Sep 21 12:09:12 2017 +0530

    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.
    
    Change-Id: I4f3306659fa4cbf53dd8d45269a32d19ce86ac88
    BUG: 1493893
    Signed-off-by: karthik-us <ksubrahm>

Comment 1 Niels de Vos 2017-09-26 12:44:35 UTC
This problem breaks tests in the NFS-Ganesha upstream CI. Volumes fail to get created and tests are aborting before any real tests are started.

Comment 2 Worker Ant 2017-09-26 12:59:04 UTC
REVIEW: https://review.gluster.org/18396 (cli: Bypass the confirmation question creating replica 2 volume with force) posted (#1) for review on release-3.12 by Niels de Vos (ndevos)

Comment 3 Fedora Update System 2017-09-28 16:39:13 UTC
glusterfs-3.12.1-2.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2017-bd1b94309d

Comment 4 Fedora Update System 2017-10-02 00:54:07 UTC
glusterfs-3.12.1-2.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-bd1b94309d

Comment 5 Fedora Update System 2017-10-05 21:02:16 UTC
glusterfs-3.12.1-2.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report.

Comment 6 Worker Ant 2017-10-06 06:31:53 UTC
COMMIT: https://review.gluster.org/18396 committed in release-3.12 by jiffin tony Thottan (jthottan) 
------
commit 0aa823e3f52276f67591b00f364e6b8e139be036
Author: Niels de Vos <ndevos>
Date:   Tue Sep 26 14:51:27 2017 +0200

    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>
    
    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>

Comment 7 Jiffin 2017-10-13 12:46:54 UTC
This bug is getting closed because a release has been made available that should address the reported issue. In case the problem is still not fixed with glusterfs-glusterfs-3.12.2, please open a new bug report.

glusterfs-glusterfs-3.12.2 has been announced on the Gluster mailinglists [1], packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update infrastructure for your distribution.

[1] http://lists.gluster.org/pipermail/gluster-users/2017-October/032684.html
[2] https://www.gluster.org/pipermail/gluster-users/


Note You need to log in before you can comment on or make changes to this bug.