kube-object-storage / lib-bucket-provisioner

Library for the dynamic provisioning of object store buckets to be used by object store providers.
Apache License 2.0
21 stars 22 forks source link

fix errors during provisioning #198

Closed BlaineEXE closed 3 years ago

BlaineEXE commented 3 years ago

Multiple fixes for issue reported in https://github.com/rook/rook/issues/6650 as well as issues found during investigation of aforementioned bug.

When provisioning fails and the deferred cleanup function is called, the controller must take care to ensure the object bucket resource being cleaned up (deleted) has the necessary fields filled in for delete calls to be successful. Fill in basic object bucket info as soon as possible after Privision() or Grant() returns, and in the event of an error during one of these calls, make sure the deferred cleanup function also sets the information it can before calling Delete().

The code generation script was not up to date for the k8s v1.19 API. Update code gen to work again, and update the generated code. This fixes a bug where provisioning completes and should not start again, but the controller allows provisioning to complete forever.

Signed-off-by: Blaine Gardner blaine.gardner@redhat.com

Tagging: @leseb @travisn @thotz They will be interested to comment on this PR.

Related: https://github.com/rook/rook/pull/6672

BlaineEXE commented 3 years ago

@jeffvance @copejon @thotz

jeffvance commented 3 years ago

lgtm Thanks @BlaineEXE

BlaineEXE commented 3 years ago

Seems like this is approved. How can I get it merged now?

BlaineEXE commented 3 years ago

@jeffvance are you able to do the merge?

Also, since Rook makes use of this library still, maybe we can chat about what adding a maintainer to this library would look like so we don't have to bug you when we need minor changes.

jeffvance commented 3 years ago

maybe we can chat about what adding a maintainer to this library

Agree. Maybe you and/or @thotz and/or Travis?

thotz commented 3 years ago

maybe we can chat about what adding a maintainer to this library

Agree. Maybe you and/or @thotz and/or Travis?

Even I agree that it better to have someone from Rook project as maintainer here