mirror of
https://github.com/netbirdio/netbird.git
synced 2026-09-14 10:49:07 +02:00
Add one-shot migration
This commit is contained in:
@@ -288,6 +288,13 @@ func (s *Server) Start() error {
|
||||
return err
|
||||
}
|
||||
|
||||
// A half-migrated machine still runs, it just keeps resolving profiles the
|
||||
// old way, so a failure here is logged and retried on the next start rather
|
||||
// than kept from starting at all.
|
||||
if err := s.profileManager.MigrateLegacyProfiles(); err != nil {
|
||||
log.Errorf("profile migration did not finish, retrying on next start: %v", err)
|
||||
}
|
||||
|
||||
activeProf, err := s.profileManager.GetActiveProfileState()
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to get active profile state: %w", err)
|
||||
|
||||
Reference in New Issue
Block a user