[Devel] [PATCH RHEL8 COMMIT] ve/nfsd: don't disable UMH client tracker globally due to single Container misconfiguration
Konstantin Khorenko
khorenko at virtuozzo.com
Wed Jun 2 19:48:10 MSK 2021
The commit is pushed to "branch-rh8-4.18.0-240.1.1.vz8.5.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh8-4.18.0-240.1.1.vz8.5.34
------>
commit 57caf07ea23c9b2dfbc4135d42d18974368b6be3
Author: Vasily Averin <vvs at virtuozzo.com>
Date: Wed Jun 2 19:48:10 2021 +0300
ve/nfsd: don't disable UMH client tracker globally due to single Container misconfiguration
If UMH client tracker fails to init in a single Container due to, for
example, corrupted "/sbin/nfsdcltrack" binary, currently UMH client
tracker is disabled globally on the node as it's not virtualized.
Let's print a ratelimited warning instead, but don't disable the UMH
tracker.
Fixes: vz8: 182ddb5cb6a2 ("ve/nfsd: enable UMH client tracker in a container")
https://jira.sw.ru/browse/PSBM-102363
Signed-off-by: Konstantin Khorenko <khorenko at virtuozzo.com>
(cherry picked from vz7 commit 2f5f5e585b0b ("ve/nfsd: don't disable UMH client
tracker globally due to single Container misconfiguration")
Signed-off-by: Vasily Averin <vvs at virtuozzo.com>
---
fs/nfsd/nfs4recover.c | 23 +++++++++++++----------
1 file changed, 13 insertions(+), 10 deletions(-)
diff --git a/fs/nfsd/nfs4recover.c b/fs/nfsd/nfs4recover.c
index cd73239f9298..6b7b3060fb73 100644
--- a/fs/nfsd/nfs4recover.c
+++ b/fs/nfsd/nfs4recover.c
@@ -1810,6 +1810,7 @@ nfsd4_cltrack_grace_start(time64_t grace_start)
static int
nfsd4_umh_cltrack_upcall(char *cmd, char *arg, char *env0, char *env1)
{
+ struct ve_struct *ve;
char *envp[3];
char *argv[4];
int ret;
@@ -1833,18 +1834,20 @@ nfsd4_umh_cltrack_upcall(char *cmd, char *arg, char *env0, char *env1)
argv[2] = arg;
argv[3] = NULL;
- ret = call_usermodehelper_ve(get_exec_env(), argv[0], argv, envp, UMH_WAIT_PROC);
+ ve = get_exec_env();
+ ret = call_usermodehelper_ve(ve, argv[0], argv, envp, UMH_WAIT_PROC);
/*
- * Disable the upcall mechanism if we're getting an ENOENT or EACCES
- * error. The admin can re-enable it on the fly by using sysfs
- * once the problem has been fixed.
+ * - NFSd can be running inside Containers
+ * - "cltrack_prog" is not virtualized
+ * => let's don't disable UMH client tracking for all NFS servers
+ * on the whole Node due to a single incorrect Container
*/
- if (ret == -ENOENT || ret == -EACCES) {
- dprintk("NFSD: %s was not found or isn't executable (%d). "
- "Setting cltrack_prog to blank string!",
- cltrack_prog, ret);
- cltrack_prog[0] = '\0';
- }
+ if (ret == -ENOENT || ret == -EACCES)
+ ve_pr_warn_ratelimited(VE_LOG_BOTH,
+ "NFSD: %s was not found or isn't executable (%d) "
+ "in CT#%s\n",
+ cltrack_prog, ret, ve_name(ve));
+
dprintk("%s: %s return value: %d\n", __func__, cltrack_prog, ret);
return ret;
More information about the Devel
mailing list