Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
mxqd: Ignore failure to scan JOB_TMPDIR_MNTDIR
Avoid unneeded warning when scanning JOB_TMPDIR_MNTDIR for possible
leftover job mounts. The parent directory of JOB_TMPDIR_MNTDIR is
created when the first job with the --tmpdir feature is started. So
it won't exist in a new server.

This cleanup path is only used in the exceptional case that the usual
cleanup path (via job_has_finished) didn't succeed, e.g. when mxqd was
killed. The cleanup is not essential for the currently running server.
  • Loading branch information
donald committed Apr 15, 2020
1 parent b84d9b6 commit 173dbc0
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions mxqd.c
Expand Up @@ -2308,10 +2308,8 @@ static void server_umount_stale_job_mountdirs(struct mxq_server *server) {
int i;

entries=scandir(MXQ_JOB_TMPDIR_MNTDIR,&namelist,&job_mountdirs_is_valid_name,&alphasort);
if (entries<0) {
mx_log_err("scandir %s: %m", MXQ_JOB_TMPDIR_MNTDIR);
if (entries<=0)
return;
}
for (i=0;i<entries;i++) {
if (job_mountdirs_is_valid_name_parse(namelist[i]->d_name, &job_id)) {
if (server_get_job_list_by_job_id(server, job_id) == NULL) {
Expand Down

0 comments on commit 173dbc0

Please sign in to comment.