mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-19 10:46:58 +08:00
scheduler: fix shared projects network filtered
This commit is contained in:
@@ -99,8 +99,8 @@ func (p *NetworkSchedtagPredicate) IsResourceFitInput(u *core.Unit, _ core.Candi
|
||||
if network.IsPublic {
|
||||
return fmt.Errorf("Network %s is public", network.Name)
|
||||
}
|
||||
if network.ProjectId != schedData.Project && utils.IsInStringArray(schedData.Project, network.GetSharedProjects()) {
|
||||
return fmt.Errorf("Network project %s not owner by %s", network.ProjectId, schedData.Project)
|
||||
if network.ProjectId != schedData.Project && !utils.IsInStringArray(schedData.Project, network.GetSharedProjects()) {
|
||||
return fmt.Errorf("Network project %s + %v not owner by %s", network.ProjectId, network.GetSharedProjects(), schedData.Project)
|
||||
}
|
||||
} else {
|
||||
if !network.IsPublic {
|
||||
|
||||
Reference in New Issue
Block a user