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
23431364
Commit
23431364
authored
17 years ago
by
Danny Auble
Browse files
Options
Downloads
Patches
Plain Diff
fix to make sure reconnect is off in mysql
parent
bf28ff20
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/common/mysql_common.c
+3
-0
3 additions, 0 deletions
src/common/mysql_common.c
src/plugins/jobacct_storage/mysql/jobacct_storage_mysql.c
+7
-7
7 additions, 7 deletions
src/plugins/jobacct_storage/mysql/jobacct_storage_mysql.c
with
10 additions
and
7 deletions
src/common/mysql_common.c
+
3
−
0
View file @
23431364
...
...
@@ -120,6 +120,7 @@ extern int mysql_get_db_connection(MYSQL **mysql_db, char *db_name,
{
int
rc
=
SLURM_SUCCESS
;
bool
storage_init
=
false
;
my_bool
reconnect
=
0
;
if
(
!
(
*
mysql_db
=
mysql_init
(
*
mysql_db
)))
fatal
(
"mysql_init failed: %s"
,
mysql_error
(
*
mysql_db
));
...
...
@@ -144,6 +145,8 @@ extern int mysql_get_db_connection(MYSQL **mysql_db, char *db_name,
storage_init
=
true
;
}
}
/* make sure reconnect is off */
mysql_options
(
*
mysql_db
,
MYSQL_OPT_RECONNECT
,
&
reconnect
);
}
return
rc
;
}
...
...
This diff is collapsed.
Click to expand it.
src/plugins/jobacct_storage/mysql/jobacct_storage_mysql.c
+
7
−
7
View file @
23431364
...
...
@@ -322,7 +322,7 @@ extern int jobacct_storage_p_job_start(struct job_record *job_ptr)
char
query
[
1024
];
int
reinit
=
0
;
if
(
!
jobacct_mysql_db
||
mysql_ping
(
jobacct_mysql_db
))
{
if
(
!
jobacct_mysql_db
||
mysql_ping
(
jobacct_mysql_db
)
!=
0
)
{
char
*
loc
=
slurm_get_jobacct_storage_loc
();
if
(
jobacct_storage_p_init
(
loc
)
==
SLURM_ERROR
)
{
xfree
(
loc
);
...
...
@@ -417,7 +417,7 @@ extern int jobacct_storage_p_job_complete(struct job_record *job_ptr)
char
*
account
,
*
nodes
;
int
rc
=
SLURM_SUCCESS
;
if
(
!
jobacct_mysql_db
||
mysql_ping
(
jobacct_mysql_db
))
{
if
(
!
jobacct_mysql_db
||
mysql_ping
(
jobacct_mysql_db
)
!=
0
)
{
char
*
loc
=
slurm_get_jobacct_storage_loc
();
if
(
jobacct_storage_p_init
(
loc
)
==
SLURM_ERROR
)
{
xfree
(
loc
);
...
...
@@ -475,7 +475,7 @@ extern int jobacct_storage_p_step_start(struct step_record *step_ptr)
#endif
char
query
[
1024
];
if
(
!
jobacct_mysql_db
||
mysql_ping
(
jobacct_mysql_db
))
{
if
(
!
jobacct_mysql_db
||
mysql_ping
(
jobacct_mysql_db
)
!=
0
)
{
char
*
loc
=
slurm_get_jobacct_storage_loc
();
if
(
jobacct_storage_p_init
(
loc
)
==
SLURM_ERROR
)
{
xfree
(
loc
);
...
...
@@ -554,7 +554,7 @@ extern int jobacct_storage_p_step_complete(struct step_record *step_ptr)
char
query
[
1024
];
int
rc
=
SLURM_SUCCESS
;
if
(
!
jobacct_mysql_db
||
mysql_ping
(
jobacct_mysql_db
))
{
if
(
!
jobacct_mysql_db
||
mysql_ping
(
jobacct_mysql_db
)
!=
0
)
{
char
*
loc
=
slurm_get_jobacct_storage_loc
();
if
(
jobacct_storage_p_init
(
loc
)
==
SLURM_ERROR
)
{
xfree
(
loc
);
...
...
@@ -719,7 +719,7 @@ extern int jobacct_storage_p_suspend(struct job_record *job_ptr)
char
query
[
1024
];
int
rc
=
SLURM_SUCCESS
;
if
(
!
jobacct_mysql_db
||
mysql_ping
(
jobacct_mysql_db
))
{
if
(
!
jobacct_mysql_db
||
mysql_ping
(
jobacct_mysql_db
)
!=
0
)
{
char
*
loc
=
slurm_get_jobacct_storage_loc
();
if
(
jobacct_storage_p_init
(
loc
)
==
SLURM_ERROR
)
{
xfree
(
loc
);
...
...
@@ -764,7 +764,7 @@ extern void jobacct_storage_p_get_jobs(List job_list,
void
*
params
)
{
#ifdef HAVE_MYSQL
if
(
!
jobacct_mysql_db
||
mysql_ping
(
jobacct_mysql_db
))
{
if
(
!
jobacct_mysql_db
||
mysql_ping
(
jobacct_mysql_db
)
!=
0
)
{
char
*
loc
=
slurm_get_jobacct_storage_loc
();
if
(
jobacct_storage_p_init
(
loc
)
==
SLURM_ERROR
)
{
xfree
(
loc
);
...
...
@@ -786,7 +786,7 @@ extern void jobacct_storage_p_archive(List selected_parts,
void
*
params
)
{
#ifdef HAVE_MYSQL
if
(
!
jobacct_mysql_db
||
mysql_ping
(
jobacct_mysql_db
))
{
if
(
!
jobacct_mysql_db
||
mysql_ping
(
jobacct_mysql_db
)
!=
0
)
{
char
*
loc
=
slurm_get_jobacct_storage_loc
();
if
(
jobacct_storage_p_init
(
loc
)
==
SLURM_ERROR
)
{
xfree
(
loc
);
...
...
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