Skip to content

Commit

Permalink
Add inotify monitoring for certificates (sonic-net#203)
Browse files Browse the repository at this point in the history
Telemetry Process will now no longer exit when certs are missing. Because we added a goroutine within startGNMIServer such that we create a fsnotify watcher on the certificates directory to monitor changes brought upon files within that directory, such as deletion, creation, and modification, we will wait for certs to be present and then start gnmi server to start serving.
  • Loading branch information
zbud-msft authored Mar 28, 2024
1 parent ad8850d commit feaa1df
Show file tree
Hide file tree
Showing 5 changed files with 799 additions and 127 deletions.
2 changes: 1 addition & 1 deletion gnmi_server/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3905,7 +3905,7 @@ func TestGNMINativeMultiDB(t *testing.T) {

s := createServer(t, 8080)
go runServer(t, s)
defer s.s.Stop()
defer s.Stop()

path, _ := os.Getwd()
path = filepath.Dir(path)
Expand Down
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ require (
github.com/agiledragon/gomonkey/v2 v2.8.0
github.com/c9s/goprocinfo v0.0.0-20191125144613-4acdd056c72d
github.com/dgrijalva/jwt-go v3.2.1-0.20210802184156-9742bd7fca1c+incompatible
github.com/fsnotify/fsnotify v1.4.7
github.com/go-redis/redis v6.15.6+incompatible
github.com/godbus/dbus/v5 v5.1.0
github.com/gogo/protobuf v1.3.2
Expand Down
Loading

0 comments on commit feaa1df

Please sign in to comment.