glusterfs
glusterfs copied to clipboard
protocol/server: fix the server_getspec to serve the volfiles
This commit fixes an option of serving volume files through
brick processes. While this feature is not a required feature
for any deployments using glusterd
, it would be very useful
in scenarios where glusterd is not present, eg., container usecases,
and in projects like kadalu which only deals with management layer
changes.
few changes done with this commit:
- core: Add 'EVENT_SIGHUP' event to notify framework
- make
volfile
based process also handle SIGHUP - add port parsing along with server, so we can have process hosted in any port
- test to demonstrate all this.
Updates: #3635, #3668 Change-Id: I5c8dfdee7d06b8d5fced4cc99059dfd8bed65260 Signed-off-by: Amar Tumballi [email protected]
CLANG-FORMAT FAILURE: Before merging the patch, this diff needs to be considered for passing clang-format
index ab21d8c5f..5e0a51f2f 100644
--- a/xlators/protocol/server/src/server-handshake.c
+++ b/xlators/protocol/server/src/server-handshake.c
@@ -66,7 +66,8 @@ server_getspec(rpcsvc_request_t *req)
goto out;
}
- /* By default, the behavior is not to return anything if specific option is not set */
+ /* By default, the behavior is not to return anything if specific option is
+ * not set */
if (!conf->volfile_dir) {
ret = -1;
op_errno = ENOTSUP;
/run regression
1 test(s) failed ./tests/basic/changelog/changelog-api.t
1 test(s) generated core ./tests/basic/changelog/changelog-api.t
6 test(s) needed retry ./tests/000-flaky/basic_mount-nfs-auth.t ./tests/000-flaky/bugs_nfs_bug-1116503.t ./tests/000-flaky/glusterd-restart-shd-mux.t ./tests/basic/afr/ta-shd.t ./tests/basic/all_squash.t ./tests/basic/changelog/changelog-api.t
3 flaky test(s) marked as success even though they failed ./tests/000-flaky/basic_mount-nfs-auth.t ./tests/000-flaky/bugs_nfs_bug-1116503.t ./tests/000-flaky/glusterd-restart-shd-mux.t https://build.gluster.org/job/gh_centos7-regression/2746/
CLANG-FORMAT FAILURE: Before merging the patch, this diff needs to be considered for passing clang-format
index ab21d8c5f..5e0a51f2f 100644
--- a/xlators/protocol/server/src/server-handshake.c
+++ b/xlators/protocol/server/src/server-handshake.c
@@ -66,7 +66,8 @@ server_getspec(rpcsvc_request_t *req)
goto out;
}
- /* By default, the behavior is not to return anything if specific option is not set */
+ /* By default, the behavior is not to return anything if specific option is
+ * not set */
if (!conf->volfile_dir) {
ret = -1;
op_errno = ENOTSUP;
/run regression
/run regression
1 test(s) failed ./tests/line-coverage/cli-negative-case-and-function-coverage.t
0 test(s) generated core
8 test(s) needed retry ./tests/000-flaky/basic_mount-nfs-auth.t ./tests/000-flaky/bugs_nfs_bug-1116503.t ./tests/000-flaky/glusterd-restart-shd-mux.t ./tests/basic/quick-read-with-upcall.t ./tests/bugs/glusterd/brick-order-check-add-brick.t ./tests/bugs/replicate/bug-1101647.t ./tests/bugs/replicate/bug-1250170-fsync.t ./tests/line-coverage/cli-negative-case-and-function-coverage.t
3 flaky test(s) marked as success even though they failed ./tests/000-flaky/basic_mount-nfs-auth.t ./tests/000-flaky/bugs_nfs_bug-1116503.t ./tests/000-flaky/glusterd-restart-shd-mux.t https://build.gluster.org/job/gh_centos7-regression/2750/
/run regression
1 test(s) failed ./tests/basic/distribute/spare_file_rebalance.t
0 test(s) generated core
12 test(s) needed retry ./tests/000-flaky/basic_distribute_rebal-all-nodes-migrate.t ./tests/000-flaky/basic_mount-nfs-auth.t ./tests/000-flaky/bugs_distribute_bug-1117851.t ./tests/000-flaky/bugs_distribute_bug-1122443.t ./tests/000-flaky/bugs_glusterd_bug-857330/normal.t ./tests/000-flaky/bugs_glusterd_bug-857330/xml.t ./tests/000-flaky/bugs_nfs_bug-1116503.t ./tests/000-flaky/glusterd-restart-shd-mux.t ./tests/00-geo-rep/georep-basic-dr-tarssh-arbiter.t ./tests/basic/afr/granular-esh/cli.t ./tests/basic/afr/sparse-file-self-heal.t ./tests/basic/distribute/spare_file_rebalance.t
6 flaky test(s) marked as success even though they failed ./tests/000-flaky/basic_distribute_rebal-all-nodes-migrate.t ./tests/000-flaky/basic_mount-nfs-auth.t ./tests/000-flaky/bugs_distribute_bug-1117851.t ./tests/000-flaky/bugs_glusterd_bug-857330/normal.t ./tests/000-flaky/bugs_glusterd_bug-857330/xml.t ./tests/000-flaky/bugs_nfs_bug-1116503.t https://build.gluster.org/job/gh_centos7-regression/2770/
CLANG-FORMAT FAILURE: Before merging the patch, this diff needs to be considered for passing clang-format
index ab21d8c5f..5e0a51f2f 100644
--- a/xlators/protocol/server/src/server-handshake.c
+++ b/xlators/protocol/server/src/server-handshake.c
@@ -66,7 +66,8 @@ server_getspec(rpcsvc_request_t *req)
goto out;
}
- /* By default, the behavior is not to return anything if specific option is not set */
+ /* By default, the behavior is not to return anything if specific option is
+ * not set */
if (!conf->volfile_dir) {
ret = -1;
op_errno = ENOTSUP;
/run regression
1 test(s) failed ./tests/bugs/replicate/bug-1586020-mark-dirty-for-entry-txn-on-quorum-failure.t
0 test(s) generated core
4 test(s) needed retry ./tests/000-flaky/basic_afr_split-brain-favorite-child-policy.t ./tests/basic/quick-read-with-upcall.t ./tests/bugs/glusterd/check_elastic_server.t ./tests/bugs/replicate/bug-1586020-mark-dirty-for-entry-txn-on-quorum-failure.t https://build.gluster.org/job/gh_centos7-regression/2814/
/run full regression
CLANG-FORMAT FAILURE: Before merging the patch, this diff needs to be considered for passing clang-format
index ab21d8c5f..5e0a51f2f 100644
--- a/xlators/protocol/server/src/server-handshake.c
+++ b/xlators/protocol/server/src/server-handshake.c
@@ -66,7 +66,8 @@ server_getspec(rpcsvc_request_t *req)
goto out;
}
- /* By default, the behavior is not to return anything if specific option is not set */
+ /* By default, the behavior is not to return anything if specific option is
+ * not set */
if (!conf->volfile_dir) {
ret = -1;
op_errno = ENOTSUP;
/run regression
0 test(s) failed
1 test(s) generated core ./tests/bugs/heal-symlinks.t
2 test(s) needed retry ./tests/basic/distribute/phase1-migration-fops.t ./tests/bugs/heal-symlinks.t https://build.gluster.org/job/gh_centos7-regression/2864/
/run regression
/run regression
@mohit84 do you want to check this PR ?
/run regression
/run regression
LGTM