diff options
author | Dan McDonald <danmcd@joyent.com> | 2020-02-10 09:41:41 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-10 09:41:41 -0500 |
commit | 9173939a7392a5fbcb16cff77787c147c29e8a56 (patch) | |
tree | 969457d6ab1b6b431b1e735cc86352e1d8c2b7a1 | |
parent | 78121a0c3d633d344c4092336d357036c0e19f96 (diff) | |
download | illumos-joyent-9173939a7392a5fbcb16cff77787c147c29e8a56.tar.gz |
nfs-zone merge cleanup (#258)
Portions Contributed by: Michael Zeller <mike@mikezeller.net>
Three commits from the nfs-zone branch:
* Add sharetab to joyent zones
* Revert "OS-871 zone stuck in shutting_down - waiting for kernel thread nfsauth_refresh_thread to terminate"
* include nfs server manifest in joyent branded zones
Plus additional clean up of merge problems with illumos#11083 (nfs-zone)
-rw-r--r-- | usr/src/cmd/fs.d/nfs/mountd/mountd.c | 8 | ||||
-rw-r--r-- | usr/src/cmd/fs.d/nfs/nfsd/nfsd.c | 8 | ||||
-rw-r--r-- | usr/src/cmd/fs.d/nfs/svc/nfs-server | 1 | ||||
-rw-r--r-- | usr/src/lib/brand/joyent-minimal/zone/platform.xml | 1 | ||||
-rw-r--r-- | usr/src/lib/brand/joyent/zone/manifests | 1 | ||||
-rw-r--r-- | usr/src/lib/brand/joyent/zone/platform.xml | 1 | ||||
-rw-r--r-- | usr/src/uts/common/fs/nfs/nfs_auth.c | 1 | ||||
-rw-r--r-- | usr/src/uts/common/fs/nfs/nfs_sys.c | 3 | ||||
-rw-r--r-- | usr/src/uts/common/klm/nlm_impl.h | 1 | ||||
-rw-r--r-- | usr/src/uts/common/sys/zone.h | 3 |
10 files changed, 8 insertions, 20 deletions
diff --git a/usr/src/cmd/fs.d/nfs/mountd/mountd.c b/usr/src/cmd/fs.d/nfs/mountd/mountd.c index ed69c98daf..4ccc82f4a0 100644 --- a/usr/src/cmd/fs.d/nfs/mountd/mountd.c +++ b/usr/src/cmd/fs.d/nfs/mountd/mountd.c @@ -21,7 +21,6 @@ /* * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright 2012 Joyent, Inc. All rights reserved. * Copyright (c) 2012, 2016 by Delphix. All rights reserved. * Copyright 2016 Nexenta Systems, Inc. All rights reserved. */ @@ -488,13 +487,6 @@ main(int argc, char *argv[]) exit(1); } - /* Mountd cannot run in a non-global zone. */ - if (getzoneid() != GLOBAL_ZONEID) { - (void) fprintf(stderr, "%s: can only run in the global zone\n", - argv[0]); - exit(1); - } - if (getrlimit(RLIMIT_NOFILE, &rl) != 0) { syslog(LOG_ERR, "getrlimit failed"); } else { diff --git a/usr/src/cmd/fs.d/nfs/nfsd/nfsd.c b/usr/src/cmd/fs.d/nfs/nfsd/nfsd.c index f7d26ae716..752d143b2b 100644 --- a/usr/src/cmd/fs.d/nfs/nfsd/nfsd.c +++ b/usr/src/cmd/fs.d/nfs/nfsd/nfsd.c @@ -20,7 +20,6 @@ */ /* * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012, Joyent, Inc. All rights reserved. */ /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ @@ -177,13 +176,6 @@ main(int ac, char *av[]) exit(1); } - /* Nfsd cannot run in a non-global zone. */ - if (getzoneid() != GLOBAL_ZONEID) { - (void) fprintf(stderr, "%s: can only run in the global zone\n", - av[0]); - exit(1); - } - (void) enable_extended_FILE_stdio(-1, -1); /* diff --git a/usr/src/cmd/fs.d/nfs/svc/nfs-server b/usr/src/cmd/fs.d/nfs/svc/nfs-server index c2cb8069ed..d982829758 100644 --- a/usr/src/cmd/fs.d/nfs/svc/nfs-server +++ b/usr/src/cmd/fs.d/nfs/svc/nfs-server @@ -53,6 +53,7 @@ configure_ipfilter() # # Nothing to do if: + # - service's policy is 'use_global' # - ipfilter isn't online # - global policy is 'custom' # diff --git a/usr/src/lib/brand/joyent-minimal/zone/platform.xml b/usr/src/lib/brand/joyent-minimal/zone/platform.xml index 025d0e9d79..f227b409b3 100644 --- a/usr/src/lib/brand/joyent-minimal/zone/platform.xml +++ b/usr/src/lib/brand/joyent-minimal/zone/platform.xml @@ -51,6 +51,7 @@ opt="nodevices" type="lofs" /> <global_mount special="%R/ccs" directory="/usr/ccs" opt="nodevices" type="lofs" /> + <mount special="sharefs" directory="/etc/dfs/sharetab" type="sharefs" /> <!-- Local filesystems to mount when booting the zone --> <mount special="/proc" directory="/proc" type="proc" /> diff --git a/usr/src/lib/brand/joyent/zone/manifests b/usr/src/lib/brand/joyent/zone/manifests index 00c43b3f8e..684f4c9c4b 100644 --- a/usr/src/lib/brand/joyent/zone/manifests +++ b/usr/src/lib/brand/joyent/zone/manifests @@ -116,6 +116,7 @@ network/nfs/mapid.xml disabled network/nfs/nlockmgr.xml disabled network/nfs/rquota.xml disabled network/nfs/status.xml disabled +network/nfs/server.xml disabled network/nis/client.xml disabled network/rexec.xml disabled network/routing/legacy-routing.xml enabled diff --git a/usr/src/lib/brand/joyent/zone/platform.xml b/usr/src/lib/brand/joyent/zone/platform.xml index 5a4a960141..f07f2378e7 100644 --- a/usr/src/lib/brand/joyent/zone/platform.xml +++ b/usr/src/lib/brand/joyent/zone/platform.xml @@ -59,6 +59,7 @@ <mount special="objfs" directory="/system/object" type="objfs" /> <mount special="lxproc" directory="/system/lxproc" type="lxproc" /> <mount special="swap" directory="/etc/svc/volatile" type="tmpfs" /> + <mount special="sharefs" directory="/etc/dfs/sharetab" type="sharefs" /> <!-- Devices to create under /dev --> <device match="arp" /> diff --git a/usr/src/uts/common/fs/nfs/nfs_auth.c b/usr/src/uts/common/fs/nfs/nfs_auth.c index ee53038e7d..7ac3c3318b 100644 --- a/usr/src/uts/common/fs/nfs/nfs_auth.c +++ b/usr/src/uts/common/fs/nfs/nfs_auth.c @@ -21,7 +21,6 @@ /* * Copyright (c) 1995, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2015 Joyent, Inc. All rights reserved. * Copyright (c) 2015 by Delphix. All rights reserved. * Copyright (c) 2015 Joyent, Inc. All rights reserved. * Copyright 2018 Nexenta Systems, Inc. All rights reserved. diff --git a/usr/src/uts/common/fs/nfs/nfs_sys.c b/usr/src/uts/common/fs/nfs/nfs_sys.c index f3ad8b482e..8048d13ca3 100644 --- a/usr/src/uts/common/fs/nfs/nfs_sys.c +++ b/usr/src/uts/common/fs/nfs/nfs_sys.c @@ -22,8 +22,6 @@ /* * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. - * Copyright 2017 Joyent, Inc. - * */ /* @@ -32,6 +30,7 @@ */ /* + * Copyright 2017 Joyent, Inc. * Copyright 2018 Nexenta Systems, Inc. */ diff --git a/usr/src/uts/common/klm/nlm_impl.h b/usr/src/uts/common/klm/nlm_impl.h index 84c6d47075..68604309a2 100644 --- a/usr/src/uts/common/klm/nlm_impl.h +++ b/usr/src/uts/common/klm/nlm_impl.h @@ -460,6 +460,7 @@ struct nlm_globals { int cn_idle_tmo; /* (z) */ int grace_period; /* (z) */ int retrans_tmo; /* (z) */ + boolean_t nlm_v4_only; /* (z) */ zoneid_t nlm_zoneid; /* (c) */ kmutex_t clean_lock; /* (c) */ TAILQ_ENTRY(nlm_globals) nlm_link; /* (g) */ diff --git a/usr/src/uts/common/sys/zone.h b/usr/src/uts/common/sys/zone.h index 203326d79d..f6bfe6626d 100644 --- a/usr/src/uts/common/sys/zone.h +++ b/usr/src/uts/common/sys/zone.h @@ -53,6 +53,7 @@ #include <sys/nvpair.h> #include <sys/list.h> #include <sys/loadavg.h> +#include <sys/vnode.h> #endif /* _KERNEL */ #ifdef __cplusplus @@ -949,7 +950,7 @@ struct zsd_entry { * NOTE: Using the VN_ prefix, even though it's defined here in zone.h. * NOTE2: See above warning about ZONE_ROOTVP(). */ -#define VN_IS_CURZONEROOT(vp) (VN_CMP(vp, ZONE_ROOTVP())) +#define VN_IS_CURZONEROOT(vp) (VN_CMP(vp, ZONE_ROOTVP())) /* * Zone-safe version of thread_create() to be used when the caller wants to |