From 233aa592f80b376e1935243b890751f18338767f Mon Sep 17 00:00:00 2001 From: Max Asnaashari Date: Tue, 1 Oct 2024 22:18:44 +0000 Subject: [PATCH] cmd/microcloud: Check for encap IP API extension Signed-off-by: Max Asnaashari --- cmd/microcloud/main_init_preseed.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/cmd/microcloud/main_init_preseed.go b/cmd/microcloud/main_init_preseed.go index 18dddf0bc..425fd3bc7 100644 --- a/cmd/microcloud/main_init_preseed.go +++ b/cmd/microcloud/main_init_preseed.go @@ -564,10 +564,13 @@ func (p *Preseed) Parse(s *service.Handler, c *initConfig) (map[string]InitSyste c.systems[peer] = system } - // TODO: call `s.Services[types.MicroOVN].(*service.OVNService).SupportsFeature(context.Background(), "custom_encapsulation_ip")` - // when MicroCloud will be updated with microcluster/v2 + supportsEncap, err := s.Services[types.MicroOVN].(*service.OVNService).SupportsFeature(context.Background(), "custom_encapsulation_ip") + if err != nil { + return nil, err + } + // Check the preseed underlay network configuration against the available ifaces. - if ovnUnderlayNeeded { + if ovnUnderlayNeeded && supportsEncap { assignedSystems := map[string]bool{} for _, sys := range p.Systems { if sys.UnderlayIP == "" {