Skip to content

Commit

Permalink
TEST
Browse files Browse the repository at this point in the history
Signed-off-by: Gabriel Mougard <[email protected]>
  • Loading branch information
gabrielmougard committed Feb 10, 2025
1 parent 935c04a commit 4da155f
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 5 deletions.
6 changes: 1 addition & 5 deletions cmd/microcloud/add.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,11 @@ func (c *cmdAdd) Run(cmd *cobra.Command, args []string) error {

cfg.name = status.Name
cfg.address = status.Address.Addr().String()
microcloudInternalNet, err := cfg.askAddress("")
_, err = cfg.askAddress("")
if err != nil {
return err
}

addingSystem := cfg.systems[cfg.name]
addingSystem.MicroCloudInternalNetwork = microcloudInternalNet
cfg.systems[cfg.name] = addingSystem

installedServices := []types.ServiceType{types.MicroCloud, types.LXD}
optionalServices := map[types.ServiceType]string{
types.MicroCeph: api.MicroCephDir,
Expand Down
18 changes: 18 additions & 0 deletions cmd/microcloud/preseed.go
Original file line number Diff line number Diff line change
Expand Up @@ -713,6 +713,24 @@ func (p *Preseed) Parse(s *service.Handler, c *initConfig, installedServices map
}

lxd := s.Services[types.LXD].(*service.LXDService)

if c.bootstrap {
// We need to find the interface for the lookup subnet.
microCloudSubnetInterface, err := lxd.FindInterfaceForSubnet(p.LookupSubnet)
if err != nil {
return nil, err
}

ipLookupSubnet, lookupSubnet, err := net.ParseCIDR(p.LookupSubnet)
if err != nil {
return nil, err
}

bootstrapSystem := c.systems[s.Name]
bootstrapSystem.MicroCloudInternalNetwork = &Network{Interface: *microCloudSubnetInterface, Subnet: lookupSubnet, IP: ipLookupSubnet}
c.systems[s.Name] = bootstrapSystem
}

ifaceByPeer := map[string]string{}
ovnUnderlayNeeded := false
for _, cfg := range p.Systems {
Expand Down

0 comments on commit 4da155f

Please sign in to comment.