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

Incompatibility with carvel-kapp: object has been modified #77

Closed
universam1 opened this issue Jul 7, 2021 · 1 comment · Fixed by #81
Closed

Incompatibility with carvel-kapp: object has been modified #77

universam1 opened this issue Jul 7, 2021 · 1 comment · Fixed by #81
Assignees
Labels
bug Something isn't working
Milestone

Comments

@universam1
Copy link

We are leveraging "vmware-tanzu/carvel-kapp" as our deployment tool.

When deploying the refresh annotation kubefledged.k8s.io/refresh-imagecache the action is failing in the kube-fledged-controller with following error:

kubefledged-controller-69dbc794d8-b2hg4 E0707 09:40:58.095098       1 controller.go:491] Error updating imagecache status to Processing: Operation cannot be fulfilled on imagecaches.kubefledged.io "my-image": the object has been modified; please apply your changes to the latest version and try again                                                                                                                  

kubefledged-controller-69dbc794d8-b2hg4 E0707 09:40:58.095124       1 controller.go:366] error syncing imagecache: Operation cannot be fulfilled on imagecaches.kubefledged.io "my-image": the object has been modified; please apply your changes to the latest version and try again

We highly believe the issue is related to a race condition, described more in detail here:

kubernetes/kubernetes#67761

Workaround used within kapp:
https://github.com/vmware-tanzu/carvel-kapp/blob/d5b8c43b5678039c961b8369b2231860af9b5f90/pkg/kapp/resources/resources.go#L436-L438

@senthilrch
Copy link
Owner

senthilrch commented Jul 7, 2021

@universam1: appreciate you posting this issue. I'll add a get ImageCache in updateImageCacheStatus() before updating the status.

func (c *Controller) updateImageCacheStatus(imageCache *v1alpha2.ImageCache, status *v1alpha2.ImageCacheStatus) error {

That should fix this issue.

@senthilrch senthilrch self-assigned this Jul 7, 2021
@senthilrch senthilrch added the bug Something isn't working label Jul 7, 2021
@senthilrch senthilrch added this to the v0.8.1 milestone Jul 7, 2021
@senthilrch senthilrch linked a pull request Jul 23, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants