Skip to content

Commit

Permalink
Just a test to see if we can get around the extra NLT warning (#15231)
Browse files Browse the repository at this point in the history
a bit of cleanup and attempt to suppress warning

Signed-off-by: Jeff Olivier <[email protected]>
  • Loading branch information
jolivier23 authored Oct 5, 2024
1 parent 861b4cf commit e7c32be
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 17 deletions.
4 changes: 4 additions & 0 deletions ci/unit/test_nlt_node.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,9 @@ pip install --requirement requirements-utest.txt

pip install /opt/daos/lib/daos/python/

# set high open file limit in the shell to avoid extra warning
sudo prlimit --nofile=1024:262144 --pid $$
prlimit -n

./utils/node_local_test.py --max-log-size 1700MiB --dfuse-dir /localhome/jenkins/ \
--log-usage-save nltir.xml --log-usage-export nltr.json all
39 changes: 22 additions & 17 deletions src/cart/crt_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -514,26 +514,31 @@ file_limit_bump(void)
return;
}

if (rlim.rlim_cur < CRT_MIN_TCP_FD) {
if (rlim.rlim_max < CRT_MIN_TCP_FD) {
D_WARN("File descriptor hard limit should be at least %d\n",
CRT_MIN_TCP_FD);
return;
}
if (rlim.rlim_cur >= CRT_MIN_TCP_FD)
return;

rlim.rlim_cur = rlim.rlim_max;
rc = setrlimit(RLIMIT_NOFILE, &rlim);
if (rc != 0) {
DS_ERROR(errno,
"setrlimit() failed. Unable to bump file descriptor"
" limit to value >= %d, limit is %lu",
CRT_MIN_TCP_FD, rlim.rlim_max);
/** Per the man page, this can only fail if rlim is invalid */
D_ASSERT(0);
if (rlim.rlim_max < CRT_MIN_TCP_FD) {
D_WARN("File descriptor hard limit should be at least %d, limit is %lu\n",
CRT_MIN_TCP_FD, rlim.rlim_max);

if (rlim.rlim_cur >= rlim.rlim_max)
return;
}
D_INFO("Updated soft file descriptor limit to %lu\n", rlim.rlim_max);

/* May as well bump it as much as we can */
}

rlim.rlim_cur = rlim.rlim_max;
rc = setrlimit(RLIMIT_NOFILE, &rlim);
if (rc != 0) {
DS_ERROR(errno,
"setrlimit() failed. Unable to bump file descriptor"
" limit to value >= %d, limit is %lu",
CRT_MIN_TCP_FD, rlim.rlim_max);
/** Per the man page, this can only fail if rlim is invalid */
D_ASSERT(0);
return;
}
D_INFO("Updated soft file descriptor limit to %lu\n", rlim.rlim_max);
}

static void
Expand Down

0 comments on commit e7c32be

Please sign in to comment.