[LU-8829] 'default' Secure RPC rule display issue Created: 11/Nov/16 Updated: 17/Nov/16 Resolved: 17/Nov/16 |
|
| Status: | Resolved |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | Lustre 2.9.0 |
| Fix Version/s: | Lustre 2.9.0 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Nathan Lavender (Inactive) | Assignee: | John Hammond |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Severity: | 3 |
| Rank (Obsolete): | 9223372036854775807 |
| Description |
|
Adding a default secure RPC rule followed by a rule for a specific network changes how the initial default rule is displayed when viewed with 'lctl get_param mgs.*.live.testfs' == mgs# lctl conf_param testfs.srpc.flavor.tcp=ska Notice how the initial testfs.srpc.flavor.default=skpi rule now appears as testfs.srpc.flavor.tcp=skpi. Below is the llog_reader dump of testfs-sptlrpc: |
| Comments |
| Comment by John Hammond [ 14/Nov/16 ] |
ommit 907a321c9b9e2cd5f5ccf488cc516ba05dee0ad8
Author: Dmitry Eremin <dmitry.eremin@intel.com>
Date: Thu Dec 25 15:12:02 2014 +0300
LU-6070 libcfs: provide separate buffers for libcfs_*2str()
Provide duplicates with separate buffers for libcfs_*2str() functions.
Replace libcfs_nid2str() with libcfs_nid2str_r() function in critical
places.
Provide buffer size for nf_addr2str functions.
Use __u32 as nf_type always
Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Change-Id: I7505271954745d1b1e288ef4e09a7f52bd970536
Reviewed-on: http://review.whamcloud.com/13185
Tested-by: Jenkins
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
diff --git a/lustre/mgs/lproc_mgs.c b/lustre/mgs/lproc_mgs.c
index 8ae52ea..2e4adf4 100644
--- a/lustre/mgs/lproc_mgs.c
+++ b/lustre/mgs/lproc_mgs.c
@@ -90,16 +90,14 @@ static void seq_show_srpc_rules(struct seq_file *seq, const char *tgtname,
struct sptlrpc_rule *r;
char dirbuf[10];
char flvrbuf[40];
- char *net;
+ char net[LNET_NIDSTR_SIZE] = "default";
int i;
for (i = 0; i < rset->srs_nrule; i++) {
r = &rset->srs_rules[i];
- if (r->sr_netid == LNET_NIDNET(LNET_NID_ANY))
- net = "default";
- else
- net = libcfs_net2str(r->sr_netid);
+ if (r->sr_netid != LNET_NIDNET(LNET_NID_ANY))
+ libcfs_net2str_r(r->sr_netid, net, sizeof(net));
if (r->sr_from == LUSTRE_SP_ANY && r->sr_to == LUSTRE_SP_ANY)
dirbuf[0] = '\0';
|
| Comment by Gerrit Updater [ 14/Nov/16 ] |
|
John L. Hammond (john.hammond@intel.com) uploaded a new patch: http://review.whamcloud.com/23756 |
| Comment by Gerrit Updater [ 17/Nov/16 ] |
|
Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/23756/ |
| Comment by Peter Jones [ 17/Nov/16 ] |
|
Landed for 2.9 |