Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(#1709187) core:scope: fix missing fragment_path #11

Merged
merged 1 commit into from May 23, 2019

Conversation

jsynacek
Copy link
Contributor

fragment_path in struct unit is a record of unit file, which will
be deleted (unlink) in unit_free().

After a daemon-reload process, the u->fragment_path of scope unit
will be missing (NULL). Then, the discarded session scope unit file
will be redundant until reboot.

Steps to Reproduce problem:

  1. ssh access and login
  2. systemctl daemon-reload
  3. ssh logout
  4. discarded session-xxx.scope file will be found in /run/systemd/system/

So in a daemon-reload case, scope_load() need unit_load_fragment() to reload
u->fragment_path.

(cherry picked from commit f838bf3)

Resolves: #1709187

fragment_path in struct unit is a record of unit file, which will
be deleted (unlink) in unit_free().

After a daemon-reload process, the u->fragment_path of scope unit
will be missing (NULL). Then, the discarded session scope unit file
will be redundant until reboot.

Steps to Reproduce problem:
1. ssh access and login
2. systemctl daemon-reload
3. ssh logout
4. discarded session-xxx.scope file will be found in /run/systemd/system/

So in a daemon-reload case, scope_load() need unit_load_fragment() to reload
u->fragment_path.

(cherry picked from commit f838bf3)

Resolves: #1709187
@jsynacek jsynacek added tracker/unapproved Formerly needs-acks pr/needs-review Formerly needs-review labels May 20, 2019
@systemd-rhel-bot systemd-rhel-bot added the pr/needs-ci Formerly needs-ci label May 20, 2019
Copy link
Member

@dtardon dtardon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dtardon dtardon removed the pr/needs-review Formerly needs-review label May 22, 2019
@systemd-rhel-bot systemd-rhel-bot changed the title core:scope: fix missing fragment_path (#1709187) core:scope: fix missing fragment_path May 22, 2019
@systemd-rhel-bot systemd-rhel-bot added rhel-7.4 ci-waived and removed tracker/unapproved Formerly needs-acks pr/needs-ci Formerly needs-ci labels May 22, 2019
@systemd-rhel-bot systemd-rhel-bot merged commit 31ce043 into redhat-plumbers:rhel-7.4 May 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants