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

Change of file system in /var/log #16

Closed
DL6ER opened this issue Apr 8, 2017 · 1 comment
Closed

Change of file system in /var/log #16

DL6ER opened this issue Apr 8, 2017 · 1 comment
Milestone

Comments

@DL6ER
Copy link
Member

DL6ER commented Apr 8, 2017

In general, once the handle to /var/log/pihole.log is open, the file is open, and nobody changing the directory structure can change that - the file can be moved, renamed, or put something else in its place - it remains open by construction, as in Linux/Unix there is no real delete for files, but only unlink, which doesn't necessarily delete the file - it just removes the link from the directory.

However, if the underlying device disappears (e.g. /var/log is a ramdisk) then the file handle won't be valid an more and is likely to lead to unpredictable behavior. This is a potential issue for FTL.

Note: Even if the file handle becomes invalid, it can still be used (but will likely give I/O errors) and has also still to be closed!

@DL6ER
Copy link
Member Author

DL6ER commented Apr 9, 2017

Proposed strategy: Don't use an ever open FILE pointer as connection to pihole.log, but rather get file size through stat() and only (try to) open pihole.log on demand (and when available!).

As this is a major and meanwhile critical change in strategy it will lead to FTL v2.0

@DL6ER DL6ER added this to the v2.0 milestone Apr 9, 2017
@DL6ER DL6ER closed this as completed in 371b7a0 Apr 9, 2017
DL6ER pushed a commit that referenced this issue Oct 14, 2019
 Update /stats/clients to new client-names FTL format
@jens1205 jens1205 mentioned this issue Dec 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant