MP review complete, uploaded with minor modifications to Hirsute and submitted 
the same to Debian.
Once complete in 21.04 we can think about how far we want to backport this.

** Description changed:

+ [Impact]
+ 
+  * /var/cache is expected to be able to be cleared for a reboot without 
+    drawbacks. But the directory of pollinate is a classic cache, yet it 
+    only is created in postinst. That leads to the service failing on 
+    reboot after the path was cleared.
+    For example the cockpit images are affected by that
+ 
+  * The Fix for that is to instruct systemd to (if needed) create that path
+    under the same permissions.
+ 
+ [Test Case]
+ 
+  * sudo rm -rf /var/cache/pollinate
+  * sudo reboot
+  * systemctl status pollinate
+ 
+  Without the fix it will fail to start missing the directory (but 
+  complaining about a wrong user). With the fix it works as systemd 
+  recreates that directory if needed.
+ 
+ [Where problems could occur]
+ 
+  * We modify the service file, so issues would be around the 
+    /var/cache/pollinate creation/usage or the start/stop/restart
+    of the service.
+ 
+ [Other Info]
+  
+  * the postinst bits doeing the mkdir are not removed to easen backport to 
+    e.g. Xenial where this systemd feature does not exist.
+ 
+ 
+ ----
+ 
  In a standard Ubuntu 19.10 cloud image install, pollinate fails to
  start:
  
  ● pollinate.service - Pollinate to seed the pseudo random number generator
     Loaded: loaded (/lib/systemd/system/pollinate.service; enabled; vendor 
preset: enabled)
     Active: failed (Result: exit-code) since Sun 2019-10-20 12:17:10 EEST; 3 
months 4 days ago
       Docs: https://launchpad.net/pollinate
   Main PID: 665 (code=exited, status=1/FAILURE)
  
  Oct 20 12:17:10 ubuntu systemd[1]: Starting Pollinate to seed the pseudo 
random number generator...
  Oct 20 12:17:10 ubuntu pollinate[708]: ERROR: should execute as the 
[pollinate] user
  Oct 20 12:17:10 ubuntu systemd[1]: pollinate.service: Main process exited, 
code=exited, status=1/FAILURE
  Oct 20 12:17:10 ubuntu systemd[1]: pollinate.service: Failed with result 
'exit-code'.
  Oct 20 12:17:10 ubuntu systemd[1]: Failed to start Pollinate to seed the 
pseudo random number generator.
  
  The user does exist:
  
  # id pollinate
  uid=110(pollinate) gid=1(daemon) groups=1(daemon)
  
  and the unit has "User=pollinate"
  
  This happens outside of systemd as well:
  
  # sudo -u pollinate /usr/bin/pollinate
  <13>Jan 24 09:31:05 pollinate[21456]: ERROR: should execute as the 
[pollinate] user
  
  set -x shows why:
  
  + [ ! -w /var/cache/pollinate ]
  + error should execute as the [pollinate] user
  
  This directory doesn't exist. So (1) this is a bad error message, and
  (2) pollinate.service is missing "CacheDirectory=pollinate". When adding
  that, it works.
  
  pollinate 4.33-2ubuntu1

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

Title:
  pollinate.service fails to start: ERROR: should execute as the
  [pollinate] user -- missing CacheDirectory=

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

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

Reply via email to