k3s-io / kine

Run Kubernetes on MySQL, Postgres, sqlite, dqlite, not etcd.
Apache License 2.0
1.49k stars 226 forks source link

Add support for WatchProgressRequest #268

Closed brandond closed 5 months ago

brandond commented 5 months ago
brandond commented 5 months ago

@qwtsc @onprem are you able to test this?

qwtsc commented 5 months ago

@qwtsc @onprem are you able to test this?

good! let me have a try!

qwtsc commented 5 months ago

@brandond Bad news, it does not work in my e2e test environment.

brandond commented 5 months ago

Are you able to run Kine in debug mode, and share the results?

qwtsc commented 5 months ago

My e2e test doesn't work with real etcd as backend storage either. I am so confused now. @onprem can you share the settings of apiserver?

qwtsc commented 5 months ago

FYI, the related issue has been reported in k&k.

brandond commented 5 months ago

I commented on the Kubernetes issue you linked, but I think the behavior you're expecting was incorrect and is no longer observed by v1.27+

brandond commented 5 months ago

Hmm. If I add info-level logging on progress requests in kine, I see that they are CONSTANTLY being spammed by the apiserver. I also note that things seem to take way longer to start up when the featuregate is enabled. This feels pretty broken at the moment, and I don't think it is etcd or kine - I think the feature does not work properly.

brandond commented 5 months ago

@qwtsc @onprem are you able to test with the commit I just pushed? I am still seeing some weirdness from the apiserver, but I believe the implementation is correct.

qwtsc commented 5 months ago

@qwtsc @onprem are you able to test with the commit I just pushed? I am still seeing some weirdness from the apiserver, but I believe the implementation is correct.

Ok, Let's see if it works or not.

qwtsc commented 5 months ago

@brandond unfortunately, it doesn't work, but same test case works for etcd with special flag experimental-watch-progress-notify-interval open. Can you find out what happened in etcd when running with this "experimental" flag?

brandond commented 5 months ago

experimental-watch-progress-notify-interval is not a Boolean flag; it requires a value and overrides the default 10 minute watch progress interval. What are you setting it to?

Is your test case just the previously discussed curl request, or do you have something else that you can share?

brandond commented 5 months ago

Oh, I see from the upstream k/k issue that it must be set to 5 seconds instead of the default 10 minutes, for the Kubernetes feature to work. I didn't see that documented anywhere; let me take a look at making that configurable in kine.

brandond commented 5 months ago

@qwtsc please try with the most recent commit, using the new CLI flag --watch-progress-notify-interval=5s

qwtsc commented 5 months ago

experimental-watch-progress-notify-interval is not a Boolean flag; it requires a value and overrides the default 10 minute watch progress interval. What are you setting it to?

Is your test case just the previously discussed curl request, or do you have something else that you can share?

Something like curl, but it's written in golang.

try with the most recent commit, using the new CLI flag --watch-progress-notify-interval=5s

let's try. BTW, you're so hard working, I've noticed progress in this PR almost every six hours. Do you ever take time to rest?:-)

brandond commented 5 months ago

Do you ever take time to rest? :-)

We have had a weeklong ice storm and my kids are out of school, so I don't have much else to do lol

qwtsc commented 5 months ago

Cheers, now It works smoothly. Thanks for your impressive contribution. @brandond