From db7d59bdac6b8748c7710fe3f1f416bd7bd5f48f Mon Sep 17 00:00:00 2001 From: Zexi Li Date: Fri, 10 May 2024 14:38:45 +0800 Subject: [PATCH] fix(scheduler): container vpc network (#20230) --- pkg/scheduler/cache/candidate/base.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/scheduler/cache/candidate/base.go b/pkg/scheduler/cache/candidate/base.go index 9a4406e56f..7f96f9b1dd 100644 --- a/pkg/scheduler/cache/candidate/base.go +++ b/pkg/scheduler/cache/candidate/base.go @@ -377,7 +377,7 @@ func newBaseHostDesc(b *baseBuilder, host *computemodels.SHost, netGetter *netwo return nil, fmt.Errorf("Fill networks error: %v", err) } // only onecloud host should fill onecloud vpc networks - if host.HostType == computeapi.HOST_TYPE_HYPERVISOR { + if sets.NewString(computeapi.HOST_TYPE_HYPERVISOR, computeapi.HOST_TYPE_CONTAINER).Has(host.HostType) { if err := desc.fillOnecloudVpcNetworks(netGetter); err != nil { return nil, fmt.Errorf("Fill onecloud vpc networks error: %v", err) }