Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gitjob complains that Operation cannot be fulfilled on gitrepos.fleet.cattle.io #2343

Closed
1 task done
thehejik opened this issue Apr 19, 2024 · 4 comments
Closed
1 task done
Assignees
Labels
Milestone

Comments

@thehejik
Copy link

thehejik commented Apr 19, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

In rancher:v2.9-head-c9be13b with preinstalled fleet:104.0.0+up0.10.0-rc.11 there are new suspicious info log messages from gitjob pod that were not present in previous versions. Not sure if it has some impact on functionality yet.

I was testing with private azure https gitrepo but it is appearing also for public github gitrepo.

$ kubectl logs -n cattle-fleet-system -lapp=gitjob -f
{
  "level": "info",
  "ts": "2024-04-19T15:51:17Z",
  "logger": "gitjob-reconciler",
  "msg": "conflict updating status",
  "message": "Operation cannot be fulfilled on gitrepos.fleet.cattle.io \"gh-https-2\": the object has been modified; please apply your changes to the latest version and try again"
}

Reproducer:

Install rancher v2.9-head and add a gitrepo to fleet-local namespace, then observe the gitjob logs.

@thehejik thehejik added this to the v2.9.0 milestone Apr 19, 2024
@thehejik
Copy link
Author

During daily we discussed it is maybe related to another loglevel set or due to "zapr" logger.

@bigkevmcd
Copy link
Contributor

The code around this

return r.Status().Update(ctx, &gitRepoFromCluster)
could maybe be updated to .Patch() rather than .Update() and probably reload the status from the kube-apiserver before calculating the patch to apply.

@Tommy12789
Copy link
Collaborator

Additional QA

Issue:

2343

Problem

When applying a GitRepo, gitjob complaining about "Operation cannot be fulfilled on gitrepos.fleet.cattle.io" because gitrepo controller conflicting with gitjob controller.

Solution

Added the use of retryonconflict method within the updateStatusMethod of the gitjob reconciler to retry when a conflict happens

Testing

Repro steps are valid

Engineering Testing

Manual Testing

Repro steps from the issue

Automated Testing

N/A

QA Testing Considerations

  • Apply multiple gitrepo in multiple namespace to see if any error appears

Regressions Considerations

N/A

@thehejik
Copy link
Author

This problem is verified fixed in rancher:v2.9-head-de693b5 with fleet:104.0.0+up0.10.0-rc.14. The message is not appearing in gitjob logs anymore after adding a gitrepo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

No branches or pull requests

3 participants