Skip to content

Commit

Permalink
Remove stale objects handling from *network CR states
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.

Signed-off-by: Yury Kulazhenkov <ykulazhenkov@nvidia.com>
  • Loading branch information
ykulazhenkov committed Nov 22, 2023
1 parent d47996d commit 125e9a0
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 125e9a0

Please sign in to comment.