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
ceph: always rehydrate the access and secret keys #8286
Conversation
Prior to that the access and secret keys were left empty if the user already existed, which led to updating the secret with empty values when the operator restarts. Signed-off-by: Sébastien Han <seb@redhat.com>
baed2e1
to
863e1d3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving with some nits.
// Somehow meta.TypeAccessor returns an empty string for the type name so using reflection instead | ||
objType := reflect.TypeOf(obj) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this is only in unit tests, that is to be expected, and I've had to manually fill this info in in the tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As discussed, it was at runtime :(
863e1d3
to
c5c03f9
Compare
The Rados Gateway Admin OPS API has changed its behavior from Nautilus to Pacific. Calling user create on an existing user wil generate additional keys to the user on Nautilus. Where in Pacific it will report an error with UserAlreadyExists. So to handle both scenarios, let's first get the user, and if the user does not exist (NoSuchUser) we then create it. Signed-off-by: Sébastien Han <seb@redhat.com>
c5c03f9
to
f074c12
Compare
ceph: always rehydrate the access and secret keys (backport #8286)
Description of your changes:
Prior to that the access and secret keys were left empty if the user
already existed, which led to updating the secret with empty values when
the operator restarts.
Signed-off-by: Sébastien Han seb@redhat.com
Which issue is resolved by this Pull Request:
Resolves #
Checklist:
make codegen
) has been run to update object specifications, if necessary.