Browse Source

cluster: run initRegions() before scanZoneIDs()

Signed-off-by: Alejandro Mery <amery@jpi.io>
Alejandro Mery 6 months ago
parent
commit
410a9f8e30
  1. 2
      pkg/cluster/cluster_import.go
  2. 2
      pkg/cluster/cluster_scan.go

2
pkg/cluster/cluster_import.go

@ -13,11 +13,11 @@ import (
func (m *Cluster) init(opts *ScanOptions) error { func (m *Cluster) init(opts *ScanOptions) error {
for _, fn := range []func(*ScanOptions) error{ for _, fn := range []func(*ScanOptions) error{
m.initZones, m.initZones,
m.initRegions,
m.scanZoneIDs, m.scanZoneIDs,
m.scanSort, m.scanSort,
m.scanGateways, m.scanGateways,
m.initCephMonitors, m.initCephMonitors,
m.initRegions,
} { } {
if err := fn(opts); err != nil { if err := fn(opts); err != nil {
return err return err

2
pkg/cluster/cluster_scan.go

@ -25,9 +25,9 @@ func (m *Cluster) scan(opts *ScanOptions) error {
for _, fn := range []func(*ScanOptions) error{ for _, fn := range []func(*ScanOptions) error{
m.scanDirectory, m.scanDirectory,
m.scanMachines, m.scanMachines,
m.initRegions,
m.scanZoneIDs, m.scanZoneIDs,
m.scanSort, m.scanSort,
m.initRegions,
m.scanGateways, m.scanGateways,
m.scanCephMonitors, m.scanCephMonitors,
} { } {

Loading…
Cancel
Save