Bug 1205592

Summary: [glusterd-snapshot] - Quorum must be computed using existing peers
Product: [Community] GlusterFS Reporter: krishnan parthasarathi <kparthas>
Component: glusterdAssignee: krishnan parthasarathi <kparthas>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: mainlineCC: amukherj, asengupt, bugs, gluster-bugs, nsathyan
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: glusterfs-3.7.0beta1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-05-14 17:27:01 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1199352    

Description krishnan parthasarathi 2015-03-25 09:30:23 UTC
Description of problem:
Volume-snapshot feature inherits the notion of quorum from the server-side quorum feature. In this feature, quorum is computed on the set of peers participating in the ongoing transaction. This is incorrect.

For e.g,
Snapshot create should fail if there are less than 50% (by default) of nodes are online in a cluster.

Let's take a storage pool made of 5 nodes. We need at least 3 nodes online for snapshot create command to succeed. But if we computed quorum on the no. of nodes participating (i.e online at the beginning of the transaction) then we would violate the pre-requisite for successful completion of snapshot-create.

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


How reproducible:


Steps to Reproduce:
1. Create a volume and start it.
2. Bring a few nodes offline, such that server-quorum* (50% default) is not met.
3. Take a volume-snapshot using snapshot-create command.


* - Server-quorum need not be configured for snapshot-create to function properly.

Actual results:
Snapshot create will succeed.

Expected results:
Snapshot create should fail.


Additional info:

Comment 1 Anand Avati 2015-03-30 09:25:40 UTC
REVIEW: http://review.gluster.org/9493 (glusterd: compute quorum on peers in cluster) posted (#4) for review on master by Krishnan Parthasarathi (kparthas)

Comment 2 Anand Avati 2015-03-30 09:25:43 UTC
REVIEW: http://review.gluster.org/9492 (glusterd: group server-quorum related code together) posted (#4) for review on master by Krishnan Parthasarathi (kparthas)

Comment 3 Anand Avati 2015-04-01 13:07:26 UTC
COMMIT: http://review.gluster.org/9492 committed in master by Kaushal M (kaushal) 
------
commit 4b18fba4064992e00cd5ebe1831afc79beab17b2
Author: Krishnan Parthasarathi <kparthas>
Date:   Tue Jan 27 15:12:03 2015 +0530

    glusterd: group server-quorum related code together
    
    Server-quorum implementation was spread in many files.  This patch
    brings them all together into a single file, namely
    glusterd-server-quorum.c. All exported functions are available via
    glusterd-server-quorum.h
    
    Change-Id: I8fd77114b5bc6b05127cb8a6a641e0295f0be7bb
    BUG: 1205592
    Signed-off-by: Krishnan Parthasarathi <kparthas>
    Reviewed-on: http://review.gluster.org/9492
    Reviewed-by: Atin Mukherjee <amukherj>
    Tested-by: Gluster Build System <jenkins.com>
    Reviewed-by: Kaushal M <kaushal>

Comment 4 Anand Avati 2015-04-01 19:05:25 UTC
REVIEW: http://review.gluster.org/10105 (mgmt/glusterd: set right definition of does_gd_meet_server_quorum()) posted (#1) for review on master by Vijay Bellur (vbellur)

Comment 5 Anand Avati 2015-04-02 05:05:34 UTC
REVIEW: http://review.gluster.org/10105 (glusterd: Fix rebase errors introduced by 4b18fba) posted (#2) for review on master by Kaushal M (kaushal)

Comment 6 Anand Avati 2015-04-02 10:10:31 UTC
COMMIT: http://review.gluster.org/10105 committed in master by Vijay Bellur (vbellur) 
------
commit 12e603bb9d8bc220eeea01c0ecc8ca63f9df4bc4
Author: Vijay Bellur <vbellur>
Date:   Thu Apr 2 00:29:59 2015 +0530

    glusterd: Fix rebase errors introduced by 4b18fba
    
    4b18fba 'glusterd: group server-quorum related code together' a
    refactoring change, introduced some errors related to usage of
    userspace-rcu lists when rebasing. This patch fixes it.
    
    Changes done include,
    - Redo changes done by
      673ba26 glusterd: Replace libglusterfs lists with liburcu lists
    - Redo changes done by
      c7785f7 glusterd: Protect the peer list and peerinfos with RCU.
    - Redo changes done by
      891c7d0 glusterd: Prevent possible deadlock due to
              glusterd_quorum_count
    
    Change-Id: I789e5bc8b209d9ed6dd951d609baa90e89817639
    BUG: 1205592
    Signed-off-by: Vijay Bellur <vbellur>
    Signed-off-by: Kaushal M <kaushal>
    Reviewed-on: http://review.gluster.org/10105
    Reviewed-by: Atin Mukherjee <amukherj>
    Reviewed-by: Niels de Vos <ndevos>
    Tested-by: Gluster Build System <jenkins.com>

Comment 7 Anand Avati 2015-04-02 10:23:28 UTC
REVIEW: http://review.gluster.org/9493 (glusterd: compute quorum on peers in cluster) posted (#5) for review on master by Kaushal M (kaushal)

Comment 8 Anand Avati 2015-04-02 17:58:18 UTC
COMMIT: http://review.gluster.org/9493 committed in master by Kaushal M (kaushal) 
------
commit f66a85a484d41e68611f68d70e458c67f484d2e1
Author: Krishnan Parthasarathi <kparthas>
Date:   Tue Jan 27 16:44:20 2015 +0530

    glusterd: compute quorum on peers in cluster
    
    ... and not on peers participating in an ongoing
    transaction.
    
    Change-Id: I6bdb80fd3bf3e7593fdf37e45a441d4a490469b8
    BUG: 1205592
    Signed-off-by: Kaushal M <kaushal>
    Reviewed-on: http://review.gluster.org/9493
    Reviewed-by: Atin Mukherjee <amukherj>
    Tested-by: Gluster Build System <jenkins.com>

Comment 9 Niels de Vos 2015-05-14 17:27:01 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-3.7.0, please open a new bug report.

glusterfs-3.7.0 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://thread.gmane.org/gmane.comp.file-systems.gluster.devel/10939
[2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user

Comment 10 Niels de Vos 2015-05-14 17:28:33 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-3.7.0, please open a new bug report.

glusterfs-3.7.0 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://thread.gmane.org/gmane.comp.file-systems.gluster.devel/10939
[2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user

Comment 11 Niels de Vos 2015-05-14 17:35:17 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-3.7.0, please open a new bug report.

glusterfs-3.7.0 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://thread.gmane.org/gmane.comp.file-systems.gluster.devel/10939
[2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user

Comment 12 Avra Sengupta 2015-07-21 07:52:21 UTC
*** Bug 1184393 has been marked as a duplicate of this bug. ***