Skip to content

Commit

Permalink
Don't exit tablet server on reloading invalid ACL
Browse files Browse the repository at this point in the history
This fixes potentially bringing down a tablet with an innocuous SIGHUP.

It also logs the fact it's reading the ACL file, to fix not getting any
feedback on SIGHUP.

#17139
  • Loading branch information
wiebeytec committed Jan 8, 2025
1 parent 6ac8998 commit bd36988
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions go/vt/tableacl/tableacl.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ func (tacl *tableACL) init(configFile string, aclCB func()) error {
if configFile == "" {
return nil
}
log.Infof("Reading ACL file %v", configFile)
data, err := os.ReadFile(configFile)
if err != nil {
log.Infof("unable to read tableACL config file: %v Error: %v", configFile, err)
Expand Down
2 changes: 1 addition & 1 deletion go/vt/vttablet/tabletserver/tabletserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ func (tsv *TabletServer) InitACL(tableACLConfigFile string, enforceTableACLConfi
signal.Notify(sigChan, syscall.SIGHUP)
go func() {
for range sigChan {
tsv.initACL(tableACLConfigFile, enforceTableACLConfig)
tsv.initACL(tableACLConfigFile, false)
}
}()

Expand Down

0 comments on commit bd36988

Please sign in to comment.