[systemd-devel] lost journal persistence
Chris Murphy
lists at colorremedies.com
Fri May 16 09:33:44 PDT 2014
On May 16, 2014, at 9:25 AM, Lennart Poettering <lennart at poettering.net> wrote:
> On Thu, 15.05.14 17:30, Chris Murphy (lists at colorremedies.com) wrote:
>
>>
>>
>> On May 15, 2014, at 3:58 PM, Lennart Poettering <lennart at poettering.net> wrote:
>>
>>> On Sat, 10.05.14 18:02, Chris Murphy (lists at colorremedies.com) wrote:
>>>
>>>> So I thought maybe the flush is happening to /var before var subvolume is mounted there, but that's not the case; the reason why it's not empty is due to dhclient always creating one folder prior to var subvolume mounting at /var.
>>>>
>>>> /var/lib/dhclient
>>>
>>> Hmm, this looks like a bug. Is dhclient invoked before /var is mounted?
>>
>> Seems not to be, as the first reported instance of dhclient is
>> afterward and /var already has something in it. Maybe NetworkManger
>> creates it?
>
> Ther ordering is not really reliable, as journald reads from multiple
> streams in parallel and there's no guarantee that it will do so in the
> same order as the messages where queued in. This is not fixable unless
> all of our transports start sending timestamps along...
>
>> Seems crude but I could figure out how to set an selinux label on the
>> wrong /var to prevent anything from creating things there, and see
>> what explodes?
>
> maybe use chattr with the immutable flag?
That did it.
[ 14.653169] rawhide.localdomain fedora-import-state[277]: cp: cannot create directory ‘/./var/lib/dhclient’: Permission denied
[ 14.653474] rawhide.localdomain fedora-import-state[277]: cp: preserving times for ‘/./var/lib’: Operation not permitted
rpm -q --whatprovides /lib/systemd/fedora-import-state
initscripts-9.54-2.fc21.x86_64
# cat /usr/lib/systemd/system/fedora-import-state.service
[Unit]
Description=Import network configuration from initramfs
DefaultDependencies=no
ConditionPathIsReadWrite=/
ConditionDirectoryNotEmpty=/run/initramfs/state
Conflicts=shutdown.target
Before=shutdown.target emergency.service emergency.target systemd-tmpfiles-setup.service
After=systemd-remount-fs.service
[Service]
ExecStart=/lib/systemd/fedora-import-state
Type=oneshot
TimeoutSec=0
RemainAfterExit=yes
Chris Murphy
More information about the systemd-devel
mailing list