From c636acffe61d69106fe8bcc939d273a6cd7c716f Mon Sep 17 00:00:00 2001 From: garfthoffman <109185460+garfthoffman@users.noreply.github.com> Date: Fri, 22 Nov 2024 18:30:29 +0000 Subject: [PATCH] fail initializing acl if the provided acl file is empty Signed-off-by: garfthoffman <109185460+garfthoffman@users.noreply.github.com> --- go/vt/vttablet/tabletserver/tabletserver.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/go/vt/vttablet/tabletserver/tabletserver.go b/go/vt/vttablet/tabletserver/tabletserver.go index 847de25eb02..7d00c85704c 100644 --- a/go/vt/vttablet/tabletserver/tabletserver.go +++ b/go/vt/vttablet/tabletserver/tabletserver.go @@ -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.")