Merge pull request #3230 from gravitl/master

Master
This commit is contained in:
Abhishek K 2024-11-27 15:33:42 +04:00 committed by GitHub
commit 343f5ee393
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 4 additions and 4 deletions

View file

@ -23,6 +23,7 @@ func CreateDefaultAclNetworkPolicies(netID models.NetworkID) {
if netID.String() == "" {
return
}
_, _ = ListAcls(netID)
if !IsAclExists(fmt.Sprintf("%s.%s", netID, "all-nodes")) {
defaultDeviceAcl := models.Acl{
ID: fmt.Sprintf("%s.%s", netID, "all-nodes"),
@ -172,9 +173,6 @@ func InsertAcl(a models.Acl) error {
func GetAcl(aID string) (models.Acl, error) {
a := models.Acl{}
if servercfg.CacheEnabled() {
if len(aclCacheMap) == 0 {
_ = listAcls()
}
var ok bool
a, ok = getAclFromCache(aID)
if ok {

View file

@ -20,6 +20,8 @@ import (
// Run - runs all migrations
func Run() {
_, _ = logic.GetAllNodes()
_, _ = logic.GetAllHosts()
updateEnrollmentKeys()
assignSuperAdmin()
createDefaultTagsAndPolicies()

View file

@ -6,7 +6,7 @@ import (
)
// DEFAULT_GC_PERCENT - garbage collection percent
const DEFAULT_GC_PERCENT = 10
const DEFAULT_GC_PERCENT = 100
// == OS PATH FUNCTIONS ==