19 #include <ndb_global.h>
20 #include <util/ndb_opts.h>
21 #include <util/NdbOut.hpp>
22 #include <util/BaseString.hpp>
29 unsigned idx,
const char * hostname);
33 PO_NDB = atrt_options::AO_NDBCLUSTER
37 ,PO_REP = (atrt_options::AO_REPLICATION | PO_REP_SLAVE | PO_REP_MASTER)
49 {
"--FileSystemPath=", atrt_process::AP_NDBD, 0 }
50 ,{
"--PortNumber=", atrt_process::AP_NDB_MGMD, 0 }
51 ,{
"--datadir=", atrt_process::AP_MYSQLD, 0 }
52 ,{
"--socket=", atrt_process::AP_MYSQLD | atrt_process::AP_CLIENT, 0 }
53 ,{
"--port=", atrt_process::AP_MYSQLD | atrt_process::AP_CLIENT, 0 }
54 ,{
"--host=", atrt_process::AP_CLIENT, 0 }
55 ,{
"--server-id=", atrt_process::AP_MYSQLD, PO_REP }
56 ,{
"--log-bin", atrt_process::AP_MYSQLD, PO_REP_MASTER }
57 ,{
"--master-host=", atrt_process::AP_MYSQLD, PO_REP_SLAVE }
58 ,{
"--master-port=", atrt_process::AP_MYSQLD, PO_REP_SLAVE }
59 ,{
"--master-user=", atrt_process::AP_MYSQLD, PO_REP_SLAVE }
60 ,{
"--master-password=", atrt_process::AP_MYSQLD, PO_REP_SLAVE }
61 ,{
"--ndb-connectstring=", atrt_process::AP_MYSQLD | atrt_process::AP_CLUSTER
63 ,{
"--ndbcluster", atrt_process::AP_MYSQLD, PO_NDB }
66 const char * ndbcs =
"--ndb-connectstring=";
78 tmp.split(clusters,
",");
80 bool fqpn = clusters.size() > 1 || g_fqpn;
83 for (
size_t i = 0;
i<clusters.size();
i++)
86 config.m_clusters.push_back(cluster);
88 cluster->m_name = clusters[
i];
89 cluster->m_options.m_features = 0;
92 cluster->m_dir.
assfmt(
"cluster%s/", cluster->m_name.
c_str());
98 cluster->m_next_nodeid= 1;
101 const char * argv[] = {
"atrt", 0, 0 };
104 buf.
assfmt(
"--defaults-group-suffix=%s", clusters[
i].c_str());
105 argv[argc++] = buf.
c_str();
106 char ** tmp = (
char**)argv;
107 const char *groups[] = {
"cluster_config", 0 };
108 int ret = load_defaults(g_my_cnf, groups, &argc, &tmp);
111 g_logger.
error(
"Unable to load defaults for cluster: %s",
112 clusters[
i].c_str());
118 atrt_process::Type
type;
122 { atrt_process::AP_NDB_MGMD,
"--ndb_mgmd=", 0 },
123 { atrt_process::AP_NDBD,
"--ndbd=", 0 },
124 { atrt_process::AP_NDB_API,
"--ndbapi=", 0 },
125 { atrt_process::AP_NDB_API,
"--api=", 0 },
126 { atrt_process::AP_MYSQLD,
"--mysqld=", 0 },
127 { atrt_process::AP_ALL, 0, 0}
133 for (j = 0; j<(size_t)argc; j++)
135 if (my_getopt_is_args_separator(tmp[j]))
137 for (k = 0; proc_args[k].name; k++)
139 if (!strncmp(tmp[j], proc_args[k].
name, strlen(proc_args[k].name)))
141 proc_args[k].value = tmp[j] + strlen(proc_args[k].name);
147 if (strcmp(clusters[
i].c_str(),
".atrt") == 0)
152 proc_args[0].value = 0;
153 proc_args[1].value = 0;
154 proc_args[2].value = 0;
155 proc_args[3].value = 0;
156 proc_args[4].value = atrt_mysqld;
162 for (j = 0; proc_args[j].name; j++)
164 if (proc_args[j].value)
168 tmp.split(list,
",");
169 for (k = 0; k<list.size(); k++)
170 if (!load_process(config, *cluster, proc_args[j].
type,
171 k + 1, list[k].c_str()))
181 const char * argv[] = {
"atrt", 0, 0 };
182 argv[argc++] = buf.
c_str();
183 const char *groups[] = {
"mysql_cluster", 0 };
184 char ** tmp = (
char**)argv;
185 ret = load_defaults(g_my_cnf, groups, &argc, &tmp);
189 g_logger.
error(
"Unable to load defaults for cluster: %s",
190 clusters[
i].c_str());
194 load_options(argc, tmp, atrt_process::AP_CLUSTER, cluster->m_options);
203 for (
size_t i = 0;
i<hosts.size();
i++){
204 if (hosts[
i]->m_hostname == hostname){
210 host->m_index = hosts.size();
212 host->m_basedir = g_basedir;
213 host->m_user = g_user;
214 host->m_hostname = hostname;
215 hosts.push_back(host);
222 atrt_process::Type
type,
224 const char * hostname)
226 atrt_host * host_ptr = find(hostname, config.m_hosts);
229 const unsigned proc_no = (unsigned)config.m_processes.size();
230 config.m_processes.push_back(proc_ptr);
231 host_ptr->m_processes.push_back(proc_ptr);
232 cluster.m_processes.push_back(proc_ptr);
238 proc.m_host = host_ptr;
239 proc.m_save.m_saved =
false;
241 proc.m_cluster = &cluster;
242 proc.m_options.m_features = 0;
244 proc.m_proc.m_id = -1;
245 proc.m_proc.m_type =
"temporary";
246 proc.m_proc.m_owner =
"atrt";
247 proc.m_proc.m_group = cluster.m_name.
c_str();
248 proc.m_proc.m_stdout =
"log.out";
249 proc.m_proc.m_stderr =
"2>&1";
250 proc.m_proc.m_runas = proc.m_host->m_user;
251 proc.m_proc.m_ulimit =
"c:unlimited";
252 proc.m_proc.m_env.
assfmt(
"MYSQL_BASE_DIR=%s", g_prefix);
253 proc.m_proc.m_env.
appfmt(
" MYSQL_HOME=%s", g_basedir);
254 proc.m_proc.m_env.
appfmt(
" ATRT_PID=%u", (
unsigned)proc_no);
255 proc.m_proc.m_shutdown_options =
"";
258 const char * argv[] = {
"atrt", 0, 0 };
261 char ** tmp = (
char**)argv;
262 const char *groups[] = { 0, 0, 0, 0 };
264 case atrt_process::AP_NDB_MGMD:
265 proc.m_nodeid= cluster.m_next_nodeid++;
267 groups[0] =
"cluster_config";
268 buf[1].
assfmt(
"cluster_config.ndb_mgmd.%u", idx);
269 groups[1] = buf[1].
c_str();
270 buf[0].
assfmt(
"--defaults-group-suffix=%s", cluster.m_name.
c_str());
271 argv[argc++] = buf[0].
c_str();
273 case atrt_process::AP_NDBD:
275 proc.m_nodeid= cluster.m_next_nodeid++;
277 groups[0] =
"cluster_config";
278 buf[1].
assfmt(
"cluster_config.ndbd.%u", idx);
279 groups[1] = buf[1].
c_str();
280 buf[0].
assfmt(
"--defaults-group-suffix=%s", cluster.m_name.
c_str());
281 argv[argc++] = buf[0].
c_str();
283 case atrt_process::AP_MYSQLD:
285 proc.m_nodeid= cluster.m_next_nodeid++;
287 groups[0] =
"mysqld";
288 groups[1] =
"mysql_cluster";
289 buf[0].
assfmt(
"--defaults-group-suffix=.%u%s",idx,cluster.m_name.
c_str());
290 argv[argc++] = buf[0].
c_str();
292 case atrt_process::AP_CLIENT:
293 buf[0].
assfmt(
"client.%u%s", idx, cluster.m_name.
c_str());
294 groups[0] = buf[0].
c_str();
296 case atrt_process::AP_NDB_API:
298 proc.m_nodeid= cluster.m_next_nodeid++;
301 g_logger.
critical(
"Unhandled process type: %d", type);
305 int ret = load_defaults(g_my_cnf, groups, &argc, &tmp);
308 g_logger.
error(
"Unable to load defaults for cluster: %s",
309 cluster.m_name.
c_str());
313 load_options(argc, tmp, type, proc.m_options);
317 proc.m_host->m_basedir.
c_str(),
318 cluster.m_dir.
c_str());
321 case atrt_process::AP_NDB_MGMD:
323 proc.m_proc.m_name.
assfmt(
"%u-%s", proc_no,
"ndb_mgmd");
324 proc.m_proc.m_path.
assign(g_prefix).
append(
"/libexec/ndb_mgmd");
325 proc.m_proc.m_args.
assfmt(
"--defaults-file=%s/my.cnf",
326 proc.m_host->m_basedir.
c_str());
327 proc.m_proc.m_args.
appfmt(
" --defaults-group-suffix=%s",
328 cluster.m_name.
c_str());
329 proc.m_proc.m_args.
append(
" --nodaemon --mycnf");
330 proc.m_proc.m_args.
appfmt(
" --ndb-nodeid=%u", proc.m_nodeid);
331 proc.m_proc.m_cwd.
assfmt(
"%sndb_mgmd.%u", dir.
c_str(), proc.m_index);
332 proc.m_proc.m_args.
appfmt(
" --configdir=%s", proc.m_proc.m_cwd.
c_str());
333 proc.m_proc.m_env.
appfmt(
" MYSQL_GROUP_SUFFIX=%s",
334 cluster.m_name.
c_str());
337 case atrt_process::AP_NDBD:
339 if (g_mt == 0 || (g_mt == 1 && ((g_mt_rr++) & 1) == 0))
341 proc.m_proc.m_path.
assign(g_prefix).
append(
"/libexec/ndbd");
345 proc.m_proc.m_path.
assign(g_prefix).
append(
"/libexec/ndbmtd");
348 proc.m_proc.m_name.
assfmt(
"%u-%s", proc_no,
"ndbd");
349 proc.m_proc.m_args.
assfmt(
"--defaults-file=%s/my.cnf",
350 proc.m_host->m_basedir.
c_str());
351 proc.m_proc.m_args.
appfmt(
" --defaults-group-suffix=%s",
352 cluster.m_name.
c_str());
353 proc.m_proc.m_args.
append(
" --nodaemon --initial -n");
355 proc.m_proc.m_args.
appfmt(
" --ndb-nodeid=%u", proc.m_nodeid);
356 proc.m_proc.m_cwd.
assfmt(
"%sndbd.%u", dir.
c_str(), proc.m_index);
357 proc.m_proc.m_env.
appfmt(
" MYSQL_GROUP_SUFFIX=%s",
358 cluster.m_name.
c_str());
361 case atrt_process::AP_MYSQLD:
363 proc.m_proc.m_name.
assfmt(
"%u-%s", proc_no,
"mysqld");
364 proc.m_proc.m_path.
assign(g_prefix).
append(
"/libexec/mysqld");
365 proc.m_proc.m_args.
assfmt(
"--defaults-file=%s/my.cnf",
366 proc.m_host->m_basedir.
c_str());
367 proc.m_proc.m_args.
appfmt(
" --defaults-group-suffix=.%d%s",
369 cluster.m_name.
c_str());
370 proc.m_proc.m_args.
append(
" --core-file");
372 proc.m_proc.m_args.
appfmt(
" --ndb-nodeid=%d", proc.m_nodeid);
376 if (cluster.m_options.m_loaded.get(ndbcs, &val)) {
377 proc.m_proc.m_args.
appfmt(
" %s=%s", ndbcs, val);
380 proc.m_proc.m_cwd.
appfmt(
"%smysqld.%u", dir.
c_str(), proc.m_index);
381 proc.m_proc.m_shutdown_options =
"SIGKILL";
382 proc.m_proc.m_env.
appfmt(
" MYSQL_GROUP_SUFFIX=.%u%s",
384 cluster.m_name.
c_str());
387 case atrt_process::AP_NDB_API:
389 proc.m_proc.m_name.
assfmt(
"%u-%s", proc_no,
"ndb_api");
390 proc.m_proc.m_path =
"";
391 proc.m_proc.m_args =
"";
392 proc.m_proc.m_cwd.
appfmt(
"%sndb_api.%u", dir.
c_str(), proc.m_index);
393 proc.m_proc.m_env.
appfmt(
" MYSQL_GROUP_SUFFIX=%s",
394 cluster.m_name.
c_str());
397 case atrt_process::AP_CLIENT:
399 proc.m_proc.m_name.
assfmt(
"%u-%s", proc_no,
"mysql");
400 proc.m_proc.m_path =
"";
401 proc.m_proc.m_args =
"";
402 proc.m_proc.m_cwd.
appfmt(
"%s/client.%u", dir.
c_str(), proc.m_index);
403 proc.m_proc.m_env.
appfmt(
" MYSQL_GROUP_SUFFIX=.%d%s",
405 cluster.m_name.
c_str());
408 case atrt_process::AP_ALL:
409 case atrt_process::AP_CLUSTER:
410 g_logger.
critical(
"Unhandled process type: %d", proc.m_type);
414 if (type == atrt_process::AP_MYSQLD)
419 if (!load_process(config, cluster, atrt_process::AP_CLIENT, idx, hostname))
425 if (type == atrt_process::AP_CLIENT)
427 proc.m_mysqld = cluster.m_processes[cluster.m_processes.size()-2];
435 load_options(
int argc,
char** argv,
int type,
atrt_options& opts)
437 for (
size_t i = 0;
i<(size_t)argc;
i++)
439 if (ndb_is_load_default_arg_separator(argv[
i]))
441 for (
size_t j = 0; f_options[j].name; j++)
443 const char *
name = f_options[j].name;
444 const size_t len = strlen(name);
446 if ((f_options[j].type & type) && strncmp(argv[i], name, len) == 0)
448 opts.m_loaded.
put(name, argv[i]+len,
true);
483 { atrt_process::AP_CLUSTER, pr_check_features, 0 }
484 ,{ atrt_process::AP_MYSQLD, pr_check_replication, 0 }
485 ,{ (atrt_process::AP_ALL & ~
atrt_process::AP_CLIENT), pr_proc_options,
487 ,{ (atrt_process::AP_ALL & ~
atrt_process::AP_CLIENT), pr_proc_options, PO_REP }
488 ,{ atrt_process::AP_CLIENT, pr_fix_client, 0 }
489 ,{ atrt_process::AP_CLUSTER, pr_fix_ndb_connectstring, 0 }
490 ,{ atrt_process::AP_MYSQLD, pr_set_ndb_connectstring, 0 }
491 ,{ atrt_process::AP_ALL, pr_check_proc, 0 }
500 for (
size_t i = 0; f_rules[
i].func; i++)
504 memset(&ctx, 0,
sizeof(ctx));
506 ctx.m_config = &config;
508 for (
size_t j = 0; j < config.m_clusters.size(); j++)
510 ctx.m_cluster = config.m_clusters[j];
512 if (f_rules[i].type & atrt_process::AP_CLUSTER)
514 g_logger.
debug(
"applying rule %u to cluster %s", (
unsigned)i,
515 ctx.m_cluster->m_name.
c_str());
516 if (! (* f_rules[i].func)(props, ctx, f_rules[
i].extra))
522 for (
size_t k = 0; k<cluster.m_processes.size(); k++)
525 ctx.m_process = cluster.m_processes[k];
526 if (proc.m_type & f_rules[i].type)
528 g_logger.
debug(
"applying rule %u to %s", (
unsigned)i,
529 proc.m_proc.m_cwd.
c_str());
530 if (! (* f_rules[i].func)(props, ctx, f_rules[
i].extra))
548 find(
atrt_config& config,
int type,
const char * name)
561 cl.
appfmt(
".%s", src[1].c_str());
562 for (
size_t i = 0; i<config.m_clusters.size(); i++)
564 if (config.m_clusters[i]->m_name == cl)
566 cluster = config.m_clusters[
i];
576 int idx = atoi(src[0].c_str()) - 1;
577 for (
size_t i = 0; i<cluster->m_processes.size(); i++)
579 if (cluster->m_processes[i]->m_type & type)
582 return cluster->m_processes[
i];
595 if (! (ctx.m_config->m_replication ==
""))
598 ctx.m_config->m_replication.
split(list,
";");
601 ctx.m_config->m_replication =
"";
603 const char *
msg =
"Invalid replication specification";
604 for (
size_t i = 0; i<list.size(); i++)
607 list[
i].split(rep,
":");
610 g_logger.
error(
"%s: %s (split: %d)", msg, list[i].c_str(), rep.size());
614 atrt_process* src = find(config, atrt_process::AP_MYSQLD,rep[0].c_str());
615 atrt_process* dst = find(config, atrt_process::AP_MYSQLD,rep[1].c_str());
617 if (src == 0 || dst == 0)
619 g_logger.
error(
"%s: %s (%d %d)",
620 msg, list[i].c_str(), src != 0, dst != 0);
625 if (dst->m_rep_src != 0)
627 g_logger.
error(
"%s: %s : %s already has replication src (%s)",
630 dst->m_proc.m_cwd.
c_str(),
631 dst->m_rep_src->m_proc.m_cwd.
c_str());
635 dst->m_rep_src = src;
636 src->m_rep_dst.push_back(dst);
638 src->m_options.m_features |= PO_REP_MASTER;
639 dst->m_options.m_features |= PO_REP_SLAVE;
651 for (
size_t i = 0; i<cluster.m_processes.size(); i++)
653 if (cluster.m_processes[i]->m_type == atrt_process::AP_NDB_MGMD ||
654 cluster.m_processes[i]->m_type == atrt_process::AP_NDB_API ||
655 cluster.m_processes[i]->m_type == atrt_process::AP_MYSQLD ||
656 cluster.m_processes[i]->m_type == atrt_process::AP_NDBD)
658 features |= atrt_options::AO_NDBCLUSTER;
665 cluster.m_options.m_features |= features;
666 for (
size_t i = 0; i<cluster.m_processes.size(); i++)
668 cluster.m_processes[
i]->m_options.m_features |= features;
679 const char * val, *name =
"--host=";
680 if (!proc.m_options.m_loaded.get(name, &val))
682 val = proc.m_mysqld->m_host->m_hostname.
c_str();
683 proc.m_options.m_loaded.
put(name, val);
684 proc.m_options.m_generated.
put(name, val);
687 for (
size_t i = 0; f_options[
i].name; i++)
690 const char * name = opt.name;
691 if (opt.type & atrt_process::AP_CLIENT)
694 if (!proc.m_options.m_loaded.get(name, &val))
696 require(proc.m_mysqld->m_options.m_loaded.get(name, &val));
697 proc.m_options.m_loaded.
put(name, val);
698 proc.m_options.m_generated.
put(name, val);
711 strcmp(name,
"--port=") == 0 ? 3306 :
712 strcmp(name,
"--PortNumber=") == 0 ? 1186 :
716 for (
size_t i = 0; i<host->m_processes.size(); i++)
719 if (host->m_processes[i]->m_options.m_loaded.get(name, &val))
721 if ((Uint32)atoi(val) == port)
733 if (strcmp(name,
"--port=") == 0 ||
734 strcmp(name,
"--PortNumber=") == 0)
737 if (g_default_ports == 0 || (val = try_default_port(proc, name)) == 0)
740 props.get(
"--PortNumber=", &val);
741 props.
put(
"--PortNumber=", (val + 1),
true);
746 opts.m_loaded.
put(name, buf);
747 opts.m_generated.
put(name, buf);
750 else if (strcmp(name,
"--datadir=") == 0)
752 opts.m_loaded.
put(name, proc.m_proc.m_cwd.
c_str());
753 opts.m_generated.
put(name, proc.m_proc.m_cwd.
c_str());
756 else if (strcmp(name,
"--FileSystemPath=") == 0)
758 opts.m_loaded.
put(name, proc.m_proc.m_cwd.
c_str());
759 opts.m_generated.
put(name, proc.m_proc.m_cwd.
c_str());
762 else if (strcmp(name,
"--socket=") == 0)
764 const char * sock = 0;
767 sock =
"/tmp/mysql.sock";
769 for (
size_t i = 0; i<host->m_processes.size(); i++)
772 if (host->m_processes[i]->m_options.m_loaded.get(name, &val))
774 if (strcmp(sock, val) == 0)
786 tmp.
assfmt(
"%s/mysql.sock", proc.m_proc.m_cwd.
c_str());
790 opts.m_loaded.
put(name, sock);
791 opts.m_generated.
put(name, sock);
794 else if (strcmp(name,
"--server-id=") == 0)
797 props.get(name, &val);
800 opts.m_loaded.
put(name, buf);
801 opts.m_generated.
put(name, buf);
802 props.
put(name, (val + 1),
true);
805 else if (strcmp(name,
"--log-bin") == 0)
807 opts.m_loaded.
put(name,
"");
808 opts.m_generated.
put(name,
"");
811 else if (strcmp(name,
"--master-host=") == 0)
813 require(proc.m_rep_src != 0);
814 opts.m_loaded.
put(name, proc.m_rep_src->m_host->m_hostname.
c_str());
815 opts.m_generated.
put(name, proc.m_rep_src->m_host->m_hostname.
c_str());
818 else if (strcmp(name,
"--master-port=") == 0)
821 require(proc.m_rep_src->m_options.m_loaded.get(
"--port=", &val));
822 opts.m_loaded.
put(name, val);
823 opts.m_generated.
put(name, val);
826 else if (strcmp(name,
"--master-user=") == 0)
828 opts.m_loaded.
put(name,
"root");
829 opts.m_generated.
put(name,
"root");
832 else if (strcmp(name,
"--master-password=") == 0)
834 opts.m_loaded.
put(name,
"\"\"");
835 opts.m_generated.
put(name,
"\"\"");
839 g_logger.
warning(
"Unknown parameter: %s", name);
847 for (
size_t i = 0; f_options[
i].name; i++)
851 const char * name = opt.name;
852 if (opt.type & proc.m_type)
854 if (opt.options == 0 ||
855 (opt.options & extra & proc.m_options.m_features))
858 if (!proc.m_options.m_loaded.get(name, &val))
860 generate(proc, name, props);
875 if (cluster.m_options.m_features & atrt_options::AO_NDBCLUSTER)
877 if (!cluster.m_options.m_loaded.get(ndbcs, &val))
883 for (
size_t i = 0; i<cluster.m_processes.size(); i++)
886 if (tmp->m_type == atrt_process::AP_NDB_MGMD)
893 require(tmp->m_options.m_loaded.get(
"--PortNumber=", &port));
894 str.
appfmt(
"%s:%s", tmp->m_host->m_hostname.
c_str(), port);
897 cluster.m_options.m_loaded.
put(ndbcs, str.
c_str());
898 cluster.m_options.m_generated.
put(ndbcs, str.
c_str());
899 cluster.m_options.m_loaded.get(ndbcs, &val);
902 for (
size_t i = 0; i<cluster.m_processes.size(); i++)
904 cluster.m_processes[
i]->m_proc.m_env.appfmt(
" NDB_CONNECTSTRING=%s",
918 if (proc.m_options.m_features & atrt_options::AO_NDBCLUSTER)
920 if (!proc.m_options.m_loaded.get(ndbcs, &val))
922 require(proc.m_cluster->m_options.m_loaded.get(ndbcs, &val));
923 proc.m_options.m_loaded.
put(ndbcs, val);
924 proc.m_options.m_generated.
put(ndbcs, val);
927 if (!proc.m_options.m_loaded.get(
"--ndbcluster", &val))
929 proc.m_options.m_loaded.
put(
"--ndbcluster",
"");
930 proc.m_options.m_generated.
put(
"--ndbcluster",
"");
941 bool generated =
false;
942 const int setup = ctx.m_setup;
944 for (
size_t i = 0; f_options[
i].name; i++)
947 const char * name = opt.name;
948 if ((ctx.m_process->m_type & opt.type) &&
949 (opt.options == 0 || (ctx.m_process->m_options.m_features & opt.options)))
952 if (!proc.m_options.m_loaded.get(name, &val))
955 g_logger.
warning(
"Missing parameter: %s for %s",
956 name, proc.m_proc.m_cwd.
c_str());
958 else if (proc.m_options.m_generated.get(name, &val))
963 g_logger.
warning(
"Missing parameter: %s for %s",
964 name, proc.m_proc.m_cwd.
c_str());
976 ctx.m_config->m_generated =
true;
988 out <<
"[ atrt_process: ";
990 case atrt_process::AP_NDB_MGMD:
993 case atrt_process::AP_NDBD:
996 case atrt_process::AP_MYSQLD:
999 case atrt_process::AP_NDB_API:
1002 case atrt_process::AP_CLIENT:
1006 out <<
"<unknown: " << (int)proc.m_type <<
" >";
1009 out <<
" cluster: " << proc.m_cluster->m_name.
c_str()
1010 <<
" host: " << proc.m_host->m_hostname.
c_str()
1011 << endl <<
" cwd: " << proc.m_proc.m_cwd.
c_str()
1012 << endl <<
" path: " << proc.m_proc.m_path.
c_str()
1013 << endl <<
" args: " << proc.m_proc.m_args.
c_str()
1014 << endl <<
" env: " << proc.m_proc.m_env.
c_str() << endl;
1016 proc.m_options.m_generated.print(stdout,
"generated: ");
1022 proc.m_host = host_ptr;
1023 proc.m_cluster = cluster;
1024 proc.m_proc.m_id = -1;
1025 proc.m_proc.m_type =
"temporary";
1026 proc.m_proc.m_owner =
"atrt";
1027 proc.m_proc.m_group = cluster->m_name.
c_str();
1029 proc.m_proc.m_stdout =
"log.out";
1030 proc.m_proc.m_stderr =
"2>&1";
1031 proc.m_proc.m_runas = proc.m_host->m_user;
1032 proc.m_proc.m_ulimit =
"c:unlimited";
1033 proc.m_proc.m_env.
assfmt(
"MYSQL_BASE_DIR=%s", dir);
1034 proc.m_proc.m_shutdown_options =
"";