diff --git a/cmd/microcloud/ask.go b/cmd/microcloud/ask.go index 4e0825f2..7fe762c7 100644 --- a/cmd/microcloud/ask.go +++ b/cmd/microcloud/ask.go @@ -1141,6 +1141,7 @@ func (c *initConfig) askOVNNetwork(sh *service.Handler) error { return err } + fmt.Printf("Using %q for OVN underlay traffic on %q\n", ip.String(), peer) system.OVNGeneveAddr = ip.String() } } diff --git a/cmd/microcloud/main_init.go b/cmd/microcloud/main_init.go index 97ebaf08..a41945fc 100644 --- a/cmd/microcloud/main_init.go +++ b/cmd/microcloud/main_init.go @@ -768,13 +768,17 @@ func (c *initConfig) setupCluster(s *service.Handler) error { if s.Type() == types.MicroOVN { microOvnBootstrapConf := make(map[string]string) - for _, system := range c.systems { - // If the system needs to be bootstrapped with a custom ovn encapsulation ip for geneve, add it to the init config. - if system.OVNGeneveAddr != "" { - microOvnBootstrapConf["ovn-encap-ip"] = system.OVNGeneveAddr - } + if bootstrapSystem.OVNGeneveAddr != "" { + microOvnBootstrapConf["ovn-encap-ip"] = bootstrapSystem.OVNGeneveAddr } + // for _, system := range c.systems { + // // If the system needs to be bootstrapped with a custom ovn encapsulation ip for geneve, add it to the init config. + // if system.OVNGeneveAddr != "" { + // microOvnBootstrapConf["ovn-encap-ip"] = system.OVNGeneveAddr + // } + // } + if len(microOvnBootstrapConf) > 0 { s.SetConfig(microOvnBootstrapConf) } diff --git a/test/suites/basic.sh b/test/suites/basic.sh index 93cf88b5..b095c6fb 100644 --- a/test/suites/basic.sh +++ b/test/suites/basic.sh @@ -239,6 +239,7 @@ test_interactive() { export CEPH_CLUSTER_NETWORK="${ceph_cluster_subnet_prefix}.0/24" export OVN_UNDERLAY_NETWORK="yes" export OVN_UNDERLAY_FILTER="${ovn_underlay_subnet_prefix}" + microcloud_interactive | lxc exec micro01 -- sh -c "microcloud init > out" lxc exec micro01 -- tail -1 out | grep "MicroCloud is ready" -q