mirror of
https://github.com/gravitl/netmaker.git
synced 2025-10-03 18:35:01 +08:00
commit
343f5ee393
3 changed files with 4 additions and 4 deletions
|
@ -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 {
|
||||
|
|
|
@ -20,6 +20,8 @@ import (
|
|||
|
||||
// Run - runs all migrations
|
||||
func Run() {
|
||||
_, _ = logic.GetAllNodes()
|
||||
_, _ = logic.GetAllHosts()
|
||||
updateEnrollmentKeys()
|
||||
assignSuperAdmin()
|
||||
createDefaultTagsAndPolicies()
|
||||
|
|
|
@ -6,7 +6,7 @@ import (
|
|||
)
|
||||
|
||||
// DEFAULT_GC_PERCENT - garbage collection percent
|
||||
const DEFAULT_GC_PERCENT = 10
|
||||
const DEFAULT_GC_PERCENT = 100
|
||||
|
||||
// == OS PATH FUNCTIONS ==
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue