[Debian-ha-commits] [ocfs2-tools] 41/58: o2cb: unable to start o2cb service on 2.6.18-xxx kernel.

Valentin Vidic vvidic-guest at moszumanska.debian.org
Tue Jun 20 13:40:43 UTC 2017


This is an automated email from the git hooks/post-receive script.

vvidic-guest pushed a commit to branch upstream
in repository ocfs2-tools.

commit 3ea681241e032486f8be1935db442f57fb9b6516
Author: Tariq Saeed <tariq.x.saeed at oracle.com>
Date:   Tue Apr 12 12:34:53 2016 +0800

    o2cb: unable to start o2cb service on 2.6.18-xxx kernel.
    
    commit 4483004b5723("Auto setup o2cb stack as default if no stack is setup")
    refactored the code and this bug was introduce. It does not realize that on
    2.6.18-xxx kernel, there is no /sys/fs/ocfs2/cluster-stack synthetic file.
    Fix is to realize that after loading modules, if the above file does not exist,
    then use the classic stack as before. Since ocfs2_stack_o2cb don't exist
    on 2.6.18-xxx, use the modprob quite option to to suppress printing
    "FATAL: Module ocfs2_stack_o2cb not found."
    
    Signed-off-by: Tariq Saeed <tariq.x.saeed at oracle.com>
    Reviewed-by: Junxiao Bi <junxiao.bi at oracle.com>
---
 libo2cb/o2cb_abi.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/libo2cb/o2cb_abi.c b/libo2cb/o2cb_abi.c
index b72a266..6609aa4 100644
--- a/libo2cb/o2cb_abi.c
+++ b/libo2cb/o2cb_abi.c
@@ -204,6 +204,9 @@ redo:
 			o2cb_setup_stack(OCFS2_CLASSIC_CLUSTER_STACK);
 			setup_performed = 1;
 			goto redo;
+		} else {
+			current_stack = &classic_stack;
+			err = 0;
 		}
 	}
 
@@ -2615,11 +2618,12 @@ static int perform_modprobe(char *module_name)
 	pid_t child;
 	int child_status;
 
-	char *argv[3];
+	char *argv[4];
 
 	argv[0] = MODPROBE_COMMAND;
 	argv[1] = module_name;
-	argv[2] = NULL;
+	argv[2] = "-q";
+	argv[3] = NULL;
 
 	child = fork();
 	if (child == 0) {
@@ -2678,7 +2682,7 @@ redo:
 			else if (!strncmp(stack_name, classic_stack.s_name,
 						OCFS2_STACK_LABEL_LEN))
 				perform_modprobe(O2CB_KERNEL_MODULE);
-
+			modprobe_performed = 1;
 			write_single_line_file(CLUSTER_STACK_FILE, stack_name,
 					OCFS2_STACK_LABEL_LEN);
 			write_performed = 1;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-ha/ocfs2-tools.git



More information about the Debian-HA-Commits mailing list