Skip to content

Commit

Permalink
cmd/microcloud: Check for encap IP API extension
Browse files Browse the repository at this point in the history
Signed-off-by: Max Asnaashari <[email protected]>
  • Loading branch information
masnax committed Oct 1, 2024
1 parent 86b8b7a commit 233aa59
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions cmd/microcloud/main_init_preseed.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 == "" {
Expand Down

0 comments on commit 233aa59

Please sign in to comment.