lxc.tty = 6
# Set the halt/stop signals
-lxc.haltsignal=SIGRTMIN+4
-lxc.stopsignal=SIGRTMIN+14
+lxc.signal.halt=SIGRTMIN+4
+lxc.signal.stop=SIGRTMIN+14
# Uncomment to disable creating tty devices subdirectory in /dev
# lxc.devttydir =
lxc.environment=VIRTUALIZATION=lxc
# Set the halt/stop signals
-lxc.haltsignal=SIGCONT
+lxc.signal.halt=SIGCONT
# Uncomment to disable creating tty devices subdirectory in /dev
lxc.environment=VIRTUALIZATION=lxc
# Set the halt/stop signals
-lxc.haltsignal=SIGCONT
+lxc.signal.halt=SIGCONT
<command>lxc-stop</command> reboots, cleanly shuts down, or kills
all the processes inside the container. By default, it will
request a clean shutdown of the container by sending
- <command>lxc.haltsignal</command> (defaults to SIGPWR) to
+ <command>lxc.signal.halt</command> (defaults to SIGPWR) to
the container's init process, waiting up to 60 seconds for the container
to exit, and then returning. If the container fails to cleanly exit in
- 60 seconds, it will be sent the <command>lxc.stopsignal</command>
+ 60 seconds, it will be sent the <command>lxc.signal.stop</command>
(defaults to SIGKILL) to force it to shut down. A request to reboot will
- send the <command>lxc.rebootsignal</command> (defaults to SIGINT) to the
+ send the <command>lxc.signal.reboot</command> (defaults to SIGINT) to the
container's init process.
-->
<command>lxc-stop</command> は、リブート、クリーンシャットダウン、コンテナ内の全てのプロセスの kill のどれかを行います。
- デフォルトでは、コンテナのクリーンなシャットダウンを <command>lxc.haltsignal</command> (デフォルトでは SIGPWR) をコンテナの init プロセスに送ることでリクエストし、コンテナの終了を 60 秒待ち、return します。
- コンテナが 60 秒の間にクリーンに終了するのに失敗した場合、<command>lxc.stopsignal</command> (デフォルトは SIGKILL です) を送り、強制的にシャットダウンします。
- リブートのリクエストは <command>lxc.rebootsignal</command> に設定されたシグナルをコンテナの init プロセスに送ります (デフォルトは SIGINT です)。
+ デフォルトでは、コンテナのクリーンなシャットダウンを <command>lxc.signal.halt</command> (デフォルトでは SIGPWR) をコンテナの init プロセスに送ることでリクエストし、コンテナの終了を 60 秒待ち、return します。
+ コンテナが 60 秒の間にクリーンに終了するのに失敗した場合、<command>lxc.signal.stop</command> (デフォルトは SIGKILL です) を送り、強制的にシャットダウンします。
+ リブートのリクエストは <command>lxc.signal.reboot</command> に設定されたシグナルをコンテナの init プロセスに送ります (デフォルトは SIGINT です)。
</para>
<para>
<variablelist>
<varlistentry>
<term>
- <option>lxc.haltsignal</option>
+ <option>lxc.signal.halt</option>
</term>
<listitem>
<para>
<variablelist>
<varlistentry>
<term>
- <option>lxc.rebootsignal</option>
+ <option>lxc.signal.reboot</option>
</term>
<listitem>
<para>
<variablelist>
<varlistentry>
<term>
- <option>lxc.stopsignal</option>
+ <option>lxc.signal.stop</option>
</term>
<listitem>
<para>
<command>lxc-stop</command> reboots, cleanly shuts down, or kills
all the processes inside the container. By default, it will
request a clean shutdown of the container by sending
- <command>lxc.haltsignal</command> (defaults to SIGPWR) to
+ <command>lxc.signal.halt</command> (defaults to SIGPWR) to
the container's init process, waiting up to 60 seconds for the container
to exit, and then returning. If the container fails to cleanly exit in
- 60 seconds, it will be sent the <command>lxc.stopsignal</command>
+ 60 seconds, it will be sent the <command>lxc.signal.stop</command>
(defaults to SIGKILL) to force it to shut down. A request to reboot will
- send the <command>lxc.rebootsignal</command> (defaults to SIGINT) to the
+ send the <command>lxc.signal.reboot</command> (defaults to SIGINT) to the
container's init process.
-->
- <command>lxc-stop</command> 는 재뷰탕, 종료, 또는 컨테이너 내의 모든 프로세스를 강제종료 시킨다. 기본 동작은 컨테이너에게 <command>lxc.haltsignal</command> 시그널(기본값은 SIGPWR)을 컨테이너 init 프로세스에게 날려, 컨테이너가 종료되게 요청하는 것이다. 60초 동안 컨테이너가 종료되는 것을 기다리고 리턴된다.
-만약 컨테이너가 60초안에 종료되지 않는다면 <command>lxc.stopsignal</command> 시그널(기본값은 SIGKILL)을 날려 강제로 종료시킨다. 재부팅 요청시에는 <command>lxc.rebootsignal</command> 시그널(기본값은 SIGINT)를 컨테이너 init 프로세스에게 날린다.
+ <command>lxc-stop</command> 는 재뷰탕, 종료, 또는 컨테이너 내의 모든 프로세스를 강제종료 시킨다. 기본 동작은 컨테이너에게 <command>lxc.signal.halt</command> 시그널(기본값은 SIGPWR)을 컨테이너 init 프로세스에게 날려, 컨테이너가 종료되게 요청하는 것이다. 60초 동안 컨테이너가 종료되는 것을 기다리고 리턴된다.
+만약 컨테이너가 60초안에 종료되지 않는다면 <command>lxc.signal.stop</command> 시그널(기본값은 SIGKILL)을 날려 강제로 종료시킨다. 재부팅 요청시에는 <command>lxc.signal.reboot</command> 시그널(기본값은 SIGINT)를 컨테이너 init 프로세스에게 날린다.
</para>
<para>
<variablelist>
<varlistentry>
<term>
- <option>lxc.haltsignal</option>
+ <option>lxc.signal.halt</option>
</term>
<listitem>
<para>
<variablelist>
<varlistentry>
<term>
- <option>lxc.rebootsignal</option>
+ <option>lxc.signal.reboot</option>
</term>
<listitem>
<para>
<variablelist>
<varlistentry>
<term>
- <option>lxc.stopsignal</option>
+ <option>lxc.signal.stop</option>
</term>
<listitem>
<para>
<command>lxc-stop</command> reboots, cleanly shuts down, or kills
all the processes inside the container. By default, it will
request a clean shutdown of the container by sending
- <command>lxc.haltsignal</command> (defaults to SIGPWR) to
+ <command>lxc.signal.halt</command> (defaults to SIGPWR) to
the container's init process, waiting up to 60 seconds for the container
to exit, and then returning. If the container fails to cleanly exit in
- 60 seconds, it will be sent the <command>lxc.stopsignal</command>
+ 60 seconds, it will be sent the <command>lxc.signal.stop</command>
(defaults to SIGKILL) to force it to shut down. A request to reboot will
- send the <command>lxc.rebootsignal</command> (defaults to SIGINT) to the
+ send the <command>lxc.signal.reboot</command> (defaults to SIGINT) to the
container's init process.
</para>
<para>
<variablelist>
<varlistentry>
<term>
- <option>lxc.haltsignal</option>
+ <option>lxc.signal.halt</option>
</term>
<listitem>
<para>
<variablelist>
<varlistentry>
<term>
- <option>lxc.rebootsignal</option>
+ <option>lxc.signal.reboot</option>
</term>
<listitem>
<para>
<variablelist>
<varlistentry>
<term>
- <option>lxc.stopsignal</option>
+ <option>lxc.signal.stop</option>
</term>
<listitem>
<para>
lxc_config_define(seccomp);
lxc_config_define(includefiles);
lxc_config_define(autodev);
-lxc_config_define(haltsignal);
-lxc_config_define(rebootsignal);
-lxc_config_define(stopsignal);
+lxc_config_define(signal_halt);
+lxc_config_define(signal_reboot);
+lxc_config_define(signal_stop);
lxc_config_define(start);
lxc_config_define(monitor);
lxc_config_define(group);
{ "lxc.seccomp", set_config_seccomp, get_config_seccomp, clr_config_seccomp, },
{ "lxc.include", set_config_includefiles, get_config_includefiles, clr_config_includefiles, },
{ "lxc.autodev", set_config_autodev, get_config_autodev, clr_config_autodev, },
- { "lxc.haltsignal", set_config_haltsignal, get_config_haltsignal, clr_config_haltsignal, },
- { "lxc.rebootsignal", set_config_rebootsignal, get_config_rebootsignal, clr_config_rebootsignal, },
- { "lxc.stopsignal", set_config_stopsignal, get_config_stopsignal, clr_config_stopsignal, },
+
+ /* REMOVE IN LXC 3.0
+ legacy singal keys
+ */
+ { "lxc.haltsignal", set_config_signal_halt, get_config_signal_halt, clr_config_signal_halt, },
+ { "lxc.rebootsignal", set_config_signal_reboot, get_config_signal_reboot, clr_config_signal_reboot, },
+ { "lxc.stopsignal", set_config_signal_stop, get_config_signal_stop, clr_config_signal_stop, },
+
+ { "lxc.signal.halt", set_config_signal_halt, get_config_signal_halt, clr_config_signal_halt, },
+ { "lxc.signal.reboot", set_config_signal_reboot, get_config_signal_reboot, clr_config_signal_reboot, },
+ { "lxc.signal.stop", set_config_signal_stop, get_config_signal_stop, clr_config_signal_stop, },
{ "lxc.start.auto", set_config_start, get_config_start, clr_config_start, },
{ "lxc.start.delay", set_config_start, get_config_start, clr_config_start, },
{ "lxc.start.order", set_config_start, get_config_start, clr_config_start, },
return -1;
}
-static int set_config_haltsignal(const char *key, const char *value,
+static int set_config_signal_halt(const char *key, const char *value,
struct lxc_conf *lxc_conf, void *data)
{
int sig_n;
return 0;
}
-static int set_config_rebootsignal(const char *key, const char *value,
+static int set_config_signal_reboot(const char *key, const char *value,
struct lxc_conf *lxc_conf, void *data)
{
int sig_n;
return 0;
}
-static int set_config_stopsignal(const char *key, const char *value,
+static int set_config_signal_stop(const char *key, const char *value,
struct lxc_conf *lxc_conf, void *data)
{
int sig_n;
return lxc_get_conf_int(c, retv, inlen, c->autodev);
}
-static int get_config_haltsignal(const char *key, char *retv, int inlen,
+static int get_config_signal_halt(const char *key, char *retv, int inlen,
struct lxc_conf *c, void *data)
{
return lxc_get_conf_int(c, retv, inlen, c->haltsignal);
}
-static int get_config_rebootsignal(const char *key, char *retv, int inlen,
+static int get_config_signal_reboot(const char *key, char *retv, int inlen,
struct lxc_conf *c, void *data)
{
return lxc_get_conf_int(c, retv, inlen, c->rebootsignal);
}
-static int get_config_stopsignal(const char *key, char *retv, int inlen,
+static int get_config_signal_stop(const char *key, char *retv, int inlen,
struct lxc_conf *c, void *data)
{
return lxc_get_conf_int(c, retv, inlen, c->stopsignal);
return 0;
}
-static inline int clr_config_haltsignal(const char *key, struct lxc_conf *c,
+static inline int clr_config_signal_halt(const char *key, struct lxc_conf *c,
void *data)
{
c->haltsignal = 0;
return 0;
}
-static inline int clr_config_rebootsignal(const char *key, struct lxc_conf *c,
+static inline int clr_config_signal_reboot(const char *key, struct lxc_conf *c,
void *data)
{
c->rebootsignal = 0;
return 0;
}
-static inline int clr_config_stopsignal(const char *key, struct lxc_conf *c,
+static inline int clr_config_signal_stop(const char *key, struct lxc_conf *c,
void *data)
{
c->stopsignal = 0;
goto non_test_error;
}
- /* lxc.haltsignal */
+ /* REMOVE IN LXC 3.0
+ legacy lxc.haltsignal key
+ */
if (set_get_compare_clear_save_load(c, "lxc.haltsignal", "1", tmpf,
true) < 0) {
lxc_error("%s\n", "lxc.haltsignal");
goto non_test_error;
}
- /* lxc.rebootsignal */
+ /* lxc.signal.halt */
+ if (set_get_compare_clear_save_load(c, "lxc.signal.halt", "1", tmpf,
+ true) < 0) {
+ lxc_error("%s\n", "lxc.signal.halt");
+ goto non_test_error;
+ }
+
+ /* REMOVE IN LXC 3.0
+ legacy lxc.rebootsignal key
+ */
if (set_get_compare_clear_save_load(c, "lxc.rebootsignal", "1", tmpf,
true) < 0) {
lxc_error("%s\n", "lxc.rebootsignal");
goto non_test_error;
}
- /* lxc.stopsignal */
+ /* lxc.signal.reboot */
+ if (set_get_compare_clear_save_load(c, "lxc.signal.reboot", "1", tmpf,
+ true) < 0) {
+ lxc_error("%s\n", "lxc.signal.reboot");
+ goto non_test_error;
+ }
+
+ /* REMOVE IN LXC 3.0
+ legacy lxc.stopsignal key
+ */
if (set_get_compare_clear_save_load(c, "lxc.stopsignal", "1", tmpf,
true) < 0) {
lxc_error("%s\n", "lxc.stopsignal");
goto non_test_error;
}
+ /* lxc.signal.stop */
+ if (set_get_compare_clear_save_load(c, "lxc.signal.stop", "1", tmpf,
+ true) < 0) {
+ lxc_error("%s\n", "lxc.signal.stop");
+ goto non_test_error;
+ }
+
/* lxc.start.auto */
if (set_get_compare_clear_save_load(c, "lxc.start.auto", "1", tmpf,
true) < 0) {
grep -q "^lxc.rootfs" $path/config 2>/dev/null || echo "lxc.rootfs = $rootfs" >> $path/config
cat <<EOF >> $path/config
-lxc.haltsignal = SIGUSR1
+lxc.signal.halt = SIGUSR1
lxc.rebootsignal = SIGTERM
lxc.utsname = $name
lxc.tty = 1