LU-20452 gss: do not require reverse DNS for SK/null mechs lgss_keyring builds a host-based GSS service name by reverse-resolving the target server NID (getnameinfo() with NI_NAMEREQD). Only Kerberos consumes that name; the SK and null mechs negotiate from their own token and never read it. So where the server NIDs have no reverse DNS, the SK/null upcall needlessly fails the lookup and aborts with -EACCES before sending any SECINIT, hanging the mount with an unbounded "negotiation: rpc err -13, gss err 0" in the client log. Build and import the service name only for LGSS_MECH_KRB5: drop lgss_get_service_str() from the SK/null-only lgssc_kr_negotiate_manual(), and move the name import in lgssc_init_nego_data() into the KRB5 arm of the mech switch. Kerberos is unchanged. Also rename lgssc_negotiation() to lgssc_negotiation_krb(): its only caller is lgssc_kr_negotiate_krb(), and the name now matches the existing lgssc_negotiation_manual(). Test-Parameters: testgroup=review-dne-selinux-ssk-part-1 Test-Parameters: testgroup=review-dne-selinux-ssk-part-2 Test-Parameters: kerberos=true testlist=sanity-krb5 Assisted-by: Claude:claude-opus-4-8 Signed-off-by: Matt Raso-Barnett <matt@thelustrecollective.com> Change-Id: I6cbe536f3a4b8bcccd9bb5ba10fc6a08fd951be5
(defect) Admitting `<fsname>-sptlrpc` here also makes mgs_erase_logs() match it: the last '-' sits exactly at strlen(fsname), so the sptlrpc rule log is now deleted by `tunefs.lustre --writeconf` and by `lctl lcfg_erase <fsname>`.
That log is the only on-disk copy of the sptlrpc rules. The MGC fetches it directly in config_log_add() (it builds `<fsname>-sptlrpc` from the regular logname), and the MGS reloads it in mgs_get_fsdb_srpc_from_llog(). Unlike the client/MDT logs it cannot be regenerated from target registration, so after a writeconf every flavour silently falls back to `null` with nothing on the console to say so.
mgs_write_log_direct_all() already carves the log out of bulk operations:
/* don't write to sptlrpc rule log */
if (strstr(dirent->mde_name, "-sptlrpc") != NULL)
goto next;
Would the same guard in mgs_erase_logs() be preferable, so the catlist fix doesn't also change writeconf semantics? If dropping the rules really is intended, could an LCONSOLE_WARN() be added at erase time so the admin knows to re-apply them?
(minor) The comment says the log is removed on exit, but `conf_param -d` only appends a rule-clearing record - `<fsname>-sptlrpc` itself stays in CONFIGS for the rest of the run. Worth rewording, since with this patch that leftover is now visible to later subtests: it shows up in test_123_prep's llog_catlist harvest, and mgs_lcfg_fork() returns -EEXIST when `<newname>-sptlrpc` already exists.
LU-20377 mgs: list sptlrpc and params logs in llog_catlist
"lctl --device MGS llog_catlist" enumerates config logs by reading
the CONFIGS directory and filtering each name through two gates:
the lu_name_in_white_list() allow-list applied in
class_dentry_readdir(), and a "name contains '-'" check in
mgs_list_logs(). Two real config logs are silently dropped:
- The sptlrpc rule log "<fsname>-sptlrpc" fails the allow-list.
The list has a bare "sptlrpc" entry, but it is an exact match
(strncmp(name, "sptlrpc", nlen)) that never matches the real
fsname-prefixed name. This is a regression from LU-11648, which
replaced a ".bak" deny-list with the allow-list (the sptlrpc log
was listed before).
- The "params" log fails the '-' check in mgs_list_logs() because
it has no hyphen, even though it passes the allow-list.
Because the allow-list is shared by every consumer of
class_dentry_readdir(), the unrecognised "<fsname>-sptlrpc" name
also hid the log from config erase (writeconf), clear_conf,
fork_lcfg and config rename, not only from catlist.
Replace the bare "sptlrpc" allow-list entry with a "-sptlrpc"
suffix match so the real log name is recognised by all consumers,
and widen the mgs_list_logs() filter to also emit the hyphen-less
"params" log while still excluding the non-llog "nodemap" and
"mountdata" entries.
Add conf-sanity test_123ak to verify "<fsname>-sptlrpc" and
"params" are listed while "nodemap"/"mountdata" are not.
Note: this also restores the pre-LU-11648 behaviour where
"tunefs.lustre --writeconf" erases the sptlrpc rule log, so sptlrpc
rules must be re-applied afterwards.
Fixes: 0fe756d0f4ab ("LU-11648 mgs: Create white list for CONFIGS directory files")
Assisted-by: Claude:claude-opus-4-8
Signed-off-by: Matt Raso-Barnett <matt@thelustrecollective.com>
Change-Id: I4d4d9ffbc2cd0e7d41abf13a3d3da0ea865e6956
LU-20452 gss: do not require reverse DNS for SK/null mechs lgss_keyring builds a host-based GSS service name by reverse-resolving the target server NID (getnameinfo() with NI_NAMEREQD). Only Kerberos consumes that name; the SK and null mechs negotiate from their own token and never read it. So where the server NIDs have no reverse DNS, the SK/null upcall needlessly fails the lookup and aborts with -EACCES before sending any SECINIT, hanging the mount with an unbounded "negotiation: rpc err -13, gss err 0" in the client log. Build and import the service name only for LGSS_MECH_KRB5: drop lgss_get_service_str() from the SK/null-only lgssc_kr_negotiate_manual(), and move the name import in lgssc_init_nego_data() into the KRB5 arm of the mech switch. Kerberos is unchanged. Also rename lgssc_negotiation() to lgssc_negotiation_krb(): its only caller is lgssc_kr_negotiate_krb(), and the name now matches the existing lgssc_negotiation_manual(). Test-Parameters: testgroup=review-dne-selinux-ssk-part-1 Test-Parameters: testgroup=review-dne-selinux-ssk-part-2 Test-Parameters: kerberos=true testlist=sanity-krb5 Assisted-by: Claude:claude-opus-4-8 Signed-off-by: Matt Raso-Barnett <matt@thelustrecollective.com> Change-Id: I6cbe536f3a4b8bcccd9bb5ba10fc6a08fd951be5
(defect) Admitting `<fsname>-sptlrpc` here also makes mgs_erase_logs() match it: the last '-' sits exactly at strlen(fsname), so the sptlrpc rule log is now deleted by `tunefs.lustre --writeconf` and by `lctl lcfg_erase <fsname>`.
That log is the only on-disk copy of the sptlrpc rules. The MGC fetches it directly in config_log_add() (it builds `<fsname>-sptlrpc` from the regular logname), and the MGS reloads it in mgs_get_fsdb_srpc_from_llog(). Unlike the client/MDT logs it cannot be regenerated from target registration, so after a writeconf every flavour silently falls back to `null` with nothing on the console to say so.
mgs_write_log_direct_all() already carves the log out of bulk operations:
/* don't write to sptlrpc rule log */
if (strstr(dirent->mde_name, "-sptlrpc") != NULL)
goto next;
Would the same guard in mgs_erase_logs() be preferable, so the catlist fix doesn't also change writeconf semantics? If dropping the rules really is intended, could an LCONSOLE_WARN() be added at erase time so the admin knows to re-apply them?
(minor) The comment says the log is removed on exit, but `conf_param -d` only appends a rule-clearing record - `<fsname>-sptlrpc` itself stays in CONFIGS for the rest of the run. Worth rewording, since with this patch that leftover is now visible to later subtests: it shows up in test_123_prep's llog_catlist harvest, and mgs_lcfg_fork() returns -EEXIST when `<newname>-sptlrpc` already exists.
LU-20377 mgs: list sptlrpc and params logs in llog_catlist
"lctl --device MGS llog_catlist" enumerates config logs by reading
the CONFIGS directory and filtering each name through two gates:
the lu_name_in_white_list() allow-list applied in
class_dentry_readdir(), and a "name contains '-'" check in
mgs_list_logs(). Two real config logs are silently dropped:
- The sptlrpc rule log "<fsname>-sptlrpc" fails the allow-list.
The list has a bare "sptlrpc" entry, but it is an exact match
(strncmp(name, "sptlrpc", nlen)) that never matches the real
fsname-prefixed name. This is a regression from LU-11648, which
replaced a ".bak" deny-list with the allow-list (the sptlrpc log
was listed before).
- The "params" log fails the '-' check in mgs_list_logs() because
it has no hyphen, even though it passes the allow-list.
Because the allow-list is shared by every consumer of
class_dentry_readdir(), the unrecognised "<fsname>-sptlrpc" name
also hid the log from config erase (writeconf), clear_conf,
fork_lcfg and config rename, not only from catlist.
Replace the bare "sptlrpc" allow-list entry with a "-sptlrpc"
suffix match so the real log name is recognised by all consumers,
and widen the mgs_list_logs() filter to also emit the hyphen-less
"params" log while still excluding the non-llog "nodemap" and
"mountdata" entries.
Add conf-sanity test_123ak to verify "<fsname>-sptlrpc" and
"params" are listed while "nodemap"/"mountdata" are not.
Note: this also restores the pre-LU-11648 behaviour where
"tunefs.lustre --writeconf" erases the sptlrpc rule log, so sptlrpc
rules must be re-applied afterwards.
Fixes: 0fe756d0f4ab ("LU-11648 mgs: Create white list for CONFIGS directory files")
Assisted-by: Claude:claude-opus-4-8
Signed-off-by: Matt Raso-Barnett <matt@thelustrecollective.com>
Change-Id: I4d4d9ffbc2cd0e7d41abf13a3d3da0ea865e6956
LU-20119 selinux: add lustre_helpers SELinux policy module On el10+ kernel-launched helpers run in kernel_t with no usable domain, so l_getsepol, l_getidentity, l_getauth, l_foreign_symlink and lctl are denied the policy and identity-lookup access they need. Add a lustre_helpers policy module transitioning them into lustre_helper_t, and granting keyutils_request_t the socket access NID resolution needs. configure enables it on el10+, overridable with --with/--without-selinux-policy. The el10.0 part-2 and el10.1-server sessions are not requested: both fail for reasons unrelated to SELinux (LU-20542, LU-16330). Test-Parameters: trivial Test-Parameters: testgroup=review-dne-selinux-ssk-part-1 clientdistro=el10.0 Test-Parameters: testgroup=review-dne-selinux-ssk-part-1 clientdistro=el10.1 Test-Parameters: testgroup=review-dne-selinux-ssk-part-2 clientdistro=el10.1 Signed-off-by: Hiroshi Nishida <hnishida@thelustrecollective.com> Change-Id: I1ad770867d2e48be9b72c128d50d2f246f79bdfe
(style) This isn't a bug, but the C changes are entirely under lustre/target/, so `target:` would be the specific component tag here. `lustre:` is normally reserved for tree-wide work (compat header cleanups, dropping old kernel support).
(minor) The body says what server_lnet_servicenode_update() registers, but not when it runs, and three code hunks are left unaccounted for. The helper is also called from tgt_import_update() and tgt_nid_notifier(), so the entry is re-published on every MGC reconnect and every LNet NID change. server_put_super() withdraws it with LNetDiscServiceNodeClear(), and has to do so after tgt_del_notifier() so a notifier worker cannot re-add it. tgt_mod_exit() turns the LNet policy back off. Could the body describe the whole registration lifecycle rather than just the initial publish?
(minor) The body describes server_lnet_servicenode_update() and the module option, but the LNet half of the change is not mentioned at all: - the new exported API LNetDiscPeerServiceRegister() / LNetDiscPeerServiceUnregister() - struct lnet_peer::lp_disc_services and struct obd_export::exp_disc_service - service names carried on struct lnet_disc_group, and the union/fold handling for them - the replacement of dvp_partition_matches_peer / dvp_partition_fallback_peer for the servicenode policy, and the new early return in lnet_servicenode_unrestricted_matches_peer() - tgt_disc_service_register() in tgt_connect(), and the exp_disc_service teardown in class_disconnect() That is most of the non-test diff. Could the body say what per-peer service context is for and how it changes Push selection, so none of those hunks reads as unrelated?
(style) This isn't a bug, but the trailer order is inverted here: Signed-off-by: normally comes before Change-Id:, and a Change-Id: appearing first usually means the Lustre commit hooks aren't installed in the working tree.
The body explains server_lnet_servicenode_update() and the `ptlrpc.target_nid_policy` knob, but roughly two thirds of the diff is a second mechanism that is never described: LNetDiscPeerServiceRegister()/LNetDiscPeerServiceUnregister(), struct lnet_peer::lp_disc_services, struct obd_export::exp_disc_service, the tgt_connect()/class_disconnect() hooks, and the dg_services[] plumbing plus the new servicenode dvp_partition_matches_peer/dvp_partition_fallback_peer/full-view handling in lib-disc-view.c. As written a reader cannot tell that the patch also binds each client export to the target it connected to, and uses that binding to pick which group view a Push carries. Could the body name those symbols and say why the binding is needed?
The body explains the target-side registration, the module option and the man page, but nothing in it covers the LNet half of the diff: the new exported LNetDiscPeerServiceRegister()/LNetDiscPeerServiceUnregister() API, struct lnet_peer::lp_disc_services and its transfer/detach at the peer merge, delete and recreate sites, dg_services/dg_alloc_nnids in struct lnet_disc_group, the prefer_service selection added to lnet_disc_view_for_push(), and the new obd_export::exp_disc_service plus the class_disconnect() hook. That is around 390 of the ~440 lines of non-test, non-doc change. Could the message describe what a peer service registration is, who owns it, and how it changes Push view selection?
(minor) Worth saying here that groups sharing a local NID are folded together. lnet_group_fold_overlapping() unions any two groups with a NID in common, so the usual case - every target on an OSS carrying the same --servicenode list - collapses to a single group, and two targets with partially overlapping lists give one group spanning the union rather than two. As written, "each target contributes one group" reads as though per-target groups stay separate.
(minor) 9770942f89 is not a commit in the tree - `git describe` for this change is v2_17_55-26-g5c9327823f, and the sha changes on every rebase anyway. For a man page added in the same patch as the parameter, this should carry just the parent tag (2.17.55), as llite.sync_on_close.4 does; the exact hash is only meaningful for a page added after the parameter landed.
(minor) Lustre man pages are expected to carry an EXAMPLES section. There is a modprobe.d snippet up in DESCRIPTION -- would it be worth promoting it into a real .SH EXAMPLES here, together with a reading of /sys/module/ptlrpc/parameters/target_nid_policy to confirm the value in force?
(minor) The PROPERTIES block stops at Config. This parameter has both a default and a closed set of accepted values, which is exactly what the remaining man4 fields are for, e.g. llite.enable_setstripe_gid(4):
.TP
.B Default
.br
.RB target_nid_policy= legacy
.TP
.B Valid Values
.br
.BR legacy " | " servicenode
Both facts are in the prose below, but a reader skimming PROPERTIES will not find them there.
(style) The other LNet servicenode entry points added by this series (LNetDiscServiceNodePolicySet(), ...Set(), ...AddNID(), ...DelNID(), ...Clear()) all carry kernel-doc with Context: and Return: in lib-disc-view.c. These two have none, and the contract is not obvious: a return of 0 with *handle left NULL means "nothing was registered", and Unregister() is NULL-safe. Worth documenting both, since callers have to handle the NULL-handle success case. The continuation lines are also one column short of the open paren (column 32 vs 33); LNetDiscServiceNodeSet() just below lines up.
(style) Not a bug, but LIBCFS_ALLOC() zeroes (LIBCFS_ALLOC_GFP uses kzalloc/vzalloc), so dg_nservices = 0 and dg_services = NULL are already true here; only dg_alloc_nnids needs setting. Similarly at line 295, LIBCFS_FREE() (and so CFS_FREE_PTR_ARRAY()) already checks for NULL, so the `if (g->dg_services)` guard can go.
LU-20290 lustre: register servicenode NIDs with LNet visibility Use the existing --servicenode target configuration to register servicenode NID membership with LNet. server_lnet_servicenode_update() publishes one entry per target, keyed on the target service name (lsi_svname), whose members are the local NIDs the mkfs failover.node list names. When ptlrpc.target_nid_policy=servicenode, Lustre enables the corresponding LNet discovery visibility policy. Servicenode grouping then determines the peer partitions advertised to clients, superseding the topology-derived self/NUMA grouping while the policy is active. Apply the same servicenode restriction to target READY notifications sent to the MGS. This keeps the IR NID table consistent with discovery visibility and prevents IR updates from reintroducing NIDs outside the target's configured servicenode. Without target_nid_policy=servicenode, servicenode information is registered but does not change legacy discovery or IR behaviour. Document the option in a new man page, including the legacy and servicenode values, where servicenode groups come from, how uncovered NIDs are advertised, and how the policy applies to IR NID publication. Add tests verifying that: - legacy discovery behaviour is preserved when the policy is disabled; - the servicenode policy partitions discovery views by servicenode; - servicenode grouping supersedes self and NUMA grouping; - a local NI not covered by a servicenode remains discoverable; - the policy is active before the first target mounts; - a Push does not fall back to the merged full view; - a target formatted with --failnode contributes no group; - IR READY notifications respect the servicenode NID restriction; - an unknown policy value stops the module load. Test-Parameters: trivial Test-Parameters: trivial testlist=conf-sanity env=ONLY="57c 57d" Test-Parameters: trivial testlist=conf-sanity env=ONLY="57e 57f" Test-Parameters: trivial testlist=conf-sanity env=ONLY="57g 57h 57i" Test-Parameters: trivial testlist=conf-sanity env=ONLY="57j 57k 57ka" Signed-off-by: Serguei Smirnov <ssmirnov@thelustrecollective.com> Signed-off-by: Chris Horn <chorn@ddn.com> Assisted-by: Claude:claude-opus-5 Change-Id: Ie43ac027950bee70317531b7c1b84742151a2df3
LU-20290 mgs: make IR NID publication configurable
During target READY notification, IR currently publishes all local
server NIDs for each target. Clients subsequently add those NIDs to a
single LNet peer via LNetAddPeer(), regardless of the target's
--servicenode configuration.
Add the ir_nid_policy module parameter to control which NIDs are
published through IR.
Supported policies are:
all Publish all local server NIDs (default).
servicenode Publish only NIDs configured for the target via
--servicenode.
The default policy preserves the existing behavior.
Test-Parameters: fortestonly
Change-Id: Iaf686dffafe3009c08fd96e955c65e559a1822be
Signed-off-by: Serguei Smirnov <ssmirnov@thelustrecollective.com>
LU-20290 lnet: add nodemap NID range discovery visibility
Add a discovery visibility policy based on Lustre nodemap NID
ranges. This allows a server to advertise only the NIDs that are
reachable by clients belonging to a visibility-enabled nodemap.
Persistent nodemaps may enable discovery visibility with the new
discovery_visibility property. Lustre publishes the configured NID
ranges to LNet as client visibility classes. For each class, LNet
builds a discovery view containing server NIDs that can reach the
LNets represented by the configured client ranges, either directly
or through an LNet route.
Clients that do not belong to a visibility-enabled nodemap continue
to use the unrestricted discovery view. Dynamic nodemaps do not
create separate discovery visibility classes and inherit the
visibility implied by their persistent parent.
Add the external_disc_visibility LNet parameter to identify discovery
visibility policies that depend on state supplied by an upper layer.
When nodemap_nidrange is required, discovery fails closed until
Lustre has published a complete nodemap visibility configuration.
Configuration changes invalidate the current policy before a
replacement is built and published, preventing an obsolete or
unrestricted view from being exposed during an update.
Nodemap visibility classes are recomposed when the server LNet
topology changes so that changes to local NIs or routing are reflected
in the advertised server NIDs.
Add conf-sanity tests covering basic nodemap NID range visibility,
multi-LNet nodemap classes, and independent visibility classes.
Example configuration:
Enable the externally supplied nodemap visibility policy when loading
LNet:
options lnet external_disc_visibility=nodemap_nidrange
Create/configure a persistent nodemap and enable discovery visibility
for it:
lctl nodemap_add tenant1
lctl nodemap_add_range --name tenant1 \
--range 10.10.0.0@tcp-10.10.255.255@tcp
lctl nodemap_modify --name tenant1 \
--property discovery_visibility --value 1
Clients whose source NIDs fall within the tenant1 ranges will then
receive only the server NIDs reachable from the LNets represented by
those ranges.
Multiple external policies may be required simultaneously, for
example:
options lnet \
external_disc_visibility=servicenode,nodemap_nidrange
Test-Parameters: trivial fortestonly testlist=conf-sanity env=ONLY="57c 57d"
Test-Parameters: trivial fortestonly testlist=conf-sanity env=ONLY="57e 57f"
Test-Parameters: trivial fortestonly testlist=conf-sanity env=ONLY="57g 57h 57i"
Test-Parameters: trivial fortestonly testlist=conf-sanity env=ONLY="57j 57k"
Test-Parameters: trivial fortestonly testlist=conf-sanity env=ONLY="57l 57m 57n"
Test-Parameters: trivial fortestonly testlist=conf-sanity env=ONLY="57o 57p 57q 57r"
Change-Id: I021f75d18e8badbb7dc0f7ca883e54d702c4962b
Signed-off-by: Serguei Smirnov <ssmirnov@thelustrecollective.com>
(minor) The gate is placed on the common LDD_F_OPC_REG path, so it also rejects a plain remount of an already-registered target that carries neither LDD_F_WRITECONF nor LDD_F_UPDATE. test_158 covers exactly that ("Existing target remount (startup ping) must also be denied"), and the in-code comment lists it too, but the subject and this paragraph only mention new registrations and post-writeconf re-registration.
Could the body name the remount case as well? It is the one an admin is most likely to hit after enabling nodemaps.
(defect) mgs_check_index() opens with
LASSERT(!(mti->mti_flags & LDD_F_NEED_INDEX));
and the two lines above only OR in LDD_F_WRITECONF, they never clear LDD_F_NEED_INDEX. So an mti that arrives with that flag set now LBUGs the MGS here.
Before this patch the call was inside `if (!allow_register)`, and allow_register defaults to ALLOW_REGISTER_UNLIMITED (class_obd.c), so the default path never reached it. The other call site, mgs_check_target(), is guarded by `!(mti_flags & (LDD_F_WRITECONF | LDD_F_UPDATE))`, which cannot be true once WRITECONF has been added just above. Moving the call out of the allow_register block makes the assertion reachable on every registration.
mti_flags is unvalidated wire data from the registering node, and LDD_F_NEED_INDEX is a value the MGS otherwise still honours - mgs_set_index() in mgs_llog.c picks a free index for it. Current mount.lustre refuses to mount such a device locally, but that is the peer's own check, not the MGS's, and it is the peer this patch is trying not to trust.
Would clearing the flag before the call work?
if (mti->mti_flags & LDD_F_NEED_INDEX)
mti->mti_flags |= LDD_F_WRITECONF;
if (!(mti->mti_flags & LDD_F_NEED_INDEX))
rc = mgs_check_index(...);
or returning -EINVAL for that flag instead of asserting on it.
Looks like this should be fixed.
(defect) The comment above says every LDD_F_OPC_REG must come from a trusted nodemap, but by the time the check runs the untrusted peer has already changed MGS state: - line 497 sets `b_fsdb->fsdb_barrier_disabled = 1` when an MDT registration arrives without OBD_CONNECT_BARRIER. That is sticky for the lifetime of the fsdb and makes `lctl barrier_freeze` return -EOPNOTSUPP (mgs_barrier.c). Both mti_flags and the connect flags come from the peer, so a rejected node can still turn off the write barrier for a filesystem it names. - mgs_find_or_make_fsdb() has been called twice for peer-supplied names (barrier_name above, mti_fsname via mgs_check_index()). - and the LASSERT noted on line 504 fires before the peer is ever rejected. Moving the nodemap check up to just after the `opc != LDD_F_OPC_REG` test would close all three: nothing the peer supplies gets acted on until it is known to be trusted.
Looks straight forward enough and resolves both issues.
(minor) Not a bug today, but `rc` now has to carry the mgs_check_index() result across ~60 lines that include a block which writes `rc` itself (`rc = PTR_ERR(nodemap)` above). It only works because that assignment is immediately followed by a GOTO. If the patch is refreshed, a separate `int index_rc` would make the intent obvious and stop a later edit in the nodemap block from silently changing what mgs_check_target() sees.
LU-18856 mgs: Add nodemap security check for new target registration This patch adds nodemap-based security checks to ensure MDT/OST registration is only allowed from nodes associated with trusted nodemaps (either by NID or by GSS identification). mgs_check_index() is now called unconditionally for every target registration instead of only when allow_register is disabled, and its result is passed into mgs_check_target() rather than being looked up again. The allow_register denial is kept, but is now keyed on the index-check result (rc == 0) rather than being nested inside the "if (!allow_register)" block. This includes both new target registrations as well as existing targets re-registering after a writeconf. Added test_158 to verify the functionality. Change-Id: If29a302d39dc083e73e69cb072ef76b6005df644 Signed-off-by: Chakshu Kansal <ckansal@ddn.com> Signed-off-by: Oleg Drokin <green@whamcloud.com>
| failed enforced test | platform | detail | |
|---|---|---|---|
| review-ldiskfs-dne-arm | RHEL 8.10 / x86_64, Rocky 9.5 / aarch64 | ran 5 tests. 1 tests failed: sanity. | session |
(defect?) Does this strand the peer on ln_dc_working?
LU-20290 lnet: add MT-aware filtered discovery visibility
Add support for server-side multi-tenant discovery visibility control
in LNet.
Introduce static MT group configuration allowing server lnets to be
partitioned into named visibility groups.
Discovery and push payloads are filtered according to the requester
visibility domain:
- admin networks receive full server NI visibility
- tenant networks receive only server NIDs belonging to the same
tenant group
- unclassified networks are handled according to configurable
policy (relaxed/strict/forbidden)
This is intended to support multi-tenant server deployments where
clients must not discover or receive push updates containing server
NIDs belonging to other tenant domains or backend/admin networks.
Add MT-aware ping views and selection logic for discovery GETs and
push updates while preserving legacy behavior when MT configuration
is not enabled.
New module parameters:
lnet_mt_groups=
Configure named MT visibility groups.
Syntax:
"<group>:<net>[,<net>...];<group>:<net>..."
Example:
"admin:tcp0,o2ib0;tenant01:tcp1;tenant02:tcp2"
The reserved group name "admin" defines trusted networks
which receive full discovery visibility.
lnet_mt_unclassified_policy=
Configure handling for networks not belonging to any MT group.
Values:
relaxed
Unclassified networks may discover all unclassified
server NIDs.
strict
Unclassified networks may discover only server NIDs
belonging to the same local net.
forbidden
Discovery responses and push visibility are denied
for unclassified networks.
Default:
strict
Test-Parameters: trivial testlist=sanity-lnet
Change-Id: I750174e92a09e8a8ab13f382081914b32ef18d86
Signed-off-by: Serguei Smirnov <ssmirnov@thelustrecollective.com>
LU-20384 ptlrpc: fix sptlrpc per-network flavor matching
sptlrpc_rule_set_choose() compared the peer's 16-bit net number
(nid->nid_num) against a rule's full 32-bit net id (sr_netid),
so for any real LND they never matched. This means any per-network
srpc.flavor rule was skipped and only the default rule applied.
Restore the comparison to use full netids with
LNET_NID_NET(nid), as was the behaviour before LU-10391.
Add sanity-sec.sh test_201, which installs a per-network
cli2mdt rule that differs from the default and asserts the
per-network flavor is applied.
Fixes: 80a4a2ebe0a2 ("LU-10391 ptlrpc: switch sptlrpc_rule_set_choose to large nid")
Test-Parameters: testlist=sanity-sec env=ONLY=201,SHARED_KEY=true
Test-Parameters: testgroup=review-dne-selinux-ssk-part-1
Test-Parameters: testgroup=review-dne-selinux-ssk-part-2
Assisted-by: Claude:claude-opus-4-8
Signed-off-by: Matt Raso-Barnett <matt@thelustrecollective.com>
Change-Id: I36c5e230a5b0a3c17397149b3d88a16d8b1587fb
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/67012
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: wangdi <wddi218@gmail.com>
Reviewed-by: Chris Horn <chorn@ddn.com>
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Tested-by: Maloo <maloo@whamcloud.com>