diff options
author | W. Trevor King <wking@tremily.us> | 2018-05-11 12:08:06 -0700 |
---|---|---|
committer | Atomic Bot <atomic-devel@projectatomic.io> | 2018-05-17 22:39:13 +0000 |
commit | c45d4c6d5ce83a89f4c536e529c2a6e7a770837e (patch) | |
tree | 8ae65970a00be45424f5d1399284844a9f413eeb /libpod/state.go | |
parent | 4704c138ae7f3c98c3fddba2bc442d61f4eb1f28 (diff) | |
download | podman-c45d4c6d5ce83a89f4c536e529c2a6e7a770837e.tar.gz podman-c45d4c6d5ce83a89f4c536e529c2a6e7a770837e.tar.bz2 podman-c45d4c6d5ce83a89f4c536e529c2a6e7a770837e.zip |
hooks: Fix monitoring of multiple directories
This isn't an issue with podman, which will only ever use one
directory. But CRI-O generally uses two directories, and we want to
make sure that changes to the fallback directory are not clobbering
hooks configured in the override directory. More background in [1].
I've split the handling into a single-directory block and a
multiple-directory block so we don't waste time polling the filesystem
for single-directory removals.
I'm using the single-directory block for the the zero-directory case
as well. Managers with zero directories should not be receiving
fsnotify events, so I don't think it really matters which block
handles them. If we want to handle this case robustly (because we're
concerned about something in the hook package adjusted the private
.directories property on the fly?), then we'll probably want to add an
explicit zero-directory block in future work.
[1]: https://github.com/kubernetes-incubator/cri-o/pull/1470
Signed-off-by: W. Trevor King <wking@tremily.us>
Closes: #757
Approved by: rhatdan
Diffstat (limited to 'libpod/state.go')
0 files changed, 0 insertions, 0 deletions