glusterfs icon indicating copy to clipboard operation
glusterfs copied to clipboard

protocol/server: fix the server_getspec to serve the volfiles

Open amarts opened this issue 2 years ago • 16 comments

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]

amarts avatar Aug 26 '22 03:08 amarts

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;

gluster-ant avatar Aug 26 '22 03:08 gluster-ant

/run regression

amarts avatar Aug 26 '22 04:08 amarts

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/

gluster-ant avatar Aug 26 '22 05:08 gluster-ant

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;

gluster-ant avatar Aug 26 '22 14:08 gluster-ant

/run regression

amarts avatar Aug 26 '22 15:08 amarts

/run regression

amarts avatar Aug 27 '22 06:08 amarts

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/

gluster-ant avatar Aug 27 '22 11:08 gluster-ant

/run regression

amarts avatar Aug 30 '22 17:08 amarts

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/

gluster-ant avatar Aug 31 '22 07:08 gluster-ant

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;

gluster-ant avatar Sep 07 '22 06:09 gluster-ant

/run regression

amarts avatar Sep 07 '22 07:09 amarts

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/

gluster-ant avatar Sep 07 '22 10:09 gluster-ant

/run full regression

amarts avatar Sep 07 '22 11:09 amarts

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;

gluster-ant avatar Sep 08 '22 06:09 gluster-ant

/run regression

amarts avatar Sep 15 '22 05:09 amarts

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/

gluster-ant avatar Sep 15 '22 08:09 gluster-ant

/run regression

amarts avatar Sep 22 '22 05:09 amarts

/run regression

amarts avatar Oct 17 '22 11:10 amarts

@mohit84 do you want to check this PR ?

xhernandez avatar Oct 17 '22 11:10 xhernandez

/run regression

amarts avatar Oct 17 '22 18:10 amarts

/run regression

amarts avatar Oct 19 '22 03:10 amarts

LGTM

xhernandez avatar Oct 19 '22 07:10 xhernandez