From 50f3378a6fbc57d6726a64bcfce229e94f5fa1b7 Mon Sep 17 00:00:00 2001 From: Moe Jette <jette1@llnl.gov> Date: Mon, 7 Apr 2008 16:34:43 +0000 Subject: [PATCH] Improve documentation and log messages for triggers --- doc/man/man1/strigger.1 | 11 +++++++++-- src/common/slurm_errno.c | 2 +- src/slurmctld/trigger_mgr.c | 4 ++-- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/doc/man/man1/strigger.1 b/doc/man/man1/strigger.1 index 6cc1535f262..249c69a2fd9 100644 --- a/doc/man/man1/strigger.1 +++ b/doc/man/man1/strigger.1 @@ -19,7 +19,13 @@ script. Typical uses include notifying system administrators of node failures and gracefully terminating a job when it's time limit is approaching. -\fBNOTE:\fR This command can only set triggers if run by the +\fBIMPORTANT NOTE:\fR Trigger events are not processed instantly, but +a check is performed for trigger events on a periodic basis (currently +every 15 seconds). +Node state event trigger programs must establish a new trigger within +that time period to avoid node state changes failing to invoke a trigger. + +\fBIMPORTANT NOTE:\fR This command can only set triggers if run by the user \fISlurmUser\fR unless \fISlurmUser\fR is configured as user root. This is required for the \fIslurmctld\fR daemon to set the appropriate user and group IDs for the executed program. @@ -90,7 +96,8 @@ By default, all nodes associated with the job (if \fB\-\-jobid\fR is specified) or on the system are considered for event triggers. \fBNOTE:\fR The \fB\-\-node\fR option can not be used in conjunction with the \fB\-\-jobid\fR option. When the \fB\-\-jobid\fR option is -used in conjunction with the \fB\-\-up\fR or \fB\-\-down\fR option, +used in conjunction with the \fB\-\-up\fR, \fB\-\-down\fR or +\fB\-\-drained\fR option, all nodes allocated to that job will considered the nodes used as a trigger event. diff --git a/src/common/slurm_errno.c b/src/common/slurm_errno.c index cd9e186fa9b..11d602a4e4f 100644 --- a/src/common/slurm_errno.c +++ b/src/common/slurm_errno.c @@ -114,7 +114,7 @@ static slurm_errtab_t slurm_errtab[] = { { ESLURM_DEFAULT_PARTITION_NOT_SET, "No partition specified or system default partition" }, { ESLURM_ACCESS_DENIED, - "Access denied" }, + "Access/permission denied" }, { ESLURM_JOB_MISSING_REQUIRED_PARTITION_GROUP, "User's group not permitted to use this partition" }, { ESLURM_REQUESTED_NODES_NOT_IN_PARTITION, diff --git a/src/slurmctld/trigger_mgr.c b/src/slurmctld/trigger_mgr.c index bbbdf36282f..46d31774954 100644 --- a/src/slurmctld/trigger_mgr.c +++ b/src/slurmctld/trigger_mgr.c @@ -295,8 +295,8 @@ extern int trigger_set(uid_t uid, gid_t gid, trigger_info_msg_t *msg) * launched. To prevent the launched program for an arbitrary * user being executed as user SlurmUser, disable all other * users from setting triggers. */ - info("Attemt to set trigger by uid %u", uid); - rc = EPERM; + info("Attempt to set trigger by uid %u != SlurmUser", uid); + rc = ESLURM_ACCESS_DENIED; goto fini; } -- GitLab