** Description changed:

  As soon as you start/stop a container, or install/remove apport in the
  container, apport's init.d/upstart script change the global
  /proc/sys/kernel/core_pattern and thus influence all other containers
  and the host.
  
  Only the host should set core_pattern, and with
  https://code.launchpad.net/~stgraber/apport/pidns-support/+merge/200893
  crashes in a container are now properly forwarded to the container's
  apport.
+ 
+ SRU TEST CASE (stop):
+ - Check that apport is currently enabled:
+   $ cat /proc/sys/kernel/core_pattern 
+   |/usr/share/apport/apport %p %s %c
+ 
+ - Start a container (that has apport installed):
+   $ sudo lxc-start-ephemeral -o precise
+ 
+ - Stop the container:
+   $ sudo poweroff   #  within the container
+ 
+ - Apport is now disabled globally:
+   $ cat /proc/sys/kernel/core_pattern 
+   core
+ 
+   With the fixed apport, /proc/sys/kernel/core_pattern should never be
+ touched by the container.
+ 
+ SRU TEST CASE (start):
+ - Stop apport globally:
+   $ sudo stop apport
+   $ cat /proc/sys/kernel/core_pattern 
+    core
+ 
+ - Start a container (that has apport installed):
+   $ sudo lxc-start-ephemeral -o precise
+ 
+ - Apport is now globally enabled:
+   $ cat /proc/sys/kernel/core_pattern 
+   |/usr/share/apport/apport %p %s %c
+    
+   With the fixed apport, /proc/sys/kernel/core_pattern should never be 
touched by the container.

** Description changed:

  As soon as you start/stop a container, or install/remove apport in the
  container, apport's init.d/upstart script change the global
  /proc/sys/kernel/core_pattern and thus influence all other containers
  and the host.
  
  Only the host should set core_pattern, and with
  https://code.launchpad.net/~stgraber/apport/pidns-support/+merge/200893
  crashes in a container are now properly forwarded to the container's
  apport.
  
  SRU TEST CASE (stop):
  - Check that apport is currently enabled:
-   $ cat /proc/sys/kernel/core_pattern 
-   |/usr/share/apport/apport %p %s %c
+   $ cat /proc/sys/kernel/core_pattern
+   |/usr/share/apport/apport %p %s %c
  
  - Start a container (that has apport installed):
-   $ sudo lxc-start-ephemeral -o precise
+   $ sudo lxc-start-ephemeral -o precise
  
  - Stop the container:
-   $ sudo poweroff   #  within the container
+   $ sudo poweroff   #  within the container
  
  - Apport is now disabled globally:
-   $ cat /proc/sys/kernel/core_pattern 
-   core
+   $ cat /proc/sys/kernel/core_pattern
+   core
  
-   With the fixed apport, /proc/sys/kernel/core_pattern should never be
+   With the fixed apport, /proc/sys/kernel/core_pattern should never be
  touched by the container.
  
  SRU TEST CASE (start):
  - Stop apport globally:
-   $ sudo stop apport
-   $ cat /proc/sys/kernel/core_pattern 
-    core
+   $ sudo stop apport
+   $ cat /proc/sys/kernel/core_pattern
+    core
  
  - Start a container (that has apport installed):
-   $ sudo lxc-start-ephemeral -o precise
+   $ sudo lxc-start-ephemeral -o precise
  
  - Apport is now globally enabled:
-   $ cat /proc/sys/kernel/core_pattern 
+   $ cat /proc/sys/kernel/core_pattern
+   |/usr/share/apport/apport %p %s %c
+ 
+   With the fixed apport, /proc/sys/kernel/core_pattern should never be
+ touched by the container.
+ 
+ SRU TEST CASE (regression test):
+ 
+ - Starting/stopping apport manually should still work. After booting, apport 
should be enabled:
+   $ cat /proc/sys/kernel/core_pattern
    |/usr/share/apport/apport %p %s %c
-    
-   With the fixed apport, /proc/sys/kernel/core_pattern should never be 
touched by the container.
+   $ sudo stop apport
+   $ cat /proc/sys/kernel/core_pattern
+    core
+   $ sudo start apport
+   $ cat /proc/sys/kernel/core_pattern
+   |/usr/share/apport/apport %p %s %c
+ 
+ REGRESSION POTENTIAL: In releases < trusty, apport would not work in
+ containers at all, as the kernel calls the host's apport; before
+ https://code.launchpad.net/~stgraber/apport/pidns-support/+merge/200893,
+ Apport did not forward crashes that happened in a container to the
+ container's apport, so for precise there is no regresssion potential.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1267728

Title:
  starts/stops in containers

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apport/+bug/1267728/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to