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

Status update/patch #26

Closed
baum opened this issue Feb 24, 2022 · 2 comments
Closed

Status update/patch #26

baum opened this issue Feb 24, 2022 · 2 comments

Comments

@baum
Copy link

baum commented Feb 24, 2022

Hello Eirik @clux,

Nice to meet you virtually. Thank you so much for this awesome. 🚀 codebase! Started playing with it here, evaluating it as an alternative to the canonical go lang knative source controller implementation.

Issue description

While playing with the control-rs, the latest main revision (1d97d57...) I've noticed the Foo resource's status is updated only on the first resource creation. For all subsequent Foo instance creations, the status would not be updated. Tried to debug this issue with additional traces. It appears that status_patch.await does not return the second time, but I could be totally wrong.

Reproduction steps

  1. Install controller
➜  controller-rs git:(main) ✗ k create -f yaml/foo-crd.yaml
customresourcedefinition.apiextensions.k8s.io/foos.clux.dev created
➜  controller-rs git:(main) ✗ k create -f yaml/deployment.yaml
serviceaccount/foo-controller created
clusterrole.rbac.authorization.k8s.io/control-foos created
clusterrolebinding.rbac.authorization.k8s.io/foo-controller-binding created
service/foo-controller created
deployment.apps/foo-controller created
  1. Create the first Foo instance and check if the status is updated
➜  controller-rs git:(main) ✗ k create -f yaml/instance-bad.yaml
foo.clux.dev/bad created
➜  controller-rs git:(main) ✗ k get foo bad -o yaml | grep is_bad
  is_bad: true
  1. Create a second Foo instance and check if the status is updated
➜  controller-rs git:(main) ✗ k create -f yaml/instance-good.yaml
foo.clux.dev/good created
➜  controller-rs git:(main) ✗ k get foo good -o yaml | grep is_bad
➜  controller-rs git:(main) ✗

Alternative Reproduction steps

For the following scenario same symptoms are observed:

  1. Create the first Foo instance and check if the status is updated
➜  controller-rs git:(main) ✗ k create -f yaml/instance-good.yaml
foo.clux.dev/good created
➜  controller-rs git:(main) ✗ k get foo good -o yaml | grep is_bad
  is_bad: false
  1. Delete the first instance
➜  controller-rs git:(main) ✗ k delete foo good
foo.clux.dev "good" deleted
  1. Recreate the same instance and check if the status is updated
➜  controller-rs git:(main) ✗ k create -f yaml/instance-good.yaml
foo.clux.dev/good created
➜  controller-rs git:(main) ✗ k get foo good -o yaml | grep is_bad
➜  controller-rs git:(main) ✗

Please share your thoughts...

Best regards and stay safe!

@clux
Copy link
Member

clux commented Feb 25, 2022

Ah, thanks for this. You are totally right; you have independently discovered kube-rs/kube#829 which was present in 0.69.0 and we used this repo to reproduce it.

I will bump to 0.69.1 and it should start working again.

@clux clux closed this as completed in 646c202 Feb 25, 2022
@clux
Copy link
Member

clux commented Feb 25, 2022

Ok, have verified once again locally. Sorry for this, forgot to restore this repo to a good state as we rushed out the fix to this rather serious bug and then went to bed :D

Hope the knative experiments go well after this! Please let us know if you have any other problems or if things go well. Would be great to see rust options on the knative side!

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

No branches or pull requests

2 participants