← Back to team overview

group.of.nepali.translators team mailing list archive

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

 

This bug was fixed in the package pollinate - 4.33-3ubuntu1.20.10.1

---------------
pollinate (4.33-3ubuntu1.20.10.1) groovy; urgency=medium

  * d/pollinate.service: ensure cache directory is recreated (LP:
#1848923)

 -- Christian Ehrhardt <christian.ehrhardt@xxxxxxxxxxxxx>  Tue, 09 Feb
2021 10:57:54 +0100

** Changed in: pollinate (Ubuntu Groovy)
       Status: Fix Committed => Fix Released

-- 
You received this bug notification because you are a member of नेपाली
भाषा समायोजकहरुको समूह, which is subscribed to Xenial.
Matching subscriptions: Ubuntu 16.04 Bugs
https://bugs.launchpad.net/bugs/1848923

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

Status in pollinate package in Ubuntu:
  Fix Released
Status in pollinate source package in Xenial:
  Won't Fix
Status in pollinate source package in Bionic:
  Fix Committed
Status in pollinate source package in Focal:
  Fix Released
Status in pollinate source package in Groovy:
  Fix Released

Bug description:
  [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

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