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

object: create cosi user after successful reconcilation #14020

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

thotz
Copy link
Contributor

@thotz thotz commented Apr 3, 2024

Objectstore controller creates cosi user before objectstore is ready, this create unecessary errors logs mentioning cosi user failed to create.

Fixes: #13904

Checklist:

  • Commit Message Formatting: Commit titles and messages follow guidelines in the developer guide.
  • Reviewed the developer guide on Submitting a Pull Request
  • Pending release notes updated with breaking and/or notable changes for the next minor release.
  • Documentation has been updated, if necessary.
  • Unit tests have been added, if necessary.
  • Integration tests have been added, if necessary.

@thotz thotz requested review from BlaineEXE and travisn April 3, 2024 12:42
@BlaineEXE BlaineEXE marked this pull request as draft April 3, 2024 16:40
@BlaineEXE
Copy link
Member

Converted to draft since we talked about going a different direction with the fix.

Objectstore controller creates cosi user before objectstore is ready,
it will take sometime to rgw server will up and be ready receive
requests via restapi. So creating cosi will fail until rgw is ready. But
other users like adminops and dashboard are created with help of
`radosgw-admin` command and never fails. So use the same approach for
cosi user.

Fixes: rook#13904

Signed-off-by: Jiffin Tony Thottan <thottanjiffin@gmail.com>
@thotz
Copy link
Contributor Author

thotz commented Apr 5, 2024

@BlaineEXE @travisn Instead of using adminops apis, use radosgw-admin commands for the cosi user creation. Currently dashboard user is created using the same steps. The radosgw-admin commands are not failing while creating an adminops user or dashboard user even though rgw is still coming up.

return reconcile.Result{}, errors.Wrapf(err, "failed to get admin ops API context")
}
if cephObjectStore.Spec.IsExternal() {
adminOpsCtx, err := newMultisiteAdminOpsCtxFunc(objCtx, &cephObjectStore.Spec)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So we need to use the admin api for external clusters, but radosgw-admin for local creation?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer not do this and always use the admin ops API, even if it takes longer for us to be able to successfully use the commands. We have so many problems with radosgw-admin that I'd like to use it as infrequently as possible.

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

Successfully merging this pull request may close these issues.

Creating COSI user causes the object store reconcile to fail several times before finally succeeding
3 participants