blob: 6b94c4ff4c00ebb9fdce43537d8b008c7f339f7b [file] [log] [blame]
William Lallemand48dfbbd2019-04-01 11:29:53 +02001/*
2 * Master Worker
3 *
4 * Copyright HAProxy Technologies 2019 - William Lallemand <wlallemand@haproxy.com>
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version
9 * 2 of the License, or (at your option) any later version.
10 *
11 */
12
William Lallemand3fa724d2019-04-01 11:29:55 +020013#include <errno.h>
14#include <fcntl.h>
15#include <signal.h>
William Lallemand48dfbbd2019-04-01 11:29:53 +020016#include <stdlib.h>
17#include <string.h>
William Lallemande25473c2019-04-01 11:29:56 +020018#include <sys/wait.h>
William Lallemand48dfbbd2019-04-01 11:29:53 +020019
William Lallemand88dc7c52019-04-01 11:30:01 +020020#include <common/initcall.h>
William Lallemand48dfbbd2019-04-01 11:29:53 +020021#include <common/mini-clist.h>
22
William Lallemand88dc7c52019-04-01 11:30:01 +020023#include <types/cli.h>
24#include <types/global.h>
25#include <types/peers.h>
26#include <types/signal.h>
27
28#include <proto/cli.h>
William Lallemand3fa724d2019-04-01 11:29:55 +020029#include <proto/fd.h>
30#include <proto/listener.h>
William Lallemande25473c2019-04-01 11:29:56 +020031#include <proto/log.h>
William Lallemand48dfbbd2019-04-01 11:29:53 +020032#include <proto/mworker.h>
William Lallemand88dc7c52019-04-01 11:30:01 +020033#include <proto/proxy.h>
William Lallemand3cd95d22019-04-01 11:29:54 +020034#include <proto/signal.h>
William Lallemand88dc7c52019-04-01 11:30:01 +020035#include <proto/stream.h>
36#include <proto/stream_interface.h>
William Lallemand48dfbbd2019-04-01 11:29:53 +020037
William Lallemand48dfbbd2019-04-01 11:29:53 +020038
William Lallemande25473c2019-04-01 11:29:56 +020039#if defined(USE_SYSTEMD)
40#include <systemd/sd-daemon.h>
41#endif
42
43static int exitcode = -1;
44
William Lallemande25473c2019-04-01 11:29:56 +020045/* ----- children processes handling ----- */
William Lallemand48dfbbd2019-04-01 11:29:53 +020046
William Lallemand48dfbbd2019-04-01 11:29:53 +020047/*
William Lallemande25473c2019-04-01 11:29:56 +020048 * Send signal to every known children.
49 */
50
51static void mworker_kill(int sig)
52{
William Lallemand3f128872019-04-01 11:29:59 +020053 struct mworker_proc *child;
William Lallemande25473c2019-04-01 11:29:56 +020054
William Lallemand3f128872019-04-01 11:29:59 +020055 list_for_each_entry(child, &proc_list, list) {
56 /* careful there, we must be sure that the pid > 0, we don't want to emit a kill -1 */
William Lallemand8f7069a2019-04-12 16:09:23 +020057 if ((child->options & (PROC_O_TYPE_WORKER|PROC_O_TYPE_PROG)) && (child->reloads == 0) && (child->pid > 0))
William Lallemand3f128872019-04-01 11:29:59 +020058 kill(child->pid, sig);
William Lallemande25473c2019-04-01 11:29:56 +020059 }
60}
61
62
63/* return 1 if a pid is a current child otherwise 0 */
William Lallemand3f128872019-04-01 11:29:59 +020064int mworker_current_child(int pid)
William Lallemande25473c2019-04-01 11:29:56 +020065{
William Lallemand3f128872019-04-01 11:29:59 +020066 struct mworker_proc *child;
William Lallemande25473c2019-04-01 11:29:56 +020067
William Lallemand3f128872019-04-01 11:29:59 +020068 list_for_each_entry(child, &proc_list, list) {
William Lallemand8f7069a2019-04-12 16:09:23 +020069 if ((child->options & (PROC_O_TYPE_WORKER|PROC_O_TYPE_PROG)) && (!(child->options & PROC_O_LEAVING)) && (child->pid == pid))
William Lallemande25473c2019-04-01 11:29:56 +020070 return 1;
71 }
72 return 0;
73}
74
William Lallemand3f128872019-04-01 11:29:59 +020075/*
76 * Return the number of new and old children (including workers and external
77 * processes)
78 */
79int mworker_child_nb()
80{
81 struct mworker_proc *child;
82 int ret = 0;
83
84 list_for_each_entry(child, &proc_list, list) {
William Lallemand8f7069a2019-04-12 16:09:23 +020085 if (child->options & (PROC_O_TYPE_WORKER|PROC_O_TYPE_PROG))
William Lallemand3f128872019-04-01 11:29:59 +020086 ret++;
87 }
88
89 return ret;
90}
91
92
William Lallemande25473c2019-04-01 11:29:56 +020093/*
William Lallemand48dfbbd2019-04-01 11:29:53 +020094 * serialize the proc list and put it in the environment
95 */
96void mworker_proc_list_to_env()
97{
98 char *msg = NULL;
99 struct mworker_proc *child;
100
101 list_for_each_entry(child, &proc_list, list) {
William Lallemand8f7069a2019-04-12 16:09:23 +0200102 char type = '?';
103
104 if (child->options & PROC_O_TYPE_MASTER)
105 type = 'm';
106 else if (child->options & PROC_O_TYPE_PROG)
107 type = 'e';
108 else if (child->options &= PROC_O_TYPE_WORKER)
109 type = 'w';
110
William Lallemand48dfbbd2019-04-01 11:29:53 +0200111 if (child->pid > -1)
William Lallemand8f7069a2019-04-12 16:09:23 +0200112 memprintf(&msg, "%s|type=%c;fd=%d;pid=%d;rpid=%d;reloads=%d;timestamp=%d;id=%s", msg ? msg : "", type, child->ipc_fd[0], child->pid, child->relative_pid, child->reloads, child->timestamp, child->id ? child->id : "");
William Lallemand48dfbbd2019-04-01 11:29:53 +0200113 }
114 if (msg)
115 setenv("HAPROXY_PROCESSES", msg, 1);
116}
117
118/*
119 * unserialize the proc list from the environment
120 */
121void mworker_env_to_proc_list()
122{
123 char *msg, *token = NULL, *s1;
124
125 msg = getenv("HAPROXY_PROCESSES");
126 if (!msg)
127 return;
128
129 while ((token = strtok_r(msg, "|", &s1))) {
130 struct mworker_proc *child;
131 char *subtoken = NULL;
132 char *s2;
133
134 msg = NULL;
135
136 child = calloc(1, sizeof(*child));
137
138 while ((subtoken = strtok_r(token, ";", &s2))) {
139
140 token = NULL;
141
142 if (strncmp(subtoken, "type=", 5) == 0) {
William Lallemand8f7069a2019-04-12 16:09:23 +0200143 char type;
144
145 type = *(subtoken+5);
146 if (type == 'm') { /* we are in the master, assign it */
William Lallemand48dfbbd2019-04-01 11:29:53 +0200147 proc_self = child;
William Lallemand8f7069a2019-04-12 16:09:23 +0200148 child->options |= PROC_O_TYPE_MASTER;
149 } else if (type == 'e') {
150 child->options |= PROC_O_TYPE_PROG;
151 } else if (type == 'w') {
152 child->options |= PROC_O_TYPE_WORKER;
153 }
154
William Lallemand48dfbbd2019-04-01 11:29:53 +0200155 } else if (strncmp(subtoken, "fd=", 3) == 0) {
156 child->ipc_fd[0] = atoi(subtoken+3);
157 } else if (strncmp(subtoken, "pid=", 4) == 0) {
158 child->pid = atoi(subtoken+4);
159 } else if (strncmp(subtoken, "rpid=", 5) == 0) {
160 child->relative_pid = atoi(subtoken+5);
161 } else if (strncmp(subtoken, "reloads=", 8) == 0) {
162 /* we reloaded this process once more */
163 child->reloads = atoi(subtoken+8) + 1;
164 } else if (strncmp(subtoken, "timestamp=", 10) == 0) {
165 child->timestamp = atoi(subtoken+10);
William Lallemand9a1ee7a2019-04-01 11:30:02 +0200166 } else if (strncmp(subtoken, "id=", 3) == 0) {
167 child->id = strdup(subtoken+3);
William Lallemand48dfbbd2019-04-01 11:29:53 +0200168 }
169 }
William Lallemand9a1ee7a2019-04-01 11:30:02 +0200170 if (child->pid) {
William Lallemand48dfbbd2019-04-01 11:29:53 +0200171 LIST_ADDQ(&proc_list, &child->list);
William Lallemand9a1ee7a2019-04-01 11:30:02 +0200172 } else {
173 free(child->id);
William Lallemand48dfbbd2019-04-01 11:29:53 +0200174 free(child);
William Lallemand9a1ee7a2019-04-01 11:30:02 +0200175
176 }
William Lallemand45286112019-04-12 16:09:21 +0200177 /* this is a process inherited from a reload that should be leaving */
178 child->options |= PROC_O_LEAVING;
William Lallemand48dfbbd2019-04-01 11:29:53 +0200179 }
180
181 unsetenv("HAPROXY_PROCESSES");
182}
William Lallemand3cd95d22019-04-01 11:29:54 +0200183
184/* Signal blocking and unblocking */
185
186void mworker_block_signals()
187{
188 sigset_t set;
189
190 sigemptyset(&set);
191 sigaddset(&set, SIGUSR1);
192 sigaddset(&set, SIGUSR2);
193 sigaddset(&set, SIGHUP);
194 sigaddset(&set, SIGCHLD);
195 ha_sigmask(SIG_SETMASK, &set, NULL);
196}
197
198void mworker_unblock_signals()
199{
200 haproxy_unblock_signals();
201}
William Lallemand3fa724d2019-04-01 11:29:55 +0200202
William Lallemande25473c2019-04-01 11:29:56 +0200203/* ----- mworker signal handlers ----- */
204
205/*
206 * When called, this function reexec haproxy with -sf followed by current
207 * children PIDs and possibly old children PIDs if they didn't leave yet.
208 */
209void mworker_catch_sighup(struct sig_handler *sh)
210{
211 mworker_reload();
212}
213
214void mworker_catch_sigterm(struct sig_handler *sh)
215{
216 int sig = sh->arg;
217
218#if defined(USE_SYSTEMD)
219 if (global.tune.options & GTUNE_USE_SYSTEMD) {
220 sd_notify(0, "STOPPING=1");
221 }
222#endif
223 ha_warning("Exiting Master process...\n");
224 mworker_kill(sig);
225}
226
227/*
228 * Wait for every children to exit
229 */
230
231void mworker_catch_sigchld(struct sig_handler *sh)
232{
233 int exitpid = -1;
234 int status = 0;
235 struct mworker_proc *child, *it;
236 int childfound;
237
238restart_wait:
239
240 childfound = 0;
241
242 exitpid = waitpid(-1, &status, WNOHANG);
243 if (exitpid > 0) {
244 if (WIFEXITED(status))
245 status = WEXITSTATUS(status);
246 else if (WIFSIGNALED(status))
247 status = 128 + WTERMSIG(status);
248 else if (WIFSTOPPED(status))
249 status = 128 + WSTOPSIG(status);
250 else
251 status = 255;
252
William Lallemand3f128872019-04-01 11:29:59 +0200253 /* delete the child from the process list */
William Lallemande25473c2019-04-01 11:29:56 +0200254 list_for_each_entry_safe(child, it, &proc_list, list) {
255 if (child->pid != exitpid)
256 continue;
257
258 LIST_DEL(&child->list);
259 close(child->ipc_fd[0]);
260 childfound = 1;
261 break;
262 }
263
William Lallemand3f128872019-04-01 11:29:59 +0200264 if (!childfound) {
265 /* We didn't find the PID in the list, that shouldn't happen but we can emit a warning */
William Lallemand9a1ee7a2019-04-01 11:30:02 +0200266 ha_warning("Process %d exited with code %d (%s)\n", exitpid, status, (status >= 128) ? strsignal(status - 128) : "Exit");
William Lallemande25473c2019-04-01 11:29:56 +0200267 } else {
William Lallemand9a1ee7a2019-04-01 11:30:02 +0200268 /* check if exited child is a current child */
William Lallemand45286112019-04-12 16:09:21 +0200269 if (!(child->options & PROC_O_LEAVING)) {
William Lallemand8f7069a2019-04-12 16:09:23 +0200270 if (child->options & PROC_O_TYPE_WORKER)
William Lallemand3f128872019-04-01 11:29:59 +0200271 ha_alert("Current worker #%d (%d) exited with code %d (%s)\n", child->relative_pid, exitpid, status, (status >= 128) ? strsignal(status - 128) : "Exit");
William Lallemand8f7069a2019-04-12 16:09:23 +0200272 else if (child->options & PROC_O_TYPE_PROG)
William Lallemand9a1ee7a2019-04-01 11:30:02 +0200273 ha_alert("Current program '%s' (%d) exited with code %d (%s)\n", child->id, exitpid, status, (status >= 128) ? strsignal(status - 128) : "Exit");
William Lallemand3f128872019-04-01 11:29:59 +0200274
William Lallemande25473c2019-04-01 11:29:56 +0200275 if (status != 0 && status != 130 && status != 143
276 && !(global.tune.options & GTUNE_NOEXIT_ONFAILURE)) {
William Lallemand9a1ee7a2019-04-01 11:30:02 +0200277 ha_alert("exit-on-failure: killing every processes with SIGTERM\n");
William Lallemande25473c2019-04-01 11:29:56 +0200278 if (exitcode < 0)
279 exitcode = status;
280 mworker_kill(SIGTERM);
281 }
282 } else {
William Lallemand8f7069a2019-04-12 16:09:23 +0200283 if (child->options & PROC_O_TYPE_WORKER) {
William Lallemand3f128872019-04-01 11:29:59 +0200284 ha_warning("Former worker #%d (%d) exited with code %d (%s)\n", child->relative_pid, exitpid, status, (status >= 128) ? strsignal(status - 128) : "Exit");
285 delete_oldpid(exitpid);
William Lallemand8f7069a2019-04-12 16:09:23 +0200286 } else if (child->options & PROC_O_TYPE_PROG) {
William Lallemand9a1ee7a2019-04-01 11:30:02 +0200287 ha_warning("Former program '%s' (%d) exited with code %d (%s)\n", child->id, exitpid, status, (status >= 128) ? strsignal(status - 128) : "Exit");
William Lallemand3f128872019-04-01 11:29:59 +0200288 }
William Lallemande25473c2019-04-01 11:29:56 +0200289 }
290 free(child);
291 }
292
293 /* do it again to check if it was the last worker */
294 goto restart_wait;
295 }
296 /* Better rely on the system than on a list of process to check if it was the last one */
297 else if (exitpid == -1 && errno == ECHILD) {
298 ha_warning("All workers exited. Exiting... (%d)\n", (exitcode > 0) ? exitcode : status);
299 atexit_flag = 0;
300 if (exitcode > 0)
301 exit(exitcode);
302 exit(status); /* parent must leave using the latest status code known */
303 }
304
305}
306
William Lallemand3fa724d2019-04-01 11:29:55 +0200307/* ----- IPC FD (sockpair) related ----- */
308
309/* This wrapper is called from the workers. It is registered instead of the
310 * normal listener_accept() so the worker can exit() when it detects that the
311 * master closed the IPC FD. If it's not a close, we just call the regular
312 * listener_accept() function */
313void mworker_accept_wrapper(int fd)
314{
315 char c;
316 int ret;
317
318 while (1) {
319 ret = recv(fd, &c, 1, MSG_PEEK);
320 if (ret == -1) {
321 if (errno == EINTR)
322 continue;
323 if (errno == EAGAIN) {
324 fd_cant_recv(fd);
325 return;
326 }
327 break;
328 } else if (ret > 0) {
329 listener_accept(fd);
330 return;
331 } else if (ret == 0) {
332 /* At this step the master is down before
333 * this worker perform a 'normal' exit.
334 * So we want to exit with an error but
335 * other threads could currently process
336 * some stuff so we can't perform a clean
337 * deinit().
338 */
339 exit(EXIT_FAILURE);
340 }
341 }
342 return;
343}
344
345/*
346 * This function register the accept wrapper for the sockpair of the master worker
347 */
348void mworker_pipe_register()
349{
350 /* The iocb should be already initialized with listener_accept */
351 if (fdtab[proc_self->ipc_fd[1]].iocb == mworker_accept_wrapper)
352 return;
353
354 fcntl(proc_self->ipc_fd[1], F_SETFL, O_NONBLOCK);
355 /* In multi-tread, we need only one thread to process
356 * events on the pipe with master
357 */
358 fd_insert(proc_self->ipc_fd[1], fdtab[proc_self->ipc_fd[1]].owner, mworker_accept_wrapper, 1);
359 fd_want_recv(proc_self->ipc_fd[1]);
360}
William Lallemand9001ce82019-04-01 11:29:57 +0200361
362/* ----- proxies ----- */
363/*
364 * Upon a reload, the master worker needs to close all listeners FDs but the mworker_pipe
365 * fd, and the FD provided by fd@
366 */
367void mworker_cleanlisteners()
368{
369 struct listener *l, *l_next;
370 struct proxy *curproxy;
371 struct peers *curpeers;
372
373 /* we might have to unbind some peers sections from some processes */
374 for (curpeers = cfg_peers; curpeers; curpeers = curpeers->next) {
375 if (!curpeers->peers_fe)
376 continue;
377
378 stop_proxy(curpeers->peers_fe);
379 /* disable this peer section so that it kills itself */
380 signal_unregister_handler(curpeers->sighandler);
381 task_delete(curpeers->sync_task);
382 task_free(curpeers->sync_task);
383 curpeers->sync_task = NULL;
384 task_free(curpeers->peers_fe->task);
385 curpeers->peers_fe->task = NULL;
386 curpeers->peers_fe = NULL;
387 }
388
389 for (curproxy = proxies_list; curproxy; curproxy = curproxy->next) {
390 int listen_in_master = 0;
391
392 list_for_each_entry_safe(l, l_next, &curproxy->conf.listeners, by_fe) {
393 /* remove the listener, but not those we need in the master... */
394 if (!(l->options & LI_O_MWORKER)) {
395 /* unbind the listener but does not close if
396 the FD is inherited with fd@ from the parent
397 process */
398 if (l->options & LI_O_INHERITED)
399 unbind_listener_no_close(l);
400 else
401 unbind_listener(l);
402 delete_listener(l);
403 } else {
404 listen_in_master = 1;
405 }
406 }
407 /* if the proxy shouldn't be in the master, we stop it */
408 if (!listen_in_master)
409 curproxy->state = PR_STSTOPPED;
410 }
William Lallemand88dc7c52019-04-01 11:30:01 +0200411}
412
413/* Displays workers and processes */
414static int cli_io_handler_show_proc(struct appctx *appctx)
415{
416 struct stream_interface *si = appctx->owner;
417 struct mworker_proc *child;
418 int old = 0;
419 int up = now.tv_sec - proc_self->timestamp;
420
421 if (unlikely(si_ic(si)->flags & (CF_WRITE_ERROR|CF_SHUTW)))
422 return 1;
423
424 chunk_reset(&trash);
425
426 chunk_printf(&trash, "#%-14s %-15s %-15s %-15s %s\n", "<PID>", "<type>", "<relative PID>", "<reloads>", "<uptime>");
427 chunk_appendf(&trash, "%-15u %-15s %-15u %-15d %dd %02dh%02dm%02ds\n", getpid(), "master", 0, proc_self->reloads, up / 86400, (up % 86400) / 3600, (up % 3600) / 60, (up % 60));
428
429 /* displays current processes */
430
431 chunk_appendf(&trash, "# workers\n");
432 list_for_each_entry(child, &proc_list, list) {
433 up = now.tv_sec - child->timestamp;
434
William Lallemand8f7069a2019-04-12 16:09:23 +0200435 if (!(child->options & PROC_O_TYPE_WORKER))
William Lallemand88dc7c52019-04-01 11:30:01 +0200436 continue;
437
William Lallemand45286112019-04-12 16:09:21 +0200438 if (child->options & PROC_O_LEAVING) {
William Lallemand88dc7c52019-04-01 11:30:01 +0200439 old++;
440 continue;
441 }
442 chunk_appendf(&trash, "%-15u %-15s %-15u %-15d %dd %02dh%02dm%02ds\n", child->pid, "worker", child->relative_pid, child->reloads, up / 86400, (up % 86400) / 3600, (up % 3600) / 60, (up % 60));
443 }
444
445 /* displays old processes */
446
447 if (old) {
448 char *msg = NULL;
449
450 chunk_appendf(&trash, "# old workers\n");
451 list_for_each_entry(child, &proc_list, list) {
452 up = now.tv_sec - child->timestamp;
453
William Lallemand8f7069a2019-04-12 16:09:23 +0200454 if (!(child->options & PROC_O_TYPE_WORKER))
William Lallemand88dc7c52019-04-01 11:30:01 +0200455 continue;
456
William Lallemand45286112019-04-12 16:09:21 +0200457 if (child->options & PROC_O_LEAVING) {
William Lallemand88dc7c52019-04-01 11:30:01 +0200458 memprintf(&msg, "[was: %u]", child->relative_pid);
459 chunk_appendf(&trash, "%-15u %-15s %-15s %-15d %dd %02dh%02dm%02ds\n", child->pid, "worker", msg, child->reloads, up / 86400, (up % 86400) / 3600, (up % 3600) / 60, (up % 60));
460 }
461 }
462 free(msg);
463 }
464
William Lallemandad53d6d2019-04-01 11:30:03 +0200465 /* displays external process */
466 chunk_appendf(&trash, "# programs\n");
467 old = 0;
468 list_for_each_entry(child, &proc_list, list) {
469 up = now.tv_sec - child->timestamp;
470
William Lallemand8f7069a2019-04-12 16:09:23 +0200471 if (!(child->options & PROC_O_TYPE_PROG))
William Lallemandad53d6d2019-04-01 11:30:03 +0200472 continue;
473
William Lallemand45286112019-04-12 16:09:21 +0200474 if (child->options & PROC_O_LEAVING) {
William Lallemandad53d6d2019-04-01 11:30:03 +0200475 old++;
476 continue;
477 }
478 chunk_appendf(&trash, "%-15u %-15s %-15s %-15d %dd %02dh%02dm%02ds\n", child->pid, child->id, "-", child->reloads, up / 86400, (up % 86400) / 3600, (up % 3600) / 60, (up % 60));
479 }
480
481 if (old) {
482 chunk_appendf(&trash, "# old programs\n");
483 list_for_each_entry(child, &proc_list, list) {
484 up = now.tv_sec - child->timestamp;
485
William Lallemand8f7069a2019-04-12 16:09:23 +0200486 if (!(child->options & PROC_O_TYPE_PROG))
William Lallemandad53d6d2019-04-01 11:30:03 +0200487 continue;
488
William Lallemand45286112019-04-12 16:09:21 +0200489 if (child->options & PROC_O_LEAVING) {
William Lallemandad53d6d2019-04-01 11:30:03 +0200490 chunk_appendf(&trash, "%-15u %-15s %-15s %-15d %dd %02dh%02dm%02ds\n", child->pid, child->id, "-", child->reloads, up / 86400, (up % 86400) / 3600, (up % 3600) / 60, (up % 60));
491 }
492 }
493 }
494
495
496
William Lallemand88dc7c52019-04-01 11:30:01 +0200497 if (ci_putchk(si_ic(si), &trash) == -1) {
498 si_rx_room_blk(si);
499 return 0;
500 }
501
502 /* dump complete */
503 return 1;
William Lallemand9001ce82019-04-01 11:29:57 +0200504}
William Lallemand88dc7c52019-04-01 11:30:01 +0200505
506/* reload the master process */
507static int cli_parse_reload(char **args, char *payload, struct appctx *appctx, void *private)
508{
509 if (!cli_has_level(appctx, ACCESS_LVL_OPER))
510 return 1;
511
512 mworker_reload();
513
514 return 1;
515}
516
517
518/* register cli keywords */
519static struct cli_kw_list cli_kws = {{ },{
520 { { "@<relative pid>", NULL }, "@<relative pid> : send a command to the <relative pid> process", NULL, cli_io_handler_show_proc, NULL, NULL, ACCESS_MASTER_ONLY},
521 { { "@!<pid>", NULL }, "@!<pid> : send a command to the <pid> process", cli_parse_default, NULL, NULL, NULL, ACCESS_MASTER_ONLY},
522 { { "@master", NULL }, "@master : send a command to the master process", cli_parse_default, NULL, NULL, NULL, ACCESS_MASTER_ONLY},
523 { { "show", "proc", NULL }, "show proc : show processes status", cli_parse_default, cli_io_handler_show_proc, NULL, NULL, ACCESS_MASTER_ONLY},
524 { { "reload", NULL }, "reload : reload haproxy", cli_parse_reload, NULL, NULL, NULL, ACCESS_MASTER_ONLY},
525 {{},}
526}};
527
528INITCALL1(STG_REGISTER, cli_register_kw, &cli_kws);