a73x

a2b7e074

store: the cidr-pool argument lives in the tests that fail on it

a73x   2026-08-23 10:41

Commit message
store: the cidr-pool argument lives in the tests that fail on it

internal/server/store/store.go
Old New
@@ -445,14 +445,6 @@ func Open(path, cidrPool string) (*Store, error) {
445 db.Close() 445 db.Close()
446 return nil, fmt.Errorf("seed cidr_pool: %w", err) 446 return nil, fmt.Errorf("seed cidr_pool: %w", err)
447 } 447 }
448 // The flag lost, so say so. A host holds the subnet it was allocated for
449 // life, which is why the stored pool wins and must — re-planning subnets
450 // under a fleet already routing on the old ones is not something a restart
451 // gets to do. But an operator who edited the flag deliberately otherwise
452 // sees a clean startup and a control plane that quietly kept the old value,
453 // and only learns the flag was inert when a newly-enrolled host lands on a
454 // subnet nobody expected. A warning rather than a refusal because a unit
455 // file that has already drifted must still be able to start the plane.
456 var stored string 448 var stored string
457 if err := db.QueryRow(`SELECT value FROM meta WHERE key='cidr_pool'`).Scan(&stored); err != nil { 449 if err := db.QueryRow(`SELECT value FROM meta WHERE key='cidr_pool'`).Scan(&stored); err != nil {
458 db.Close() 450 db.Close()