Closed steverob closed 7 years ago
Hi. Please show your code + output of mount
+ used commands with information on which mount point they are executed + output of freebsd-version
.
@pblaszczyk sure. Here is the code -
package main
import (
"github.com/rjeczalik/notify"
"fmt"
"os"
)
func init() {
raven.SetDSN("XYZ")
}
func main() {
c := make(chan notify.EventInfo, 10)
watchRoot := os.Args[1]
if err := notify.Watch(watchRoot + "/...", c, notify.Create); err != nil {
raven.CaptureError(err, nil)
}
defer notify.Stop(c)
for {
fmt.Println("Waiting...")
ei := <-c
fmt.Println("Received: ", ei)
}
}
FreeBSD Version - FreeBSD 10.0-RELEASE-p12
Output of mount
- (this is a shared storage server, removed some lines) -
abcstore on /abcstore (zfs, NFS exported, local, noatime, nfsv4acls)
..
..
abcstore/vodstore/eventstream on /abcstore/vodstore/eventstream (zfs, NFS exported, local, noatime, nfsv4acls)
abcstore/vodstore/eventstream/recordings
--> this is where I am watching from, recursively downwards.
@pblaszczyk any thoughts on this? Thanks for looking in...
Hi. Yes. Unfortunately I believe there is a bug here. Just to confirm that this is really the same scenario: please try watching on events notify.Create | notify.Write
and check if with this configuration notify.Create
events are triggered.
Just fyi - debug logs may also be helpful, build/run your code with debug tag:
$ go run -tags debug main.go
@pblaszczyk thanks. THAT WORKS! :) Thanks a lot.
Closed by #112.
Hi, I am trying to use
notify
to listen toCREATE
events in a volume mounted over ZFS in a server running FreeBSD.But the event does not get captured at all. The code works fine in my Ubuntu distribution.
Any idea why? Thanks!