Your message dated Fri, 20 Mar 2015 02:48:18 +0100
with message-id <[email protected]>
and subject line Re: Bug#775437: systemd: systemctl reboot just shuts down 
under OpenVZ (kernel 2.6.32-042stab093.4)
has caused the Debian Bug report #775437,
regarding systemd: systemctl reboot just shuts down under OpenVZ (kernel 
2.6.32-042stab093.4)
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
775437: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=775437
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: systemd
Version: 44-11+deb7u4
Severity: important
Tags: upstream patch

Hello,

I am running a Debian Wheezy system in a OpenVZ container and found that
systemd just shuts down when "systemctl reboot" is run. The container then
has to be started again via the control panel. A OpenVZ developer had posted
a patch to the systemd-devel mailinglist in August 2012 but the systemd
version in wheezy iss too old to include the patch. This is the post:

    http://lists.freedesktop.org/archives/systemd-devel/2012-August/006379.html

I have applied the patch to the sources of the systemd debian package and
attached the diff to this report. The problem seems to be that OpenVZ needs
the reboot systemcall to be issued in the container to reboot. Version 44-11
just exits inside of a container.

It would be great if the package in wheezy could be fixed, as the systemd
version from wheezy-backports (204) is not compatible with the OpenVZ kernel
(systemd 204 needs a kernel >= 2.6.39 and OVZ only has kernels up to 2.6.32).
It is unfortunately not possible to use SysVInit in OVZ, because this hangs
when init starts up.

Best wishes,
Daniel Edwards

-- System Information:
Debian Release: 7.8
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-042stab093.4 (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages systemd depends on:
ii  dpkg                 1.16.15
ii  initscripts          2.88dsf-41+deb7u1
ii  libacl1              2.2.51-8
ii  libaudit0            1:1.7.18-1.1
ii  libc6                2.13-38+deb7u6
ii  libcap2              1:2.22-1.2
ii  libcryptsetup4       2:1.4.3-4
ii  libdbus-1-3          1.6.8-1+deb7u5
ii  libkmod2             9-3
ii  liblzma5             5.1.1alpha+20120614-2
ii  libpam0g             1.1.3-7.1
ii  libselinux1          2.1.9-5
ii  libsystemd-daemon0   44-11+deb7u4
ii  libsystemd-id128-0   44-11+deb7u4
ii  libsystemd-journal0  44-11+deb7u4
ii  libsystemd-login0    44-11+deb7u4
ii  libudev0             175-7.2
ii  libwrap0             7.6.q-24
ii  udev                 175-7.2
ii  util-linux           2.20.1-5.3

Versions of packages systemd recommends:
pn  libpam-systemd  <none>

Versions of packages systemd suggests:
ii  python        2.7.3-4+deb7u1
pn  python-cairo  <none>
pn  python-dbus   <none>
pn  systemd-gui   <none>

-- no debconf information
Index: systemd-44/src/shutdown.c
===================================================================
--- systemd-44.orig/src/shutdown.c	2012-01-22 03:44:56.000000000 +0100
+++ systemd-44/src/shutdown.c	2015-01-15 15:45:53.240364002 +0100
@@ -305,8 +305,9 @@
 int main(int argc, char *argv[]) {
         int cmd, r;
         unsigned retries;
-        bool need_umount = true, need_swapoff = true, need_loop_detach = true, need_dm_detach = true;
+        bool need_umount = true, need_swapoff = true, need_loop_detach = true, need_dm_detach = true, need_reboot = true;
         bool killed_everbody = false, in_container;
+        const char *container_type;
 
         log_parse_environment();
         log_set_target(LOG_TARGET_CONSOLE); /* syslog will die if not gone yet */
@@ -326,7 +327,7 @@
                 goto error;
         }
 
-        in_container = detect_container(NULL) > 0;
+        in_container = detect_container(&container_type) > 0;
 
         if (streq(argv[1], "reboot"))
                 cmd = RB_AUTOBOOT;
@@ -352,8 +353,11 @@
         log_info("Sending SIGKILL to remaining processes...");
         send_signal(SIGKILL);
 
-        if (in_container)
+        if (in_container) {
                 need_swapoff = false;
+                if (!streq(container_type, "openvz"))
+                        need_reboot = false;
+        }
 
         /* Unmount all mountpoints, swaps, and loopback devices */
         for (retries = 0; retries < FINALIZE_ATTEMPTS; retries++) {
@@ -438,7 +442,7 @@
 
         /* If we are in a container, just exit, this will kill our
          * container for good. */
-        if (in_container) {
+        if (!need_reboot) {
                 log_error("Exiting container.");
                 exit(0);
         }

--- End Message ---
--- Begin Message ---
Am 21.01.2015 um 19:16 schrieb Daniel Edwards:
> Hi Michael,
> 
> On Wed, Jan 21, 2015 at 06:56:50PM +0100, Michael Biebl wrote:
>> Am 21.01.2015 um 17:13 schrieb Michael Biebl:
>>> Am 15.01.2015 um 18:53 schrieb Daniel Edwards:
>>>> It would be great if the package in wheezy could be fixed, as the systemd
>>>> version from wheezy-backports (204) is not compatible with the OpenVZ 
>>>> kernel
>>>> (systemd 204 needs a kernel >= 2.6.39 and OVZ only has kernels up to 
>>>> 2.6.32).
>>>> It is unfortunately not possible to use SysVInit in OVZ, because this hangs
>>>> when init starts up.
>>>
>>> Please ask the stable release managers, if they would accept such a
>>> patch. I don't think we really support such inofficial kernels or mixing
>>> squeeze kernels with wheezy userland.
>>>
>>> So I'm inclined to reject this bug report, especially since the Debian
>>> kernel maintainers decided to drop OpenVZ support for the Debian kernel.
> 
> I absolutely understand that you don't support third-party kernels or
> mixing different distributions.
> 
>> Reading the openvz bug report [1], it seems there exists a workaround
>> now in vzctl 4.1. Jessie is shipping a recent enough version,
>> unfortunately, wheezy only has 3.0. You might ask the vzctl maintainers
>> for a backport of the jessie version.

I decided to not apply this unofficial patch for wheezy, and as jessie
as I've been told, has a working vzctl, I'm going to close this bug report.

Regards,
Michael





-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?

Attachment: signature.asc
Description: OpenPGP digital signature


--- End Message ---
_______________________________________________
Pkg-systemd-maintainers mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-systemd-maintainers

Reply via email to