mirror of
https://github.com/gravitl/netmaker.git
synced 2025-10-07 20:38:51 +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() == "" {
|
if netID.String() == "" {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
_, _ = ListAcls(netID)
|
||||||
if !IsAclExists(fmt.Sprintf("%s.%s", netID, "all-nodes")) {
|
if !IsAclExists(fmt.Sprintf("%s.%s", netID, "all-nodes")) {
|
||||||
defaultDeviceAcl := models.Acl{
|
defaultDeviceAcl := models.Acl{
|
||||||
ID: fmt.Sprintf("%s.%s", netID, "all-nodes"),
|
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) {
|
func GetAcl(aID string) (models.Acl, error) {
|
||||||
a := models.Acl{}
|
a := models.Acl{}
|
||||||
if servercfg.CacheEnabled() {
|
if servercfg.CacheEnabled() {
|
||||||
if len(aclCacheMap) == 0 {
|
|
||||||
_ = listAcls()
|
|
||||||
}
|
|
||||||
var ok bool
|
var ok bool
|
||||||
a, ok = getAclFromCache(aID)
|
a, ok = getAclFromCache(aID)
|
||||||
if ok {
|
if ok {
|
||||||
|
|
|
@ -20,6 +20,8 @@ import (
|
||||||
|
|
||||||
// Run - runs all migrations
|
// Run - runs all migrations
|
||||||
func Run() {
|
func Run() {
|
||||||
|
_, _ = logic.GetAllNodes()
|
||||||
|
_, _ = logic.GetAllHosts()
|
||||||
updateEnrollmentKeys()
|
updateEnrollmentKeys()
|
||||||
assignSuperAdmin()
|
assignSuperAdmin()
|
||||||
createDefaultTagsAndPolicies()
|
createDefaultTagsAndPolicies()
|
||||||
|
|
|
@ -6,7 +6,7 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
// DEFAULT_GC_PERCENT - garbage collection percent
|
// DEFAULT_GC_PERCENT - garbage collection percent
|
||||||
const DEFAULT_GC_PERCENT = 10
|
const DEFAULT_GC_PERCENT = 100
|
||||||
|
|
||||||
// == OS PATH FUNCTIONS ==
|
// == OS PATH FUNCTIONS ==
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue