From 1a9cf4a89ee06799be3c014bf7f5063556b3b24f Mon Sep 17 00:00:00 2001 From: Gabriel Mougard Date: Tue, 20 Aug 2024 16:24:13 +0200 Subject: [PATCH] debug Signed-off-by: Gabriel Mougard --- cmd/microcloud/ask.go | 1 + cmd/microcloud/main_init.go | 14 +++++++++----- test/suites/basic.sh | 1 + 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/cmd/microcloud/ask.go b/cmd/microcloud/ask.go index 4e0825f2d..7fe762c76 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 97ebaf08b..a41945fc1 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 93cf88b5e..b095c6fbe 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