Skip to content

Commit

Permalink
fix: remove stale objects handling from *network CR states (#686)
Browse files Browse the repository at this point in the history
All CR instances are sharing the same state name, but they handled by a
separate Reconcile loop.
Stale objects removal logic doesn't support this scenario.
  • Loading branch information
e0ne committed Nov 22, 2023
2 parents d47996d + 125e9a0 commit 30aaa6c
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 21 deletions.
7 changes: 0 additions & 7 deletions pkg/state/state_hostdevice_network.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,6 @@ func (s *stateHostDeviceNetwork) Sync(
if err != nil {
return SyncStateNotReady, errors.Wrap(err, "failed to create/update objects")
}
waitForStaleObjectsRemoval, err := s.handleStaleStateObjects(ctx, objs)
if err != nil {
return SyncStateNotReady, errors.Wrap(err, "failed to handle state stale objects")
}
if waitForStaleObjectsRemoval {
return SyncStateNotReady, nil
}
// Check objects status
syncState, err := s.getSyncState(ctx, objs)
if err != nil {
Expand Down
7 changes: 0 additions & 7 deletions pkg/state/state_ipoib_network.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,6 @@ func (s *stateIPoIBNetwork) Sync(ctx context.Context, customResource interface{}
if err != nil {
return SyncStateNotReady, errors.Wrap(err, "failed to create/update objects")
}
waitForStaleObjectsRemoval, err := s.handleStaleStateObjects(ctx, objs)
if err != nil {
return SyncStateNotReady, errors.Wrap(err, "failed to handle state stale objects")
}
if waitForStaleObjectsRemoval {
return SyncStateNotReady, nil
}
// Check objects status
syncState, err := s.getSyncState(ctx, objs)
if err != nil {
Expand Down
7 changes: 0 additions & 7 deletions pkg/state/state_macvlan_network.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,6 @@ func (s *stateMacvlanNetwork) Sync(ctx context.Context, customResource interface
if err != nil {
return SyncStateNotReady, errors.Wrap(err, "failed to create/update objects")
}
waitForStaleObjectsRemoval, err := s.handleStaleStateObjects(ctx, objs)
if err != nil {
return SyncStateNotReady, errors.Wrap(err, "failed to handle state stale objects")
}
if waitForStaleObjectsRemoval {
return SyncStateNotReady, nil
}
// Check objects status
syncState, err := s.getSyncState(ctx, objs)
if err != nil {
Expand Down

0 comments on commit 30aaa6c

Please sign in to comment.