Skip to content

Commit

Permalink
fail initializing acl if the provided acl file is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
garfthoffman committed Nov 22, 2024
1 parent 0b51839 commit 47325bb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion go/vt/vttablet/tabletserver/tabletserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,8 @@ func (tsv *TabletServer) initACL(tableACLConfigFile string, enforceTableACLConfi
tsv.ClearQueryPlanCache()
},
)
if err != nil {
// Log failure if either there was a problem loading the ACL, or if the ACL is empty
if err != nil || tableacl.GetCurrentConfig().String() == "" {
log.Errorf("Fail to initialize Table ACL: %v", err)
if enforceTableACLConfig {
log.Exit("Need a valid initial Table ACL when enforce-tableacl-config is set, exiting.")
Expand Down

0 comments on commit 47325bb

Please sign in to comment.