summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* glusterfsd, libglusterfs, rpc: prefer libglusterfs time APIDmitry Antipov2020-09-074-7/+7
| | | | | | | | Use timespec_now_realtime() rather than clock_gettime(). Change-Id: I8fa00b7c0f7b388305c7d19574be3b409db68558 Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru> Updates: #1002
* build: extend --enable-valgrind to support Memcheck and DRDDmitry Antipov2020-09-0512-41/+140
| | | | | | | | | Extend '-enable-valgrind' to '--enable=valgrind[=memcheck,drd]' to enable Memcheck or DRD Valgrind tool, respectively. Change-Id: I80d13d72ba9756e0cbcdbeb6766b5c98e3e8c002 Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru> Updates: #1002
* libglusterfs: fix dict leakRavishankar N2020-09-044-10/+30
| | | | | | | | | | | | | | Problem: gf_rev_dns_lookup_cached() allocated struct dnscache->dict if it was null but the freeing was left to the caller. Fix: Moved dict allocation and freeing into corresponding init and fini routines so that its easier for the caller to avoid such leaks. Updates: #1000 Change-Id: I90d6a6f85ca2dd4fe0ab461177aaa9ac9c1fbcf9 Signed-off-by: Ravishankar N <ravishankar@redhat.com>
* glusterd: use after free (coverity issue)nik-redhat2020-09-041-2/+3
| | | | | | | | | | | | | | | | | | Issue: dict_unref is called on the same dict again, in the out label of the code, which causes the use after free issue. Fix: Set the dict to NULL after unref, to avoid use after free issue. CID: 1430127 Updates: #1060 Change-Id: Ide9a5cbc5f496705c671e72b0260da6d4c06f16d Signed-off-by: nik-redhat <nladha@redhat.com>
* glusterd: cksum mismatch on upgrading to latest glusternik-redhat2020-09-041-0/+9
| | | | | | | | | | | | | | | | | | | | | | Issue: In gluster versions less than 7, the checksums were calculated whether or not the quota is enabled or not, and that cksum value was also getting stored in the quota.cksum file. But, from gluster 7 version onwards cksum was calculated only if the quota is enabled. Due to this, the cksums in quota.cksum files differ after upgrading. Fix: Added a check to see if the OP_VERSION is less than 7 then, follow the previous method otherwise, move as per the latest changes for cksum calculation. This changes for the cksum calculation was done in this commit : https://github.com/gluster/glusterfs/commit/3b5eb592f5 Fixes: #1332 Change-Id: I7a95e5e5f4d4be4983fb7816225bf9187856c003 Signed-off-by: nik-redhat <nladha@redhat.com>
* core: Avoid dict OR key is NULL message in brick logsMohit Agrawal2020-09-041-1/+1
| | | | | | | | | | | | | | Problem: At the time of mount a volume server_first_lookup call's syncop_lookup with a NULL xattr so index_lookup is throwing a message at the time of fetching "link-count" from a dictionary Solution: Call dict_get_str_sizen instead of calling dict_get_str to avoid a warning message Fixes: #1464 Change-Id: I2b1ee3123ab817fa09f3abe39998c0d66ac0b824 Signed-off-by: Mohit Agrawal <moagrawa@redhat.com>
* cluster/ec: Don't trigger heal for stale indexPranith Kumar K2020-09-041-0/+1
| | | | | | Fixes: #1385 Change-Id: I3609dd2e1f63c4bd6a19d528b935bf5b05443824 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
* build: Added dependency for glusterfs-selinuxRinku Kothiya2020-09-031-0/+3
| | | | | | | Fixes: #1442 Change-Id: I7d79bceff329db4d525bc8a77ba7ffe41bf53c97 Signed-off-by: Rinku Kothiya <rkothiya@redhat.com>
* Events: Fixing coverity issues.Srijan Sivakumar2020-09-031-3/+5
| | | | | | | | | | Fixing resource leak reported by coverity scan. CID: 1431237 Change-Id: I2bed106b3dc4296c50d80542ee678d32c6928c25 Updates: #1060 Signed-off-by: Srijan Sivakumar <ssivakum@redhat.com>
* Revert "dht: optimize rebalance crawl path"Pranith Kumar K2020-09-034-524/+5
| | | | | | | | | | | Based on the discussion on the issue, it is decided that it is better to not have this implementation of the feature. This reverts commit 3af9443c770837abe4f54db399623380ab9767a7. Change-Id: I4e3bf18fc376cdb0cf29f1d98a915deca17c3496 Updates: #1422 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
* cluster/ec: Change stale index handlingPranith Kumar K2020-08-271-9/+5
| | | | | | | | | | | | | Problem: Earlier approach is setting dirty bit which requires extra heal Fix: Send zero-xattrop which deletes stale index without any need for extra heal. Fixes: #1385 Change-Id: I7e97a1d8b5516f7be47cae55d0e56b14332b6cae Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
* cluster/ec: Inform failure when some bricks are unavailable.Ashish Pandey2020-08-252-32/+58
| | | | | | | | | | | Provide proper information about failure when a fop fails on some of the brick. Also provide information about parent fop and the map of the bricks on which it is failing. Change-Id: If812739617df65cd146c8e667fbacff653717248 updates #1434 Signed-off-by: Ashish Pandey <aspandey@redhat.com>
* performance/md-cache: simplify and cleanup internal time managementDmitry Antipov2020-08-251-39/+31
| | | | | | | | | | | Since this xlator measures time intervals in seconds, timespec_now() may be replaced with simpler gf_time(). Consistently use time_t and uint32_t for timeouts, better error checking in mdc_reconfigure(), adjust comments and messages as well. Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru> Change-Id: I757c988e52db9d92348a900a43c617022a3d62af Updates: #1002
* debug/io-stats: simplify and cleanup internal time managementDmitry Antipov2020-08-241-45/+32
| | | | | | | | | | Except latencies, this xlator measures time intervals in seconds, so gettimeofday() may be replaced with simpler gf_time() where appropriate. Simplify io_stats_clear() as well. Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru> Change-Id: Iecaf416012da494eb4de502f915bb02ee3b4f64c Updates: #1002
* features/quota: simplify and cleanup internal time managementDmitry Antipov2020-08-242-45/+19
| | | | | | | | | | Since this xlator measures time intervals in seconds, gettimeofday() may be replaced with simpler gf_time(). Simplify and convert quota_timeout() to static as well. Change-Id: I0e042cdd759dd9fca25fcf8bc780e5fc4934f7e1 Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru> Updates: #1002
* performance/quick-read: simplify and cleanup internal time managementDmitry Antipov2020-08-222-21/+7
| | | | | | | | | Since this xlator measures time intervals in seconds, gettimeofday() may be replaced with simpler gf_time(). Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru> Change-Id: I5962771acbe8553dca51970183a55786a5289828 Updates: #1002
* features/changelog: simplify and cleanup internal time managementDmitry Antipov2020-08-224-83/+29
| | | | | | | | | | Drop extra point of failure in changelog_fill_rollover_data(), changelog_init() and reconfigure(), consistently use time_t and gf_time() where appropriate, adjust all related users. Change-Id: Id8e4236e96789cd74da5fdc3da05f0c1df98a62b Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru> Updates: #1002
* fuse: fetch arbitrary number of groups from /proc/[pid]/statusCsaba Henk2020-08-213-26/+65
| | | | | | | | | | | | | | | | | | | | | | | | | Glusterfs so far constrained itself with an arbitrary limit (32) for the number of groups read from /proc/[pid]/status (this was the number of groups shown there prior to Linux commit v3.7-9553-g8d238027b87e (v3.8-rc1~74^2~59); since this commit, all groups are shown). With this change we'll read groups up to the number Glusterfs supports in general (64k). Note: the actual number of groups that are made use of in a regular Glusterfs setup shall still be capped at ~93 due to limitations of the RPC transport. To be able to handle more groups than that, brick side gid resolution (server.manage-gids option) can be used along with NIS, LDAP or other such networked directory service (see https://github.com/gluster/glusterdocs/blob/5ba15a2/docs/Administrator%20Guide/Handling-of-users-with-many-groups.md#limit-in-the-glusterfs-protocol ). Also adding some diagnostic messages to frame_fill_groups(). Change-Id: I271f3dc3e6d3c44d6d989c7a2073ea5f16c26ee0 fixes: #1075 Signed-off-by: Csaba Henk <csaba@redhat.com>
* metadisp: new translator for data and metadata separationSheena Artrip2020-08-2125-1/+1814
| | | | | | | | | | | | | | | | | | | Summary: feature/metadisp is an xlator for performing "metadata dispersal" across multiple children. it does this by flattening the complex POSIX paths into /$GFID style paths, then forwarding the metadata operations to its first child and forwarding the data operations to its second child. The purpose of this xlator is to allow separation of data and metadata, in cases where metadata might be stored in another format (embedded kv?), on another disk (ssd), on another host (dht2). Change-Id: I392c8bd0c867a3237d144aea327323f700a2728d Updates: #816 Signed-Off-By: Sheena Artrip <sheenobu@fb.com> Tested-By: Amar Tumballi <amar@kadalu.io>
* performance/io-cache: simplify and cleanup internal time managementDmitry Antipov2020-08-213-38/+18
| | | | | | | | | | Since this xlator measures time intervals in seconds, gettimeofday() may be replaced with simpler gf_time(). Simplify and convert to static ioc_inode_need_revalidate() as well. Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru> Change-Id: Iaf13ecbf527589286ab3331c37429dd04bf6fa2c Updates: #1002
* features/locks: simplify and cleanup internal time managementDmitry Antipov2020-08-215-43/+26
| | | | | | | | | Since this xlator measures time intervals in seconds, gettimeofday() may be replaced with simpler gf_time(). Change-Id: Ib2c81376c093613124bdbed184516077cbe80dac Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru> Updates: #1002
* cluster/dht: simplify and cleanup internal time managementDmitry Antipov2020-08-215-35/+15
| | | | | | | | | | Prefer time_t and gf_time() over 'struct timeval' and gettimeofday() where microseconds are not really used, drop unneeded 'struct timeval' to 'struct timespec' conversion in dht_file_counter_thread(). Change-Id: Ibd802f79b8848df3f6175ca1fd82e93532bba38d Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru> Updates: #1002
* features/bit-rot: simplify and cleanup internal time managementDmitry Antipov2020-08-213-49/+35
| | | | | | | | | Since this xlator measures time intervals in seconds, gettimeofday() may be replaced with simpler gf_time(). Adjust comments and style as well. Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru> Change-Id: I2e5900ccb5da2478656d80e5f570487e3ba70966 Updates: #1002
* snapshot/ganesha: Modify ganesha export file while creating cloneMohammed Rafi KC2020-08-213-24/+103
| | | | | | | | | | | | | A snapshot clone is nothing but a volume, So if the ganesha is enabled for the parent volume, the clone should also have the ganesha enabled. This patch add clonename to the export file. Change-Id: I847f23e62036aee02fb9e6adbc868aec6455d86e Fixes: #1043 Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com> Signed-off-by: srijan-sivakumar <ssivakum@redhat.com>
* libglusterfs: add functions to calculate time differenceDmitry Antipov2020-08-215-14/+39
| | | | | | | | | | Add gf_tvdiff() and gf_tsdiff() to calculate the difference between 'struct timeval' and 'struct timespec' values, use them where appropriate. Change-Id: I172be06ee84e99a1da76847c15e5ea3fbc059338 Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru> Updates: #1002
* posix: Implement a janitor thread to close fdMohit Agrawal2020-08-207-26/+160
| | | | | | | | | | | | | | Problem: In the commit fb20713b380e1df8d7f9e9df96563be2f9144fd6 we use syntask to close fd but we have found the patch is reducing the performance Solution: Use janitor thread to close fd's and save the pfd ctx into ctx janitor list and also save the posix_xlator into pfd object to avoid the race condition during cleanup in brick_mux environment Change-Id: Ifb3d18a854b267333a3a9e39845bfefb83fbc092 Fixes: #1396 Signed-off-by: Mohit Agrawal <moagrawa@redhat.com>
* open-behind: fix call_frame leakXavi Hernandez2020-08-201-4/+10
| | | | | | | | | | | | | When an open was delayed, a copy of the frame was created because the current frame was used to unwind the "fake" open. When the open was actually sent, the frame was correctly destroyed. However if the file was closed before needing to send the open, the frame was not destroyed. This patch correctly destroys the frame in all cases. Change-Id: I8c00fc7f15545c240e8151305d9e4cf06d653926 Signed-off-by: Xavi Hernandez <xhernandez@redhat.com> Fixes: #1440
* dict: Remove redundant checksSheetal Pamecha2020-08-202-41/+30
| | | | | | fixes: #1428 Change-Id: I0cb1c42d620ac1aeab8da25a2e1d7835219d2e4a Signed-off-by: Sheetal Pamecha <spamecha@redhat.com>
* Remove need for /proc on FreeBSDDaniel Morante2020-08-207-4/+112
| | | | | Change-Id: Ieebd9a54307813954011ac8833824831dce6da10 Fixes: #1376
* tests: provide an option to mark tests as 'flaky'Amar Tumballi2020-08-2015-41/+57
| | | | | | | | | | | | | * also add some time gap in other tests to see if we get things properly * create a directory 'tests/000/', which can host any tests, which are flaky. * move all the tests mentioned in the issue to above directory. * as the above dir gets tested first, all flaky tests would be reported quickly. * change `run-tests.sh` to continue tests even if flaky tests fail. Reference: gluster/project-infrastructure#72 Updates: #1000 Change-Id: Ifdafa38d083ebd80f7ae3cbbc9aa3b68b6d21d0e Signed-off-by: Amar Tumballi <amar@kadalu.io>
* afr: add null check for thin-arbiter gfid.Ravishankar N2020-08-204-88/+13
| | | | | | | | | | | | | | | | | | | | | Problem: Lookup/creation of thin-arbiter ID file happens in background during mounting. On new volumes, if the ID file creation is in progress, and a FOP fails on data brick, a post-op (xattrop) is attemtped on TA. Since the TA file's gfid is null at this point, the ASSERT checks in protocol/ client causes a crash. Fix: Given that we decided to do Lookup/creation of thin-arbiter in background, fail the other AFR FOPS on TA if the ID file's gfid is null instead of winding it down to protocol/client. Also remove afr_changelog_thin_arbiter_post_op() which seems to be dead code. Updates: #763 Change-Id: I70dc666faf55cc5c8f7cf8e7d36085e4fa399c4d Signed-off-by: Ravishankar N <ravishankar@redhat.com>
* features/shard: optimization over shard lookup in case of preallocVinayakswami Hariharmath2020-08-202-7/+84
| | | | | | | | | | | | | | | | | | | | | | | | | Assume that we are preallocating a VM of size 1TB with a shard block size of 64MB then there will be ~16k shards. This creation happens in 2 steps shard_fallocate() path i.e 1. lookup for the shards if any already present and 2. mknod over those shards do not exist. But in case of fresh creation, we dont have to lookup for all shards which are not present as the the file size will be 0. Through this, we can save lookup on all shards which are not present. This optimization is quite useful in the case of preallocating big vm. Also if the file is already present and the call is to extend it to bigger size then we need not to lookup for non- existent shards. Just lookup preexisting shards, populate the inodes and issue mknod on extended size. Fixes: #1425 Change-Id: I60036fe8302c696e0ca80ff11ab0ef5bcdbd7880 Signed-off-by: Vinayakswami Hariharmath <vharihar@redhat.com>
* afr/halo: Halo is not showing any split-brain infoRafi KC2020-08-201-0/+4
| | | | | | | | | | | | heal info command uses a gfapi based daemon to fetch the split-brain info. Since they are using the same graph as client, if the latency is high then one node will be considered as down. Hence it cannot detect any split-brain info Change-Id: Id1b72f9c0e49cc0d35ad751b8a17d64da41a5d39 Fixes: #1355 Signed-off-by: Mohammed Rafi KC <rafi.kavungal@iternity.com>
* libglusterfs: cleanup --disable-mempoolDmitry Antipov2020-08-193-121/+130
| | | | | | | | | Use trivial no-op mempool if configured with --disable-mempool. Cleanup OLD_MEM_POOLS leftovers, adjust related statedumps. Change-Id: Ibaa90e538a34f6dcd216e45c05dd32d955b151f6 Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru> Fixes: #1359
* Quota quota_fsck.py, converting byte string to stringsrijan-sivakumar2020-08-191-0/+1
| | | | | | | | | | | | | | Issue: The quota_fsck.py script throws an TypeError due to the fact that the data is read as bytes and then the string operations are applied on the. Now, in python3 string is unicode and hence we get the type error. Code Changes: Decoding the bytes value into utf-8 format. Change-Id: Ia1ff52a821d664a371c8166692ff506ae39f6e40 Signed-off-by: srijan-sivakumar <ssivakum@redhat.com> Fixes: #1401
* Events: Socket creation after getaddrinfo and IPv4 and IPv6 packet capturesrijan-sivakumar2020-08-193-15/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Issue: Currently, the socket creation is done prior to getaddrinfo function being invoked. This can cause mismatch in the protocol and address families of the created socket and the result of the getaddrinfo api. Also, the glustereventsd UDP server by default only captures IPv4 packets hence IPv6 packets are not even captured. Code Changes: 1. Modified the socket creation in such a way that the parameters taken in are dependent upon the result of the getaddrinfo function. 2. Created a subclass for adding address family in glustereventsd.py for both AF_INET and AF_INET6. 3. Modified addresses in the eventsapiconf.py.in Reasoning behind the approach: 1. If we are using getaddrinfo function then socket creation should happen only after we check if we received back valid addresses. Hence socket creation should come after the call to getaddrinfo 2. The listening server which pushes the events to the webhook has to listen for both IPv4 and IPv6 messages as we would not be sure as to what address family is picked in _gf_event. Fixes: #1377 Change-Id: I568dcd1a977c8832f0fef981e1f81cac7043c760 Signed-off-by: srijan-sivakumar <ssivakum@redhat.com>
* build: add custom clean rulesDmitry Antipov2020-08-191-1/+4
| | | | | | | | | Make 'clean' and 'gitclean' even more cleaner by removing extra build leftovers. Change-Id: I9c261e1f029b8486f328aaa330f0476d44b58eac Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru> Updates: #1002
* Use sysctl for get_mem_size() on FreeBSDDaniel Morante2020-08-191-1/+1
| | | | | Change-Id: Iab2600260707af02e2b8da9e489cbb12b9fc14a6 Fixes: #1376
* Add missing links to userspace RCUDaniel Morante2020-08-191-1/+2
| | | | | Change-Id: I77519eb5ffb6a4a1f51f8c60f3fdd0eb0576c4ee Fixes: #1376
* BSD: extattr_set_link and extattr_set_fd return bytes written not 0Daniel Morante2020-08-191-2/+2
| | | | | Change-Id: I120006dab4e199ad3d3f4a5ebc9c352f3c49ea7d Fixes: #1376
* Missing link to mntent_compat for glusterdDaniel Morante2020-08-191-2/+4
| | | | | Change-Id: I5d6d38759de4492de3256995e79d01b9ed7befef Fixes: #1376
* FreeBSD patches for fuse mount utilityDaniel Morante2020-08-192-1/+9
| | | | | Change-Id: Ib2bac85c28905bb8997fbb64db2308f2a6f31720 Fixes: #1376
* glusterd: performance improvementnik-redhat2020-08-184-69/+83
| | | | | | | | | | | | | | | | | | | | | | Issue: In the glusertd_op_stage_create_volume(), fetching of values from the dict is done, whereas same values are fetched by glusterd_check_brick_order() which is called from that function. This leads to unnecssary performance overhead. Fix: Instead of fetching the values again, passing the values to the glusterd_check_brick_order() if it's fethced before, else a NULL is passed and then only fetching is done here. Also, few changes are made to the code to reduce the cost of operations such as 'fast fail' for false conditions and a bit of code clean up. Fixes: #1397 Change-Id: Ic7b523adbca8eb63ef9eb29c206e3b19e05c0815 Signed-off-by: nik-redhat <nladha@redhat.com>
* glusterd: memory deallocated twicenik-redhat2020-08-183-16/+16
| | | | | | | | | | | | | | | | | | | | | Issue: If the the pointer tmptier is destroyed in the function code it still it checks for the same in the out label. And tries to destroy the same pointer again. Fix: So, instead of passing the ptr by value, if we pass it by reference then, on making the ptr in the function the value will persist, in the calling function and next time when the gf_store_iter_destory() is called it won't try to free the ptr again. CID: 1430122 Updates: #1060 Change-Id: I019cea8e301c7cc87be792c03b58722fc96f04ef Signed-off-by: nik-redhat <nladha@redhat.com>
* glusterd: shared storage mount fails in ipv6 environmentnik-redhat2020-08-182-1/+24
| | | | | | | | | | | | | | | | | Issue: In case of ipv6 environment, the mounting of glusterd_shared_storage volume fails as it doesn't recognises the ipv6 enviornment. Fix: In case of ipv6 environment, the address-family is passed to the hooks script on creating shared-storage, then depending upon the address-family --xlator-option=transport.address-family=inet6 option is added to the mount command, and the mounting succeeds. Fixes: #1406 Change-Id: Ib1888c34d85e6c01618b0ba214cbe1f57576908d Signed-off-by: nik-redhat <nladha@redhat.com>
* libglusterfs: add library wrapper for time()Dmitry Antipov2020-08-1722-38/+48
| | | | | | | | | Add thin convenient library wrapper gf_time(), adjust related users and comments as well. Change-Id: If8969af2f45ee69c30c3406bce5baa8305fb7f80 Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru> Updates: #1002
* geo-rep: Fix string comparisonKotresh HR2020-08-171-1/+1
| | | | | | Fixes: #1438 Change-Id: If9f1c2e89e504512bcf77608fb4a4fedb19f0399 Signed-off-by: Kotresh HR <khiremat@redhat.com>
* glusterd: dump SSL error stack on disconnectLeonid Ishimnikov2020-08-131-0/+7
| | | | | | | | | | | | | | | | | Problem: When a non-SSL connection is attempted on an SSL-enabled management port, unrelated peers are subsequently disconnected from the node with a misleading error message. Cause: A non-SSL client causes OpenSSL to push a wrong version error into its thread-local error stack, but this error is never cleared, and it lingers in the stack until the thread is used by another SSL session, and a certain condition requires the error stack to be examined, at which time the old error is discovered and the connection is terminated. Solution: Log and clear the error stack upon terminating the connection. Change-Id: I82f3a723285df24dafc88850ae4fca65b69f6ae4 Fixes: #1418 Signed-off-by: Leonid Ishimnikov <lishim@fastmail.com>
* run-tests.sh: add index of the test being runAmar Tumballi2020-08-131-3/+4
| | | | | | | | | | | By showing details as (NNN / MMM) where NNN is the index and MMM is the total test count. This helps anyone looking at the console while tests are running to figure out progress. Updates: #1000 Change-Id: Id42435fada5325484d1bbc5fad8676af5dd1b5b0 Signed-off-by: Amar Tumballi <amar@kadalu.io>
* afr/split-brain: fix client side split-brain resolution when quorum is enabledMohammed Rafi KC2020-08-135-16/+173
| | | | | | | | | | | | | | | | | | Problem: If we set favourite child policy, then automatic split-brain resolution should work in all cases. This was failing when quorum count was set to a non-zero value. The initial lookup before the read txn was failing with ENOTCONN. Since we don't have a readable subvol, we were failing it. We were only looking to the split brain resolution choice set through the cli command. Fix: We will now consider the favourite child policy if split-brain choice has not been set via cli command. Change-Id: Id2016c3a90d0763ac6f1a0131571053f595576f0 Fixes: #1404 Signed-off-by: Mohammed Rafi KC <rafi.kavungal@iternity.com>