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
Signed-off-by: garfthoffman <[email protected]>
  • Loading branch information
garfthoffman committed Nov 22, 2024
1 parent 0b51839 commit c636acf
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 c636acf

Please sign in to comment.