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

units: restore ConditionNeesUpdate=/etc in ldconfig.service #3311

Merged
merged 1 commit into from May 21, 2016

Conversation

poettering
Copy link
Member

In order to support stateless systems that support offline /usr updates
properly, let's restore the ConditionNeesUpdate=/etc line that makes sure we
are run when /usr is updated and this update needs to be propagated to the
/etc/ld.so.conf file stored in /etc.

This reverts part of #2859, which snuck this change in, but really shouldn't
have.

This replaces #3305. This leaves the local-fs.target change in, but reverts the ConditionNeedsUpdate= change. Also see:

https://lists.freedesktop.org/archives/systemd-devel/2016-May/036565.html

In order to support stateless systems that support offline /usr updates
properly, let's restore the ConditionNeesUpdate=/etc line that makes sure we
are run when /usr is updated and this update needs to be propagated to the
/etc/ld.so.conf file stored in /etc.

This reverts part of systemd#2859, which snuck this change in, but really shouldn't
have.
@keszybz
Copy link
Member

keszybz commented May 21, 2016

We suck at writing commit messages ;) I remember that there was good rationale for that change, but it's not written down here. The issue was that ldconfig.service would be run on Fedora livecd or something like that.

what's the rationale for running this after local-fs.target?

/usr/local/lib and /opt/lib and similar, there's no guarantee that all libraries are on the root fs.

Let's merge this. The original motivation for removing ConditionNeedsUpdate=|/etc was that it caused a slow down and noise, but not an actual problem. Missing ld.so.cache is probably a bigger issue.

@keszybz keszybz merged commit 0525107 into systemd:master May 21, 2016
@fweimer
Copy link

fweimer commented May 23, 2016

This is still not sufficient, you can't assume that ldconfig won't destroy data until all file systems are mounted.

@poettering
Copy link
Member Author

@fweimer well, "local-fs.target" is defined as being where all file systems are mounted that are required for service execution. I'd claim that people who want to mount additoinal file systems during runtime but have this included in the ld.so cache are far enough outside the intended definitions, that I#d also would say that they are welcome to run "systemctl mask ldconfig" then...

@arvidjaar
Copy link
Contributor

@poettering

"local-fs.target" is defined as being where all file systems are mounted that are required for service execution

Where is it defined? systemd.special says

systemd-fstab-generator(3) automatically adds dependencies of type Before= to all mount units that refer to local mount points for this target unit.

I do not see anything about "required for service execution" here.

What about netboot systems that have everything on NFS mount points? I hope answer is not "mount everything from initrd".

Werkov pushed a commit to Werkov/systemd that referenced this pull request Jun 22, 2017
…3311)

In order to support stateless systems that support offline /usr updates
properly, let's restore the ConditionNeesUpdate=/etc line that makes sure we
are run when /usr is updated and this update needs to be propagated to the
/etc/ld.so.conf file stored in /etc.

This reverts part of systemd#2859, which snuck this change in, but really shouldn't
have.
(cherry picked from commit 0525107)

[fbui: fixes bsc#1019470]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants