Description of problem: ------------------------ If a file in data/metadata/entry split-brain is attempted to be healed using the `gluster volume heal <vol-name> split-brain' command, the heal fails if the respective data/metadata/entry self-heal volume option is turned off. This should not be the case, as glfsheal should not take these options into consideration. See below, sample output of the command - # gluster v heal rep2 split-brain source-brick 10.70.37.134:/rhs/brick6/b1/ /bar Healing /bar failed: File not in split-brain. Volume heal failed. # gluster v heal rep2 split-brain bigger-file /bar Healing /bar failed: File not in split-brain. Volume heal failed. Volume configuration - # gluster v info rep2 Volume Name: rep2 Type: Replicate Volume ID: 0bf8fb07-8b09-4be8-94e7-29f4d3d7632f Status: Started Number of Bricks: 1 x 2 = 2 Transport-type: tcp Bricks: Brick1: 10.70.37.208:/rhs/brick6/b1 Brick2: 10.70.37.134:/rhs/brick6/b1 Options Reconfigured: cluster.entry-self-heal: off cluster.data-self-heal: off cluster.metadata-self-heal: off cluster.self-heal-daemon: off features.uss: on features.quota-deem-statfs: on features.inode-quota: on features.quota: on performance.readdir-ahead: on Version-Release number of selected component (if applicable): -------------------------------------------------------------- glusterfs-3.7.1-3.el6rhs.x86_64 How reproducible: ------------------ 100% Steps to Reproduce: -------------------- 1. Set the following options on a 1x2 volume - cluster.entry-self-heal: off cluster.data-self-heal: off cluster.metadata-self-heal: off cluster.self-heal-daemon: off 2. Kill one brick of the replica set. 3. From the mount write to an existing file, or perform metadata operations like chmod. 4. Start the volume with force. 5. Kill the other brick in the replica set. 6. Perform data/metadata operations on the same file. 7. Start the volume with force and try to heal the now split-brained file using the above mentioned CLI. Actual results: ---------------- Heal fails. Expected results: ------------------ Heal is expected to succeed. Additional info:
Heal also fails when trying to resolve split-brain from the client by setting extended attributes, when the data/metadata self-heal options are turned off. With the options turned on, heal works as expected. This needs to be fixed too as part of this BZ.
The bug in the description needs to be fixed. After the initial discussion with Shruti, I was giving some more thought to the expected behaviour for comment #1 It seems to me that if the client side heal options are disabled via volume set, then split-brain healing from mount (via setfattr interface) should also honour that. i.e. it should not heal the file. If a particular client wants to override the heal options which are disabled on an entire volume basis, it can always mount the volume with the heal options enabled as fuse mount options. ( --xlator-option *replicate*.data-self-heal=on etc.)
LGTM.
Closing this as a duplicate of 1403840 since it has all acks and the problem/steps to verify the fix are the same. *** This bug has been marked as a duplicate of bug 1403840 ***