Apply garage layout prior to putting bootstrap

main v0.0.1-rc1
Brian Picciano 7 months ago
parent b1fa3be970
commit 877e519821
  1. 26
      entrypoint/src/cmd/entrypoint/daemon.go

@ -136,19 +136,6 @@ func runDaemonPmuxOnce(
return bootstrap.Bootstrap{}, fmt.Errorf("waiting for nebula/garage to start up: %w", err)
}
err = doOnce(ctx, func(ctx context.Context) error {
if err := hostBootstrap.PutGarageBoostrapHost(ctx); err != nil {
logger.Error(ctx, "updating host info in garage", err)
return err
}
return nil
})
if err != nil {
return bootstrap.Bootstrap{}, fmt.Errorf("updating host info in garage: %w", err)
}
if len(daemonConfig.Storage.Allocations) > 0 {
err := doOnce(ctx, func(ctx context.Context) error {
@ -165,6 +152,19 @@ func runDaemonPmuxOnce(
}
}
err = doOnce(ctx, func(ctx context.Context) error {
if err := hostBootstrap.PutGarageBoostrapHost(ctx); err != nil {
logger.Error(ctx, "updating host info in garage", err)
return err
}
return nil
})
if err != nil {
return bootstrap.Bootstrap{}, fmt.Errorf("updating host info in garage: %w", err)
}
ticker := time.NewTicker(3 * time.Minute)
defer ticker.Stop()

Loading…
Cancel
Save