Whamcloud - gitweb
LU-3527 nodemap: add nodemap kernel module 34/8034/16
authorJoshua Walgenbach <jjw@iu.edu>
Thu, 28 Nov 2013 20:18:53 +0000 (21:18 +0100)
committerOleg Drokin <oleg.drokin@intel.com>
Fri, 10 Jan 2014 21:06:26 +0000 (21:06 +0000)
commitae295503f53e867e11dc51b217f336e8b20d119f
treeeb6ecb25a896ce2743d5ae147bdf0c4761657b40
parentda12d3ba35bbb86c8e5860a5ed161a55f01b69d5
LU-3527 nodemap: add nodemap kernel module

The nodemap kernel module manages groups of mounted clients
and allows policies to be applied to them. A nodemap will be
defined as a nodemap name, and id, a tree of NID ranges that
represents the clients that are included in the nodemap, and
values that represent a policy for the behavior of the
filesystem with respect to those clients.

Initially, the policies implemented for nodemap will be static
UID/GID mapping from client IDs to a canonical filesystem IDs.
Additional flags are provided to allow the filesystem to trust
the IDs from the client (apply no mapping) and allow UID 0
(rootsquash applied to an entire nodemap).

A default nodemap is automatically provided which implicitly
contains all the clients not otherwise specified by an NID
range.

Nodemap will allow the unmapped UID/GIDs to be specified on a
case by case basis.

Nodemaps will be managed on the MGS, and configurations pushed
out the the other servers in the filesystem.

This patch adds nodemap to the build system, and defines the
basic operation for managing the addition and deletion of
the nodemap definitions.

The ioctl for management of the nodemaps from userspace was
added. The commands for adding and removing nodemaps were
added to lctl, and the handlers in the mgs.

The data structures for the module were added in
lustre/include/lustre_nodemap.

Additions were made to the make system and the m4 macros
to build nodemap with the rest of lustre.

Unit tests for adding and removing nodemaps were added
to sanity-sec.sh.

Range and idmap management functions will be added in the
two subsquent patches.

Signed-off-by: Joshua Walgenbach <jjw@iu.edu>
Change-Id: I2d34fde7aae3c2b4af512ff2c1ace5115ed40a6a
Reviewed-on: http://review.whamcloud.com/8034
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Andrew Perepechko <andrew_perepechko@xyratex.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
27 files changed:
config/lustre-build.m4
lustre/Makefile.in
lustre/autoMakefile.am
lustre/autoconf/lustre-core.m4
lustre/include/Makefile.am
lustre/include/lustre/lustreapi.h
lustre/include/lustre_cfg.h
lustre/include/lustre_export.h
lustre/include/lustre_lib.h
lustre/include/lustre_nodemap.h [new file with mode: 0644]
lustre/mgs/mgs_handler.c
lustre/mgs/mgs_internal.h
lustre/mgs/mgs_llog.c
lustre/nodemap/Makefile.in [new file with mode: 0644]
lustre/nodemap/autoMakefile.am [new file with mode: 0644]
lustre/nodemap/nodemap_handler.c [new file with mode: 0644]
lustre/nodemap/nodemap_internal.h [new file with mode: 0644]
lustre/nodemap/nodemap_lproc.c [new file with mode: 0644]
lustre/tests/sanity-sec.sh
lustre/tests/test-framework.sh
lustre/utils/Makefile.am
lustre/utils/lctl.c
lustre/utils/liblustreapi.c
lustre/utils/liblustreapi_nodemap.c [new file with mode: 0644]
lustre/utils/lustreapi_internal.h
lustre/utils/obd.c
lustre/utils/obdctl.h