Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Slurm
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tud-zih-energy
Slurm
Commits
70e1cdf4
Commit
70e1cdf4
authored
16 years ago
by
Moe Jette
Browse files
Options
Downloads
Patches
Plain Diff
For srun/sbatch --get-user-env option (Moab use only) look for "env"
command in both /bin and /usr/sbin (for Suse Linux).
parent
6c3383c3
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
NEWS
+4
-2
4 additions, 2 deletions
NEWS
contribs/env_cache_builder.c
+30
-3
30 additions, 3 deletions
contribs/env_cache_builder.c
src/common/env.c
+4
-0
4 additions, 0 deletions
src/common/env.c
with
38 additions
and
5 deletions
NEWS
+
4
−
2
View file @
70e1cdf4
...
@@ -31,8 +31,10 @@ documents those changes that are of interest to users and admins.
...
@@ -31,8 +31,10 @@ documents those changes that are of interest to users and admins.
HostFormat=2 in SLURM's wiki.conf for improved performance.
HostFormat=2 in SLURM's wiki.conf for improved performance.
-- NOTE: We needed to change an RPC from version 1.3.0. You must upgrade
-- NOTE: We needed to change an RPC from version 1.3.0. You must upgrade
all nodes in a cluster from v1.3.0 to v1.3.1 at the same time.
all nodes in a cluster from v1.3.0 to v1.3.1 at the same time.
-- Postgres plugin will work from job accounting, not for
-- Postgres plugin will work from job accounting, not for association
association management yet.
management yet.
-- For srun/sbatch --get-user-env option (Moab use only) look for "env"
command in both /bin and /usr/sbin (for Suse Linux).
* Changes in SLURM 1.3.1
* Changes in SLURM 1.3.1
========================
========================
...
...
This diff is collapsed.
Click to expand it.
contribs/env_cache_builder.c
+
30
−
3
View file @
70e1cdf4
...
@@ -77,14 +77,17 @@ static int _get_cache_dir(char *buffer, int buf_size);
...
@@ -77,14 +77,17 @@ static int _get_cache_dir(char *buffer, int buf_size);
static
void
_log_failures
(
int
failures
,
char
*
cache_dir
);
static
void
_log_failures
(
int
failures
,
char
*
cache_dir
);
static
int
_parse_line
(
char
*
in_line
,
char
**
user_name
,
int
*
user_id
);
static
int
_parse_line
(
char
*
in_line
,
char
**
user_name
,
int
*
user_id
);
char
*
env_loc
=
NULL
;
main
(
int
argc
,
char
**
argv
)
main
(
int
argc
,
char
**
argv
)
{
{
FILE
*
passwd_fd
;
FILE
*
passwd_fd
;
char
cache_dir
[
256
],
in_line
[
256
],
*
user_name
;
char
cache_dir
[
256
],
in_line
[
256
],
*
user_name
;
int
i
,
failures
=
0
,
user_cnt
=
0
,
user_id
;
int
i
,
failures
=
0
,
user_cnt
=
0
,
user_id
;
long
int
delta_t
;
long
int
delta_t
;
struct
stat
buf
;
if
(
geteuid
()
!=
(
uid_t
)
0
)
{
if
(
geteuid
()
!=
(
uid_t
)
0
)
{
printf
(
"Need to run as user root
\n
"
);
printf
(
"Need to run as user root
\n
"
);
exit
(
1
);
exit
(
1
);
}
}
...
@@ -97,6 +100,30 @@ main (int argc, char **argv)
...
@@ -97,6 +100,30 @@ main (int argc, char **argv)
strerror
(
errno
));
strerror
(
errno
));
exit
(
1
);
exit
(
1
);
}
}
if
(
stat
(
"/bgl"
,
&
buf
)
==
0
)
{
printf
(
"BlueGene Note: Execute only a a front-end node, "
"not the service node
\n
"
);
printf
(
" User logins to the service node are "
"disabled
\n\n
"
);
}
if
(
stat
(
"/bin/su"
,
&
buf
))
{
printf
(
"Could not locate command: /bin/su
\n
"
);
exit
(
1
);
}
if
(
stat
(
"/bin/echo"
,
&
buf
))
{
printf
(
"Could not locate command: /bin/echo
\n
"
);
exit
(
1
);
}
if
(
stat
(
"/bin/env"
,
&
buf
)
==
0
)
env_loc
=
"/bin/env"
;
else
if
(
stat
(
"/usr/bin/env"
,
&
buf
)
==
0
)
env_loc
=
"/usr/bin/env"
;
else
{
printf
(
"Could not location command: env
\n
"
);
exit
(
1
);
}
printf
(
"Building user environment cache files for Moab/Slurm.
\n
"
);
printf
(
"Building user environment cache files for Moab/Slurm.
\n
"
);
printf
(
"This will take a while.
\n\n
"
);
printf
(
"This will take a while.
\n\n
"
);
...
@@ -230,8 +257,8 @@ static long int _build_cache(char *user_name, char *cache_dir)
...
@@ -230,8 +257,8 @@ static long int _build_cache(char *user_name, char *cache_dir)
open
(
"/dev/null"
,
O_WRONLY
);
open
(
"/dev/null"
,
O_WRONLY
);
snprintf
(
buffer
,
sizeof
(
buffer
),
snprintf
(
buffer
,
sizeof
(
buffer
),
"/bin/echo; /bin/echo; /bin/echo; "
"/bin/echo; /bin/echo; /bin/echo; "
"/bin/echo %s;
/bin/env
; /bin/echo %s"
,
"/bin/echo %s;
%s
; /bin/echo %s"
,
starttoken
,
stoptoken
);
starttoken
,
env_loc
,
stoptoken
);
#ifdef LOAD_ENV_NO_LOGIN
#ifdef LOAD_ENV_NO_LOGIN
execl
(
"/bin/su"
,
"su"
,
user_name
,
"-c"
,
buffer
,
NULL
);
execl
(
"/bin/su"
,
"su"
,
user_name
,
"-c"
,
buffer
,
NULL
);
#else
#else
...
...
This diff is collapsed.
Click to expand it.
src/common/env.c
+
4
−
0
View file @
70e1cdf4
...
@@ -1326,6 +1326,10 @@ char **env_array_user_default(const char *username, int timeout, int mode)
...
@@ -1326,6 +1326,10 @@ char **env_array_user_default(const char *username, int timeout, int mode)
struct
pollfd
ufds
;
struct
pollfd
ufds
;
struct
stat
buf
;
struct
stat
buf
;
if
(
stat
(
"/bin/su"
,
&
buf
))
fatal
(
"Could not locate command: /bin/su"
);
if
(
stat
(
"/bin/echo"
,
&
buf
))
fatal
(
"Could not locate command: /bin/echo"
);
if
(
stat
(
"/bin/env"
,
&
buf
)
==
0
)
if
(
stat
(
"/bin/env"
,
&
buf
)
==
0
)
env_loc
=
"/bin/env"
;
env_loc
=
"/bin/env"
;
else
if
(
stat
(
"/usr/bin/env"
,
&
buf
)
==
0
)
else
if
(
stat
(
"/usr/bin/env"
,
&
buf
)
==
0
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment