** Description changed:

  [Impact]
  
- Upgrade processes that take too long will result in the service not
- being restarted.
+ Since php7.0 still follows the compat level 9 defaults of stopping the
+ service at the start of an upgrade, and then starting it again at the
+ end of the upgrade, there is potentially a long period of the service
+ being stopped when there are many packages to upgrade, leading to
+ unwanted downtime.
  
  [Test Case]
  
- The test case is difficult to reproduce, because it requires the upgrade
- process to take a long time.
+ A simple apt install --reinstall will exhibit the behavior in
+ /var/log/syslog:
+ 
+ Command:
+ 
+ apt install --reinstall -y php7.0-fpm
+ 
+ /var/log/syslog:
+ 
+ Mar 12 13:40:17 tester systemd[1]: Reloading.
+ Mar 12 13:40:17 tester systemd[1]: Stopping The PHP 7.0 FastCGI Process 
Manager...
+ Mar 12 13:40:17 tester systemd[1]: Stopped The PHP 7.0 FastCGI Process 
Manager.
+ Mar 12 13:40:17 tester systemd[1]: Reloading.
+ Mar 12 13:40:18 tester systemd[1]: Reloading.
+ Mar 12 13:40:19 tester systemd[1]: Reloading.
+ Mar 12 13:40:19 tester systemd[1]: Reloading.
+ Mar 12 13:40:19 tester systemd[1]: Starting The PHP 7.0 FastCGI Process 
Manager...
+ Mar 12 13:40:19 tester systemd[1]: Started The PHP 7.0 FastCGI Process 
Manager.
+ 
+ php-fpm is down during the entire update process.
+ 
+ When upgrading to the fixed PPA, it will still shut down at the start
+ due to the old script being run.
+ 
+ Command:
+ 
+ add-apt-repository -y ppa:kstenerud/xenial-php7.0-restart-after-
+ upgrade-1819033 && apt update && apt dist-upgrade -y
+ 
+ /var/log/syslog:
+ 
+ Mar 12 13:41:40 tester systemd[1]: Reloading.
+ Mar 12 13:41:41 tester systemd[1]: Stopping The PHP 7.0 FastCGI Process 
Manager...
+ Mar 12 13:41:41 tester systemd[1]: Stopped The PHP 7.0 FastCGI Process 
Manager.
+ Mar 12 13:41:41 tester systemd[1]: Reloading.
+ Mar 12 13:41:43 tester systemd[1]: Reloading.
+ Mar 12 13:41:52 tester systemd[1]: Reloading.
+ Mar 12 13:41:52 tester systemd[1]: Reloading.
+ Mar 12 13:41:52 tester systemd[1]: Stopped The PHP 7.0 FastCGI Process 
Manager.
+ Mar 12 13:41:52 tester systemd[1]: Starting The PHP 7.0 FastCGI Process 
Manager...
+ Mar 12 13:41:52 tester systemd[1]: Started The PHP 7.0 FastCGI Process 
Manager.
+ 
+ The extra "Stopped" at 13:41:52 is due to the new behavior calling
+ restart.
+ 
+ With the new package installed, it no longer stops when beginning an
+ upgrade, and does a restart at the end (which php-fpm accomplishes with
+ a stop and start).
+ 
+ Command:
+ 
+ apt install --reinstall -y php7.0-fpm
+ 
+ /var/log/syslog:
+ 
+ Mar 12 13:43:00 tester systemd[1]: Reloading.
+ Mar 12 13:43:00 tester systemd[1]: Reloading.
+ Mar 12 13:43:01 tester systemd[1]: Reloading.
+ Mar 12 13:43:02 tester systemd[1]: Reloading.
+ Mar 12 13:43:02 tester systemd[1]: Stopping The PHP 7.0 FastCGI Process 
Manager...
+ Mar 12 13:43:02 tester systemd[1]: Stopped The PHP 7.0 FastCGI Process 
Manager.
+ Mar 12 13:43:02 tester systemd[1]: Starting The PHP 7.0 FastCGI Process 
Manager...
+ Mar 12 13:43:02 tester systemd[1]: Started The PHP 7.0 FastCGI Process 
Manager.
+ 
  
  [Regression Potential]
  
- These changes have already been applied in other releases, but were
- missed on xenial for some reason. The changes are designed to address
- this particular issue, and so shouldn't cause a regression.
+ If the service tries to load a file that has been replaced during
+ upgrade, but before it was restarted, it could cause a failure. However,
+ the service will soon be restarted anyway.
+ 
+ If the restart takes too long it could fail.
+ 
  
  [Original Description]
  
  The unattended update has launch the update of php7.0-fpm that trigger
  the stop of php7.0-fpm service (timestamp match that operation). The
  service does not restart within 10 minutes.
  
  # systemctl status php7.0-fpm
  ● php7.0-fpm.service - The PHP 7.0 FastCGI Process Manager
-    Loaded: loaded (/lib/systemd/system/php7.0-fpm.service; enabled; vendor 
preset: enabled)
-    Active: inactive (dead) since Thu 2019-03-07 15:21:00 UTC; 8min ago
-  Main PID: 3505 (code=exited, status=0/SUCCESS)
-    Status: "Processes active: 0, idle: 32, Requests: 0, slow: 0, Traffic: 
0req/sec"
+    Loaded: loaded (/lib/systemd/system/php7.0-fpm.service; enabled; vendor 
preset: enabled)
+    Active: inactive (dead) since Thu 2019-03-07 15:21:00 UTC; 8min ago
+  Main PID: 3505 (code=exited, status=0/SUCCESS)
+    Status: "Processes active: 0, idle: 32, Requests: 0, slow: 0, Traffic: 
0req/sec"
  
  Mar 07 15:14:55 xxx systemd[1]: Starting The PHP 7.0 FastCGI Process 
Manager...
  Mar 07 15:14:55 xxx systemd[1]: Started The PHP 7.0 FastCGI Process Manager.
  Mar 07 15:21:00 xxx systemd[1]: Stopping The PHP 7.0 FastCGI Process 
Manager...
  Mar 07 15:21:00 xxx systemd[1]: Stopped The PHP 7.0 FastCGI Process Manager.
  
  # cat /var/log/dpkg.log  | grep php | grep fpm
  [...]
  2019-03-07 15:20:58 status triggers-pending php7.0-fpm:amd64 
7.0.30-0ubuntu0.16.04.1
  2019-03-07 15:21:00 upgrade php7.0-fpm:amd64 7.0.30-0ubuntu0.16.04.1 
7.0.33-0ubuntu0.16.04.2
  2019-03-07 15:21:00 status half-configured php7.0-fpm:amd64 
7.0.30-0ubuntu0.16.04.1
  2019-03-07 15:21:00 status unpacked php7.0-fpm:amd64 7.0.30-0ubuntu0.16.04.1
  2019-03-07 15:21:00 status half-installed php7.0-fpm:amd64 
7.0.30-0ubuntu0.16.04.1
  2019-03-07 15:21:00 status half-installed php7.0-fpm:amd64 
7.0.30-0ubuntu0.16.04.1
  2019-03-07 15:21:00 status unpacked php7.0-fpm:amd64 7.0.33-0ubuntu0.16.04.2
  2019-03-07 15:21:00 status unpacked php7.0-fpm:amd64 7.0.33-0ubuntu0.16.04.2
  2019-03-07 15:31:31 configure php7.0-fpm:amd64 7.0.33-0ubuntu0.16.04.2 <none>
  2019-03-07 15:31:31 status unpacked php7.0-fpm:amd64 7.0.33-0ubuntu0.16.04.2
  2019-03-07 15:31:31 status unpacked php7.0-fpm:amd64 7.0.33-0ubuntu0.16.04.2
  2019-03-07 15:31:31 status unpacked php7.0-fpm:amd64 7.0.33-0ubuntu0.16.04.2
  2019-03-07 15:31:31 status unpacked php7.0-fpm:amd64 7.0.33-0ubuntu0.16.04.2
  2019-03-07 15:31:31 status unpacked php7.0-fpm:amd64 7.0.33-0ubuntu0.16.04.2
  2019-03-07 15:31:31 status unpacked php7.0-fpm:amd64 7.0.33-0ubuntu0.16.04.2
  2019-03-07 15:31:31 status unpacked php7.0-fpm:amd64 7.0.33-0ubuntu0.16.04.2
  2019-03-07 15:31:31 status half-configured php7.0-fpm:amd64 
7.0.33-0ubuntu0.16.04.2
  2019-03-07 15:31:32 status installed php7.0-fpm:amd64 7.0.33-0ubuntu0.16.04.2
  2019-03-07 15:31:32 status triggers-pending php7.0-fpm:amd64 
7.0.33-0ubuntu0.16.04.2
  
  $ lsb_release -rd
  Description:    Ubuntu 16.04.4 LTS
  Release:        16.04
  
  $ apt-cache policy php7.0-fpm
  php7.0-fpm:
-   Installed: 7.0.33-0ubuntu0.16.04.2
-   Candidate: 7.0.33-0ubuntu0.16.04.2
-   Version table:
-  *** 7.0.33-0ubuntu0.16.04.2 500
-         500 http://us-east-1.ec2.archive.ubuntu.com/ubuntu 
xenial-updates/universe amd64 Packages
-         500 http://security.ubuntu.com/ubuntu xenial-security/universe amd64 
Packages
-         100 /var/lib/dpkg/status
-      7.0.4-7ubuntu2 500
-         500 http://us-east-1.ec2.archive.ubuntu.com/ubuntu xenial/universe 
amd64 Packages
+   Installed: 7.0.33-0ubuntu0.16.04.2
+   Candidate: 7.0.33-0ubuntu0.16.04.2
+   Version table:
+  *** 7.0.33-0ubuntu0.16.04.2 500
+         500 http://us-east-1.ec2.archive.ubuntu.com/ubuntu 
xenial-updates/universe amd64 Packages
+         500 http://security.ubuntu.com/ubuntu xenial-security/universe amd64 
Packages
+         100 /var/lib/dpkg/status
+      7.0.4-7ubuntu2 500
+         500 http://us-east-1.ec2.archive.ubuntu.com/ubuntu xenial/universe 
amd64 Packages

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

Title:
  php7.0-fpm_7.0.33-0ubuntu0.16.04.2 update stop fpm service for 10
  minutes

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/php7.0/+bug/1819033/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to