Skip to content

Conversation

@Fei-Guo
Copy link
Contributor

@Fei-Guo Fei-Guo commented Sep 20, 2022

Description of your changes

Both the fleet-member-agent and the fleet-member-net-controller-manager will update the
IMC object in the hub cluster to update the heartbeat information at every 60 seconds. If the updates
from two controllers are somehow in-sync, one of them can hit the update conflict error.

There is not ideal way to avoid update conflicts since they are two controllers running in two different Pods.
Hence this change chooses to sink the update conflict error because

  1. The errors may happen frequently if the updates from two controllers are in-sync.
  2. Immediate reconciliation will resolve the update conflict error since the object is reloaded.

How has this code been tested

Manual test

Special notes for your reviewer

@ryanzhang-oss
Copy link
Contributor

I understand that conflict is inevitable if we use update. Can we use patch or retry on the conflict? I am not sure that just silently retry without any log is good since it will be hard to know if the update succeeds or not by looking at the logs.

@Fei-Guo
Copy link
Contributor Author

Fei-Guo commented Sep 20, 2022

I understand that conflict is inevitable if we use update. Can we use patch or retry on the conflict? I am not sure that just silently retry without any log is good since it will be hard to know if the update succeeds or not by looking at the logs.

We are effectively doing retry on conflict since the reconciliation still returns an error. If you prefer, I can add Info v(2) log for conflict.

@ryanzhang-oss
Copy link
Contributor

We are effectively doing retry on conflict since the reconciliation still returns an error. If you prefer, I can add Info v(2) log for conflict.

sure, that makes sense

@ryanzhang-oss ryanzhang-oss merged commit 55460c3 into main Sep 21, 2022
@zhiying-lin zhiying-lin deleted the fguo-dev1 branch August 16, 2023 08:40
weng271190436 added a commit to weng271190436/fleet that referenced this pull request Nov 3, 2025
remove v1alpha1 internal MC and MC controllers

Signed-off-by: Wei Weng <Wei.Weng@microsoft.com>
Co-authored-by: Wei Weng <Wei.Weng@microsoft.com>
Co-authored-by: Ryan Zhang <yangzhangrice@hotmail.com>
@weng271190436 weng271190436 mentioned this pull request Nov 3, 2025
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants