119
121
s_p_hashtbl_t *hashtbl);
121
123
s_p_options_t slurm_conf_options[] = {
124
{"AccountingStorageEnforce", S_P_UINT16},
125
{"AccountingStorageHost", S_P_STRING},
126
{"AccountingStorageLoc", S_P_STRING},
127
{"AccountingStoragePass", S_P_STRING},
128
{"AccountingStoragePort", S_P_UINT32},
129
{"AccountingStorageType", S_P_STRING},
130
{"AccountingStorageUser", S_P_STRING},
122
131
{"AuthType", S_P_STRING},
132
{"BackupAddr", S_P_STRING},
133
{"BackupController", S_P_STRING},
123
134
{"CheckpointType", S_P_STRING},
124
135
{"CacheGroups", S_P_UINT16},
125
{"BackupAddr", S_P_STRING},
126
{"BackupController", S_P_STRING},
136
{"ClusterName", S_P_STRING},
127
137
{"ControlAddr", S_P_STRING},
128
138
{"ControlMachine", S_P_STRING},
129
{"DisableRootJobs", S_P_UINT16},
139
{"CryptoType", S_P_STRING},
140
{"DefaultStorageHost", S_P_STRING},
141
{"DefaultStorageLoc", S_P_STRING},
142
{"DefaultStoragePass", S_P_STRING},
143
{"DefaultStoragePort", S_P_UINT32},
144
{"DefaultStorageType", S_P_STRING},
145
{"DefaultStorageUser", S_P_STRING},
146
{"DefMemPerTask", S_P_UINT32},
147
{"DisableRootJobs", S_P_BOOLEAN},
130
148
{"Epilog", S_P_STRING},
149
{"EpilogMsgTime", S_P_UINT32},
131
150
{"FastSchedule", S_P_UINT16},
132
151
{"FirstJobId", S_P_UINT32},
152
{"GetEnvTimeout", S_P_UINT16},
133
153
{"HashBase", S_P_LONG, defunct_option},
134
154
{"HeartbeatInterval", S_P_LONG, defunct_option},
155
{"HealthCheckInterval", S_P_UINT16},
156
{"HealthCheckProgram", S_P_STRING},
135
157
{"InactiveLimit", S_P_UINT16},
158
{"JobAcctGatherType", S_P_STRING},
159
{"JobAcctFrequency", S_P_UINT16, defunct_option},
160
{"JobAcctGatherFrequency", S_P_UINT16},
136
161
{"JobAcctLogFile", S_P_STRING},
137
{"JobAcctFrequency", S_P_UINT16},
138
162
{"JobAcctType", S_P_STRING},
163
{"JobCompHost", S_P_STRING},
139
164
{"JobCompLoc", S_P_STRING},
165
{"JobCompPass", S_P_STRING},
166
{"JobCompPort", S_P_UINT32},
140
167
{"JobCompType", S_P_STRING},
168
{"JobCompUser", S_P_STRING},
141
169
{"JobCredentialPrivateKey", S_P_STRING},
142
170
{"JobCredentialPublicCertificate", S_P_STRING},
143
171
{"JobFileAppend", S_P_UINT16},
144
{"GetEnvTimeout", S_P_UINT16},
172
{"JobRequeue", S_P_UINT16},
145
173
{"KillTree", S_P_UINT16, defunct_option},
146
174
{"KillWait", S_P_UINT16},
175
{"Licenses", S_P_STRING},
147
176
{"MailProg", S_P_STRING},
148
177
{"MaxJobCount", S_P_UINT16},
178
{"MaxMemPerTask", S_P_UINT32},
149
179
{"MessageTimeout", S_P_UINT16},
150
180
{"MinJobAge", S_P_UINT16},
151
{"MpichGmDirectSupport", S_P_LONG},
181
{"MpichGmDirectSupport", S_P_LONG, defunct_option},
152
182
{"MpiDefault", S_P_STRING},
153
183
{"PluginDir", S_P_STRING},
154
184
{"PlugStackConfig", S_P_STRING},
185
{"PrivateData", S_P_UINT16},
155
186
{"ProctrackType", S_P_STRING},
156
187
{"Prolog", S_P_STRING},
157
188
{"PropagatePrioProcess", S_P_UINT16},
158
189
{"PropagateResourceLimitsExcept", S_P_STRING},
159
190
{"PropagateResourceLimits", S_P_STRING},
191
{"ResumeProgram", S_P_STRING},
192
{"ResumeRate", S_P_UINT16},
160
193
{"ReturnToService", S_P_UINT16},
161
{"SchedulerAuth", S_P_STRING},
194
{"SchedulerAuth", S_P_STRING, defunct_option},
195
{"SchedulerParameters", S_P_STRING},
162
196
{"SchedulerPort", S_P_UINT16},
163
197
{"SchedulerRootFilter", S_P_UINT16},
198
{"SchedulerTimeSlice", S_P_UINT16},
164
199
{"SchedulerType", S_P_STRING},
165
200
{"SelectType", S_P_STRING},
166
201
{"SelectTypeParameters", S_P_STRING},
470
528
&& !s_p_get_boolean(&p->root_only_flag, "RootOnly", dflt))
471
529
p->root_only_flag = false;
473
if (!s_p_get_string(&tmp, "Shared", tbl)
474
&& !s_p_get_string(&tmp, "Shared", dflt)) {
475
p->shared = SHARED_NO;
531
if (!s_p_get_uint16(&p->priority, "Priority", tbl) &&
532
!s_p_get_uint16(&p->priority, "Priority", dflt))
535
if (s_p_get_string(&tmp, "Shared", tbl) ||
536
s_p_get_string(&tmp, "Shared", dflt)) {
477
537
if (strcasecmp(tmp, "NO") == 0)
478
p->shared = SHARED_NO;
479
539
#ifndef HAVE_XCPU
480
540
/* Only "Shared=NO" is valid on XCPU systems */
481
else if (strcasecmp(tmp, "YES") == 0)
482
p->shared = SHARED_YES;
483
541
else if (strcasecmp(tmp, "EXCLUSIVE") == 0)
484
p->shared = SHARED_EXCLUSIVE;
485
else if (strcasecmp(tmp, "FORCE") == 0)
486
p->shared = SHARED_FORCE;
543
else if (strncasecmp(tmp, "YES:", 4) == 0)
544
p->max_share = strtol(&tmp[4], (char **) NULL, 10);
545
else if (strcasecmp(tmp, "YES") == 0)
547
else if (strncasecmp(tmp, "FORCE:", 6) == 0) {
548
p->max_share = strtol(&tmp[6], (char **) NULL, 10) |
550
} else if (strcasecmp(tmp, "FORCE") == 0)
551
p->max_share = 4 | SHARED_FORCE;
489
554
error("Bad value \"%s\" for Shared", tmp);
999
1066
free_slurm_conf (slurm_ctl_conf_t *ctl_conf_ptr, bool purge_node_hash)
1068
xfree (ctl_conf_ptr->accounting_storage_host);
1069
xfree (ctl_conf_ptr->accounting_storage_loc);
1070
xfree (ctl_conf_ptr->accounting_storage_pass);
1071
xfree (ctl_conf_ptr->accounting_storage_type);
1072
xfree (ctl_conf_ptr->accounting_storage_user);
1001
1073
xfree (ctl_conf_ptr->authtype);
1002
xfree (ctl_conf_ptr->checkpoint_type);
1003
1074
xfree (ctl_conf_ptr->backup_addr);
1004
1075
xfree (ctl_conf_ptr->backup_controller);
1076
xfree (ctl_conf_ptr->checkpoint_type);
1077
xfree (ctl_conf_ptr->cluster_name);
1005
1078
xfree (ctl_conf_ptr->control_addr);
1006
1079
xfree (ctl_conf_ptr->control_machine);
1080
xfree (ctl_conf_ptr->crypto_type);
1007
1081
xfree (ctl_conf_ptr->epilog);
1008
xfree (ctl_conf_ptr->job_acct_logfile);
1009
xfree (ctl_conf_ptr->job_acct_type);
1082
xfree (ctl_conf_ptr->health_check_program);
1083
xfree (ctl_conf_ptr->job_acct_gather_type);
1084
xfree (ctl_conf_ptr->job_comp_host);
1010
1085
xfree (ctl_conf_ptr->job_comp_loc);
1086
xfree (ctl_conf_ptr->job_comp_pass);
1011
1087
xfree (ctl_conf_ptr->job_comp_type);
1088
xfree (ctl_conf_ptr->job_comp_user);
1012
1089
xfree (ctl_conf_ptr->job_credential_private_key);
1013
1090
xfree (ctl_conf_ptr->job_credential_public_certificate);
1091
xfree (ctl_conf_ptr->licenses);
1014
1092
xfree (ctl_conf_ptr->mail_prog);
1015
1093
xfree (ctl_conf_ptr->mpi_default);
1094
xfree (ctl_conf_ptr->node_prefix);
1016
1095
xfree (ctl_conf_ptr->plugindir);
1017
1096
xfree (ctl_conf_ptr->plugstack);
1018
1097
xfree (ctl_conf_ptr->proctrack_type);
1019
1098
xfree (ctl_conf_ptr->prolog);
1020
1099
xfree (ctl_conf_ptr->propagate_rlimits_except);
1021
1100
xfree (ctl_conf_ptr->propagate_rlimits);
1101
xfree (ctl_conf_ptr->resume_program);
1102
xfree (ctl_conf_ptr->slurm_conf);
1022
1103
xfree (ctl_conf_ptr->schedtype);
1023
1104
xfree (ctl_conf_ptr->select_type);
1024
xfree (ctl_conf_ptr->slurm_conf);
1025
1105
xfree (ctl_conf_ptr->slurm_user_name);
1026
1106
xfree (ctl_conf_ptr->slurmctld_logfile);
1027
1107
xfree (ctl_conf_ptr->slurmctld_pidfile);
1028
1108
xfree (ctl_conf_ptr->slurmd_logfile);
1029
1109
xfree (ctl_conf_ptr->slurmd_pidfile);
1030
1110
xfree (ctl_conf_ptr->slurmd_spooldir);
1111
xfree (ctl_conf_ptr->srun_epilog);
1112
xfree (ctl_conf_ptr->srun_prolog);
1031
1113
xfree (ctl_conf_ptr->state_save_location);
1114
xfree (ctl_conf_ptr->suspend_exc_nodes);
1115
xfree (ctl_conf_ptr->suspend_exc_parts);
1116
xfree (ctl_conf_ptr->suspend_program);
1032
1117
xfree (ctl_conf_ptr->switch_type);
1033
xfree (ctl_conf_ptr->tmp_fs);
1034
1118
xfree (ctl_conf_ptr->task_epilog);
1119
xfree (ctl_conf_ptr->task_plugin);
1035
1120
xfree (ctl_conf_ptr->task_prolog);
1036
xfree (ctl_conf_ptr->task_plugin);
1037
1121
xfree (ctl_conf_ptr->tmp_fs);
1038
xfree (ctl_conf_ptr->srun_prolog);
1039
xfree (ctl_conf_ptr->srun_epilog);
1040
xfree (ctl_conf_ptr->node_prefix);
1041
1122
xfree (ctl_conf_ptr->unkillable_program);
1043
1124
if (purge_node_hash)
1054
1135
init_slurm_conf (slurm_ctl_conf_t *ctl_conf_ptr)
1056
1137
ctl_conf_ptr->last_update = time(NULL);
1057
xfree (ctl_conf_ptr->authtype);
1058
1138
ctl_conf_ptr->cache_groups = (uint16_t) NO_VAL;
1059
xfree (ctl_conf_ptr->checkpoint_type);
1139
xfree (ctl_conf_ptr->accounting_storage_host);
1140
xfree (ctl_conf_ptr->accounting_storage_loc);
1141
xfree (ctl_conf_ptr->accounting_storage_pass);
1142
ctl_conf_ptr->accounting_storage_port = 0;
1143
xfree (ctl_conf_ptr->accounting_storage_type);
1144
xfree (ctl_conf_ptr->accounting_storage_user);
1145
xfree (ctl_conf_ptr->authtype);
1060
1146
xfree (ctl_conf_ptr->backup_addr);
1061
1147
xfree (ctl_conf_ptr->backup_controller);
1148
ctl_conf_ptr->cache_groups = 0;
1149
xfree (ctl_conf_ptr->checkpoint_type);
1150
xfree (ctl_conf_ptr->cluster_name);
1062
1151
xfree (ctl_conf_ptr->control_addr);
1063
1152
xfree (ctl_conf_ptr->control_machine);
1153
xfree (ctl_conf_ptr->crypto_type);
1154
ctl_conf_ptr->def_mem_per_task = 0;
1064
1155
ctl_conf_ptr->disable_root_jobs = 0;
1065
1156
xfree (ctl_conf_ptr->epilog);
1157
ctl_conf_ptr->epilog_msg_time = (uint32_t) NO_VAL;
1066
1158
ctl_conf_ptr->fast_schedule = (uint16_t) NO_VAL;
1067
1159
ctl_conf_ptr->first_job_id = (uint32_t) NO_VAL;
1160
ctl_conf_ptr->get_env_timeout = 0;
1161
ctl_conf_ptr->health_check_interval = 0;
1162
xfree(ctl_conf_ptr->health_check_program);
1068
1163
ctl_conf_ptr->inactive_limit = (uint16_t) NO_VAL;
1069
xfree (ctl_conf_ptr->job_acct_logfile);
1070
ctl_conf_ptr->job_acct_freq = 0;
1071
xfree (ctl_conf_ptr->job_acct_type);
1164
xfree (ctl_conf_ptr->job_acct_gather_type);
1165
ctl_conf_ptr->job_acct_gather_freq = 0;
1072
1166
xfree (ctl_conf_ptr->job_comp_loc);
1167
xfree (ctl_conf_ptr->job_comp_pass);
1168
ctl_conf_ptr->job_comp_port = 0;
1073
1169
xfree (ctl_conf_ptr->job_comp_type);
1170
xfree (ctl_conf_ptr->job_comp_user);
1074
1171
xfree (ctl_conf_ptr->job_credential_private_key);
1075
1172
xfree (ctl_conf_ptr->job_credential_public_certificate);
1076
1173
ctl_conf_ptr->job_file_append = (uint16_t) NO_VAL;
1174
ctl_conf_ptr->job_requeue = (uint16_t) NO_VAL;
1077
1175
ctl_conf_ptr->kill_wait = (uint16_t) NO_VAL;
1176
xfree (ctl_conf_ptr->licenses);
1078
1177
xfree (ctl_conf_ptr->mail_prog);
1079
1178
ctl_conf_ptr->max_job_cnt = (uint16_t) NO_VAL;
1179
ctl_conf_ptr->max_mem_per_task = 0;
1080
1180
ctl_conf_ptr->min_job_age = (uint16_t) NO_VAL;
1081
1181
xfree (ctl_conf_ptr->mpi_default);
1082
1182
ctl_conf_ptr->msg_timeout = (uint16_t) NO_VAL;
1083
1183
ctl_conf_ptr->next_job_id = (uint32_t) NO_VAL;
1184
xfree (ctl_conf_ptr->node_prefix);
1084
1185
xfree (ctl_conf_ptr->plugindir);
1085
1186
xfree (ctl_conf_ptr->plugstack);
1187
ctl_conf_ptr->private_data = 0;
1086
1188
xfree (ctl_conf_ptr->proctrack_type);
1087
1189
xfree (ctl_conf_ptr->prolog);
1088
1190
ctl_conf_ptr->propagate_prio_process = (uint16_t) NO_VAL;
1191
xfree (ctl_conf_ptr->propagate_rlimits);
1089
1192
xfree (ctl_conf_ptr->propagate_rlimits_except);
1090
xfree (ctl_conf_ptr->propagate_rlimits);
1193
xfree (ctl_conf_ptr->resume_program);
1194
ctl_conf_ptr->resume_rate = (uint16_t) NO_VAL;
1091
1195
ctl_conf_ptr->ret2service = (uint16_t) NO_VAL;
1196
xfree( ctl_conf_ptr->sched_params );
1197
ctl_conf_ptr->sched_time_slice = (uint16_t) NO_VAL;
1198
xfree( ctl_conf_ptr->schedtype );
1092
1199
ctl_conf_ptr->schedport = (uint16_t) NO_VAL;
1093
1200
ctl_conf_ptr->schedrootfltr = (uint16_t) NO_VAL;
1094
xfree( ctl_conf_ptr->schedtype );
1095
1201
xfree( ctl_conf_ptr->select_type );
1096
1202
ctl_conf_ptr->select_type_param = (uint16_t) NO_VAL;
1097
1203
ctl_conf_ptr->slurm_user_id = (uint16_t) NO_VAL;
1107
1213
ctl_conf_ptr->slurmd_port = (uint32_t) NO_VAL;
1108
1214
xfree (ctl_conf_ptr->slurmd_spooldir);
1109
1215
ctl_conf_ptr->slurmd_timeout = (uint16_t) NO_VAL;
1216
xfree (ctl_conf_ptr->srun_prolog);
1217
xfree (ctl_conf_ptr->srun_epilog);
1110
1218
xfree (ctl_conf_ptr->state_save_location);
1219
xfree (ctl_conf_ptr->suspend_exc_nodes);
1220
xfree (ctl_conf_ptr->suspend_exc_parts);
1221
xfree (ctl_conf_ptr->suspend_program);
1222
ctl_conf_ptr->suspend_rate = (uint16_t) NO_VAL;
1223
ctl_conf_ptr->suspend_time = (uint16_t) NO_VAL;
1111
1224
xfree (ctl_conf_ptr->switch_type);
1112
1225
xfree (ctl_conf_ptr->task_epilog);
1226
xfree (ctl_conf_ptr->task_plugin);
1227
ctl_conf_ptr->task_plugin_param = 0;
1113
1228
xfree (ctl_conf_ptr->task_prolog);
1114
xfree (ctl_conf_ptr->task_plugin);
1115
1229
xfree (ctl_conf_ptr->tmp_fs);
1116
ctl_conf_ptr->wait_time = (uint16_t) NO_VAL;
1117
xfree (ctl_conf_ptr->srun_prolog);
1118
xfree (ctl_conf_ptr->srun_epilog);
1119
xfree (ctl_conf_ptr->node_prefix);
1120
1230
ctl_conf_ptr->tree_width = (uint16_t) NO_VAL;
1231
xfree (ctl_conf_ptr->unkillable_program);
1232
ctl_conf_ptr->unkillable_timeout = (uint16_t) NO_VAL;
1121
1233
ctl_conf_ptr->use_pam = 0;
1122
xfree (ctl_conf_ptr->unkillable_program);
1123
ctl_conf_ptr->unkillable_timeout = (uint16_t) NO_VAL;
1234
ctl_conf_ptr->wait_time = (uint16_t) NO_VAL;
1125
1236
_free_name_hashtbl();
1126
1237
_init_name_hashtbl();
1428
1562
conf->inactive_limit = DEFAULT_INACTIVE_LIMIT;
1431
if (!s_p_get_string(&conf->job_acct_logfile,
1432
"JobAcctLogFile", hashtbl))
1433
conf->job_acct_logfile = xstrdup(DEFAULT_JOB_ACCT_LOGFILE);
1435
if (!s_p_get_uint16(&conf->job_acct_freq, "JobAcctFrequency", hashtbl))
1436
conf->job_acct_freq = DEFAULT_JOB_ACCT_FREQ;
1438
if (!s_p_get_string(&conf->job_acct_type, "JobAcctType", hashtbl))
1439
conf->job_acct_type = xstrdup(DEFAULT_JOB_ACCT_TYPE);
1441
s_p_get_string(&conf->job_comp_loc, "JobCompLoc", hashtbl);
1443
if (!s_p_get_string(&conf->job_comp_type, "JobCompType", hashtbl))
1444
conf->job_comp_type = xstrdup(DEFAULT_JOB_COMP_TYPE);
1565
if (!s_p_get_uint16(&conf->job_acct_gather_freq,
1566
"JobAcctGatherFrequency", hashtbl))
1567
conf->job_acct_gather_freq = DEFAULT_JOB_ACCT_GATHER_FREQ;
1569
if (s_p_get_string(&conf->job_acct_gather_type,
1570
"JobAcctType", hashtbl)) {
1571
fatal("JobAcctType is no longer a valid parameter.\n"
1572
"The job accounting plugin has changed to 2 different "
1573
"plugins one for gathering and one for storing the "
1574
"gathered information.\n"
1575
"Please change this to JobAcctGatherType to "
1577
"The major 'jobacct' is now 'jobacct_gather' and "
1578
"'jobacct_storage' your declarations will also need "
1579
"to change in your slurm.conf file.\n"
1580
"Refer to the slurm.conf man page or the web "
1581
"documentation for further explanation.");
1584
if(!s_p_get_string(&conf->job_acct_gather_type,
1585
"JobAcctGatherType", hashtbl))
1586
conf->job_acct_gather_type =
1587
xstrdup(DEFAULT_JOB_ACCT_GATHER_TYPE);
1589
if (!s_p_get_string(&conf->job_comp_type, "JobCompType", hashtbl)) {
1590
if(default_storage_type)
1591
conf->job_comp_type =
1592
xstrdup_printf("jobcomp/%s",
1593
default_storage_type);
1595
conf->job_comp_type = xstrdup(DEFAULT_JOB_COMP_TYPE);
1597
if (!s_p_get_string(&conf->job_comp_loc, "JobCompLoc", hashtbl)) {
1598
if(default_storage_loc)
1599
conf->job_comp_loc = xstrdup(default_storage_loc);
1601
conf->job_comp_loc = xstrdup(DEFAULT_JOB_COMP_LOC);
1604
if (!s_p_get_string(&conf->job_comp_host, "JobCompHost",
1606
if(default_storage_host)
1607
conf->job_comp_host =
1608
xstrdup(default_storage_host);
1610
conf->job_comp_host = xstrdup(DEFAULT_STORAGE_HOST);
1612
if (!s_p_get_string(&conf->job_comp_user, "JobCompUser",
1614
if(default_storage_user)
1615
conf->job_comp_user =
1616
xstrdup(default_storage_user);
1618
conf->job_comp_user = xstrdup(DEFAULT_STORAGE_USER);
1620
if (!s_p_get_string(&conf->job_comp_pass, "JobCompPass",
1622
if(default_storage_pass)
1623
conf->job_comp_pass =
1624
xstrdup(default_storage_pass);
1626
if (!s_p_get_uint32(&conf->job_comp_port, "JobCompPort",
1628
if(default_storage_port)
1629
conf->job_comp_port = default_storage_port;
1631
conf->job_comp_port = DEFAULT_STORAGE_PORT;
1446
1633
if (!s_p_get_uint16(&conf->job_file_append, "JobFileAppend", hashtbl))
1447
1634
conf->job_file_append = 0;
1636
if (!s_p_get_uint16(&conf->job_requeue, "JobRequeue", hashtbl))
1637
conf->job_requeue = 1;
1638
else if (conf->job_requeue > 1)
1639
conf->job_requeue = 1;
1449
1641
if (!s_p_get_uint16(&conf->get_env_timeout, "GetEnvTimeout", hashtbl))
1450
1642
conf->get_env_timeout = DEFAULT_GET_ENV_TIMEOUT;
1644
s_p_get_uint16(&conf->health_check_interval, "HealthCheckInterval", hashtbl);
1645
s_p_get_string(&conf->health_check_program, "HealthCheckProgram", hashtbl);
1452
1647
if (!s_p_get_uint16(&conf->kill_wait, "KillWait", hashtbl))
1453
1648
conf->kill_wait = DEFAULT_KILL_WAIT;
1650
s_p_get_string(&conf->licenses, "Licenses", hashtbl);
1455
1652
if (!s_p_get_string(&conf->mail_prog, "MailProg", hashtbl))
1456
1653
conf->mail_prog = xstrdup(DEFAULT_MAIL_PROG);
1458
1655
if (!s_p_get_uint16(&conf->max_job_cnt, "MaxJobCount", hashtbl))
1459
1656
conf->max_job_cnt = DEFAULT_MAX_JOB_COUNT;
1658
if (!s_p_get_uint32(&conf->max_mem_per_task, "MaxMemPerTask", hashtbl))
1659
conf->max_mem_per_task = DEFAULT_MAX_MEM_PER_TASK;
1461
1661
if (!s_p_get_uint16(&conf->msg_timeout, "MessageTimeout", hashtbl))
1462
1662
conf->msg_timeout = DEFAULT_MSG_TIMEOUT;
1463
else if (conf->msg_timeout > 100)
1464
info("WARNING: MessageTimeout is too high for effective fault-tolerance");
1663
else if (conf->msg_timeout > 100) {
1664
info("WARNING: MessageTimeout is too high for effective "
1466
1668
if (!s_p_get_uint16(&conf->min_job_age, "MinJobAge", hashtbl))
1467
1669
conf->min_job_age = DEFAULT_MIN_JOB_AGE;
1469
1671
if (!s_p_get_string(&conf->mpi_default, "MpiDefault", hashtbl))
1470
1672
conf->mpi_default = xstrdup(DEFAULT_MPI_DEFAULT);
1674
if (!s_p_get_string(&conf->accounting_storage_type,
1675
"AccountingStorageType", hashtbl)) {
1676
if(default_storage_type)
1677
conf->accounting_storage_type =
1678
xstrdup_printf("accounting_storage/%s",
1679
default_storage_type);
1681
conf->accounting_storage_type =
1682
xstrdup(DEFAULT_ACCOUNTING_STORAGE_TYPE);
1685
if (!s_p_get_uint16(&conf->accounting_storage_enforce,
1686
"AccountingStorageEnforce", hashtbl))
1687
conf->accounting_storage_enforce = DEFAULT_ACCOUNTING_ENFORCE;
1689
if (!s_p_get_string(&conf->accounting_storage_host,
1690
"AccountingStorageHost", hashtbl)) {
1691
if(default_storage_host)
1692
conf->accounting_storage_host =
1693
xstrdup(default_storage_host);
1695
conf->accounting_storage_host =
1696
xstrdup(DEFAULT_STORAGE_HOST);
1699
/* AccountingStorageLoc replaces JobAcctLogFile since it now represents
1700
* the database name also depending on the storage type you
1701
* use so we still check JobAcctLogFile for the same thing
1703
if (!s_p_get_string(&conf->accounting_storage_loc,
1704
"AccountingStorageLoc", hashtbl)
1705
&& !s_p_get_string(&conf->accounting_storage_loc,
1706
"JobAcctLogFile", hashtbl)) {
1707
if(default_storage_loc)
1708
conf->accounting_storage_loc =
1709
xstrdup(default_storage_loc);
1711
conf->accounting_storage_loc =
1712
xstrdup(DEFAULT_STORAGE_LOC);
1715
if (!s_p_get_string(&conf->accounting_storage_user,
1716
"AccountingStorageUser", hashtbl)) {
1717
if(default_storage_user)
1718
conf->accounting_storage_user =
1719
xstrdup(default_storage_user);
1721
conf->accounting_storage_user =
1722
xstrdup(DEFAULT_STORAGE_USER);
1724
if (!s_p_get_string(&conf->accounting_storage_pass,
1725
"AccountingStoragePass", hashtbl)) {
1726
if(default_storage_pass)
1727
conf->accounting_storage_pass =
1728
xstrdup(default_storage_pass);
1730
if (!s_p_get_uint32(&conf->accounting_storage_port,
1731
"AccountingStoragePort", hashtbl)) {
1732
if(default_storage_port)
1733
conf->accounting_storage_port = default_storage_port;
1735
conf->accounting_storage_port = DEFAULT_STORAGE_PORT;
1472
1737
if (!s_p_get_string(&conf->plugindir, "PluginDir", hashtbl))
1473
1738
conf->plugindir = xstrdup(default_plugin_path);