-
Notifications
You must be signed in to change notification settings - Fork 21
[CORE-8020] tls: Watch for IN_MOVED_TO #150
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
base: v24.3.x
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -537,7 +537,7 @@ class tls::reloadable_credentials_base { | |
| } | ||
| } | ||
| } | ||
| future<fsnotifier::watch_token> add_watch(const sstring& filename, fsnotifier::flags flags = fsnotifier::flags::close_write|fsnotifier::flags::delete_self) { | ||
| future<fsnotifier::watch_token> add_watch(const sstring& filename, fsnotifier::flags flags = fsnotifier::flags::close_write|fsnotifier::flags::delete_self|fsnotifier::flags::move_to) { | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. When executing
I do not understand why adding The
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Testing this naively at the command line, it doesn't seem like this type of which makes sense I think because inotify monitors the state of the inodes pointed to by the directory entry, rather than the
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah, never mind, this is a file watch. Now I'm confused too! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Apologies, you are right. i should have been more careful in the description.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. well, that type of move does not immediately notify |
||
| return _fsn.create_watch(filename, flags).then([this, filename = filename](fsnotifier::watch w) { | ||
| auto t = w.token(); | ||
| // we might create multiple watches for same token in case of dirs, avoid deleting previously | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting. The man page made me think that
move_tois generated for the containing directory rather than the file and thatmove_selfis more appropriate.What happens if someone does
mv existing.crt existing.crt.bkpas a way of deleting certificates? I'm wondering if that would trigger adelete_selfor if we should be watchingmove_fromas well.https://man7.org/linux/man-pages/man7/inotify.7.html
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fwiw, I don't think
mv existing.crt existing.crt.bkpwill reliably invalidate the inode corresponding toexisting.crt.