file: Fix regression in fsnotify code
This was a major deadlock that hit the file resource. I didn't notice it earlier because I was using an older version of fsnotify and I hadn't done a go get -u to refresh it. I finally tracked this down, and will vendor the repository until a fix upstream or a workaround downstream is added. The upstream issue is: https://github.com/fsnotify/fsnotify/issues/123
This commit is contained in:
3
.gitmodules
vendored
3
.gitmodules
vendored
@@ -7,3 +7,6 @@
|
|||||||
[submodule "vendor/github.com/grpc-ecosystem/grpc-gateway"]
|
[submodule "vendor/github.com/grpc-ecosystem/grpc-gateway"]
|
||||||
path = vendor/github.com/grpc-ecosystem/grpc-gateway
|
path = vendor/github.com/grpc-ecosystem/grpc-gateway
|
||||||
url = https://github.com/grpc-ecosystem/grpc-gateway
|
url = https://github.com/grpc-ecosystem/grpc-gateway
|
||||||
|
[submodule "vendor/gopkg.in/fsnotify.v1"]
|
||||||
|
path = vendor/gopkg.in/fsnotify.v1
|
||||||
|
url = https://gopkg.in/fsnotify.v1
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ If you have a well phrased question that might benefit others, consider asking i
|
|||||||
* Clone the repository recursively, eg: `git clone --recursive https://github.com/purpleidea/mgmt/`.
|
* Clone the repository recursively, eg: `git clone --recursive https://github.com/purpleidea/mgmt/`.
|
||||||
* Get the remaining golang dependencies on your own, or run `make deps` if you're comfortable with how we install them.
|
* Get the remaining golang dependencies on your own, or run `make deps` if you're comfortable with how we install them.
|
||||||
* Run `make build` to get a freshly built `mgmt` binary.
|
* Run `make build` to get a freshly built `mgmt` binary.
|
||||||
* Run `time ./mgmt run --file examples/graph0.yaml --converged-timeout=1` to try out a very simple example!
|
* Run `time ./mgmt run --file examples/graph0.yaml --converged-timeout=5 --tmp-prefix` to try out a very simple example!
|
||||||
* To run continuously in the default mode of operation, omit the `--converged-timeout` option.
|
* To run continuously in the default mode of operation, omit the `--converged-timeout` option.
|
||||||
* Have fun hacking on our future technology!
|
* Have fun hacking on our future technology!
|
||||||
|
|
||||||
|
|||||||
@@ -317,6 +317,7 @@ func (obj *FileRes) Watch(processChan chan event.Event) error {
|
|||||||
|
|
||||||
// we must be a parent watcher, so descend in
|
// we must be a parent watcher, so descend in
|
||||||
if deltaDepth < 0 {
|
if deltaDepth < 0 {
|
||||||
|
// XXX: we can block here due to: https://github.com/fsnotify/fsnotify/issues/123
|
||||||
obj.watcher.Remove(current)
|
obj.watcher.Remove(current)
|
||||||
index++
|
index++
|
||||||
}
|
}
|
||||||
|
|||||||
1
vendor/gopkg.in/fsnotify.v1
generated
vendored
Submodule
1
vendor/gopkg.in/fsnotify.v1
generated
vendored
Submodule
Submodule vendor/gopkg.in/fsnotify.v1 added at 7be5420663
Reference in New Issue
Block a user