openebs / lvm-localpv

Dynamically provision Stateful Persistent Node-Local Volumes & Filesystems for Kubernetes that is integrated with a backend LVM2 data storage stack.
Apache License 2.0
245 stars 92 forks source link

refactor: refactor controller to use dynamic client and use better ratelimiter for controlled exponential backoff #186

Closed abhilashshetty04 closed 2 years ago

abhilashshetty04 commented 2 years ago

Signed-off-by: Abhilash Shetty abhilashshetty@abhilashshetty-mbp1.local

Why is this PR required? What issue does it fix?:

What this PR does?:

  1. Replaced codes which implemented code generation and used dynamic client to watch lvmvolume, lvmnode and lvmsnapshot cr
  2. Replaced builder pattern by one func implementation which would create controller struct and return.
  3. Added additional loggers to help debug event triggers.

Snapshot busylooping Fix: We have changed the ratelimiter which was used in snapshot controller. This ratelimiter requeues failed items after 5 secs for first 12 attempts. Then objects are requeued after 30 secs. I had unloaded dm-snapshot kernel module to reproduce this. Attached logs from the relevant node plugin below.

retrylogs.txt

Issues:

niladrih commented 2 years ago

@abhilashshetty04 -- All commits require a DCO signature. Commit e405d3c24f248bdd0eed5727f4a666c592ce5e55 is not signed. Also, please add a relevant PR description