Re: [systemd-devel] systemd-tmpfiles-clean could remove recently created files

2016-11-16 Thread Alexander Kochetkov

> Consider filing an RFE for this, or even better an PR…

Issue submitted:
https://github.com/systemd/systemd/issues/4679

Regards,
Alexander.

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] systemd-tmpfiles-clean could remove recently created files

2016-11-16 Thread Lennart Poettering
On Wed, 16.11.16 16:08, Alexander Kochetkov (al.koc...@gmail.com) wrote:

> Hello,
> 
> I’d like to discuss the issue I faced. I don’t know should I fill issue 
> report or make something else.
> I made a decision to disable systemd-tmpfiles-clean entirely.
> 
> systemd-tmpfiles-clean by default configured to delete all files from /tmp 
> with atime older than 10 days
> after 15 min of system startup. That is regulated using tmpfiles.d rule and 
> systemd-tmpfiles-clean.timer.
> 
> If machine has incorrect time set during boot (RTC not configured and no 
> /var/lib/systemd/clock) and
> later that time will be corrected using ntp, than systemd-tmpfiles-clean 
> could delete all files and folder
> (created withing 15 min, even opened and used at time systemd-tmpfiles-clean 
> run) from /tmp directory.
> 
> I’d think about patching linux kernel to bind tmpfs atime to CLOCK_MONOTONIC. 
> So atime wouldn’d be
> affected by system time changes.
> 
> May be there is another solution for the issue.

I figure systemd could also record the realtime and monotonic clock
when it first passed control to userspace and tmpfiles could then use
that information and only delete files that are older than the age
value on the wallclock AND older than the age value on the monotonic
clock when taking the initial clock pairing into account.

Consider filing an RFE for this, or even better an PR...

-- 
Lennart Poettering, Red Hat
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] systemd-tmpfiles-clean could remove recently created files

2016-11-16 Thread Alexander Kochetkov
Hello,

I’d like to discuss the issue I faced. I don’t know should I fill issue report 
or make something else.
I made a decision to disable systemd-tmpfiles-clean entirely.

systemd-tmpfiles-clean by default configured to delete all files from /tmp with 
atime older than 10 days
after 15 min of system startup. That is regulated using tmpfiles.d rule and 
systemd-tmpfiles-clean.timer.

If machine has incorrect time set during boot (RTC not configured and no 
/var/lib/systemd/clock) and
later that time will be corrected using ntp, than systemd-tmpfiles-clean could 
delete all files and folder
(created withing 15 min, even opened and used at time systemd-tmpfiles-clean 
run) from /tmp directory.

I’d think about patching linux kernel to bind tmpfs atime to CLOCK_MONOTONIC. 
So atime wouldn’d be
affected by system time changes.

May be there is another solution for the issue.

Regards,
Alexander.

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel