Unknown lvalue 'PrivateUsers' in section 'Service'

Bug #1776818 reported by Logan V on 2018-06-14
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
openstack-ansible
Medium
Kevin Carter

Bug Description

The 'PrivateUsers' directive does not appear to be valid on Xenial systemd 229-4ubuntu17. Output from the service as follows:

Unknown lvalue 'PrivateUsers' in section 'Service'

Setting "systemd_PrivateUsers: no" does not resolve the error because PrivateUsers = False is added to the systemd unit, which still generates the "unknown value" error.

I tried a different workaround,
config_overrides:
  Service:
    PrivateUsers: null

Which sets it to a None value. In the unit file I then get:
PrivateUsers = None
-- Would it make sense to change config_template to delete values from the configuration when the override is None?

Lastly the working workaround is to set under the service config:
program_sandboxing:
  PrivateTmp: True
  PrivateDevices: True
  PrivateNetwork: True

Mohammed Naser (mnaser) wrote :

Can you let me know if this is causing a failure or if it's just giving warnings?

Changed in openstack-ansible:
status: New → Incomplete
Logan V (loganv) wrote :

Yeah results in an error. systemctl daemon-reload fails to load the service unit since it has invalid keys. The unit is rendered unusable.

Changed in openstack-ansible:
importance: Undecided → Medium
assignee: nobody → Kevin Carter (kevin-carter)
status: Incomplete → Confirmed

Fix proposed to branch: master
Review: https://review.openstack.org/582997

Changed in openstack-ansible:
status: Confirmed → In Progress

Reviewed: https://review.openstack.org/582997
Committed: https://git.openstack.org/cgit/openstack/ansible-role-systemd_service/commit/?id=94ff90157ac891e5412b8daaa37d7a1cf2192171
Submitter: Zuul
Branch: master

commit 94ff90157ac891e5412b8daaa37d7a1cf2192171
Author: Kevin Carter <email address hidden>
Date: Mon Jul 16 11:21:06 2018 -0500

    Correct log warning for unknown lvalue

    The default systemd service template was using the PrivateUsers
    directive by default which was only implemented in systemd version 232.
    Because we're running on older versions of systemd in a lot of cases the
    this option was creating a log of journal spam. To correct the issue the
    version of systemd is now detected and this default option will only be
    used when the version of systemd is greater than or equal to version
    232.

    Change-Id: Ief1a2e155892ab7df821fbf049787e705da91b40
    Closes-Bug: #1776818
    Signed-off-by: Kevin Carter <email address hidden>

Changed in openstack-ansible:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers