pollinate.service fails to start: ERROR: should execute as the [pollinate] user -- missing CacheDirectory=
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
pollinate (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Xenial |
Won't Fix
|
Undecided
|
Unassigned | ||
Bionic |
Fix Released
|
Undecided
|
Unassigned | ||
Focal |
Fix Released
|
Undecided
|
Unassigned | ||
Groovy |
Fix Released
|
Undecided
|
Unassigned |
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/
* 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/
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/
Active: failed (Result: exit-code) since Sun 2019-10-20 12:17:10 EEST; 3 months 4 days ago
Docs: https:/
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/
+ 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 4.33-2ubuntu1
Related branches
- Robie Basak: Approve (sru)
- Canonical Server: Pending requested
- Canonical Server packageset reviewers: Pending requested
-
Diff: 27 lines (+8/-0)2 files modifieddebian/changelog (+6/-0)
debian/pollinate.service (+2/-0)
- Robie Basak: Approve (sru)
- Canonical Server packageset reviewers: Pending requested
- Canonical Server: Pending requested
-
Diff: 27 lines (+8/-0)2 files modifieddebian/changelog (+6/-0)
debian/pollinate.service (+2/-0)
- Robie Basak: Approve (sru)
- Canonical Server packageset reviewers: Pending requested
- Canonical Server: Pending requested
-
Diff: 27 lines (+8/-0)2 files modifieddebian/changelog (+6/-0)
debian/pollinate.service (+2/-0)
- Robie Basak: Approve
- Martin Pitt (community): Approve
- Canonical Server: Pending requested
- git-ubuntu developers: Pending requested
-
Diff: 43 lines (+10/-4)3 files modifieddebian/changelog (+8/-0)
debian/pollinate.postinst (+0/-4)
debian/pollinate.service (+2/-0)
tags: | added: eoan regression-release |
description: | updated |
Changed in pollinate (Ubuntu): | |
status: | Confirmed → In Progress |
Status changed to 'Confirmed' because the bug affects multiple users.