-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
Validate config before saving changes after config reset #14203
Conversation
Mint Automation
|
something is not right, maybe with this fix. mc admin config set develop notify_webhook:abc enable=on endpoint=http://ercot-qenel8.develop.svc.cluster.local:5000/health mc: Unable to set 'notify_webhook:abc enable=on endpoint=http://ercot-qenel8.develop.svc.cluster.local:5000/health' to server. Unable to disable configured targets 'minio-ercot-cop:webhook'. I've tried to reset/remove minio-ercot-cop:webhook but it's not going away. It's not a valid webhook that is being complained about. minio-ercot-cop:webhook isn't a valid webhook, I don't think. maybe minio-ercot-cop:notify_webhook would be valid but not plain old webhook in the name. Am I missing something really obvious please? |
@pfriedland , you probably have stale event notifications on buckets that need to be deleted first -
Above script should help identify buckets using this old webhook minio-ercot-cop:notify_webhook. If you do `mc event remove / minio-ercot-cop:notify_webhook for such buckets, you should be able to add a new target - this PR is just ensuring that the config is valid at the time of saving and not deleting an actively referenced target |
@pfriedland please do not comment on pull requests make new issues - this is merged and released as per requirement.
You should make sure to disable and enable new targets that replace existing targets should be unregistered from existing bucket configurations. |
Guys - sorry about the comment that should have been an issue. Regardless,
I had to —force remove all events on the bucket I suspected it to be
attached. This odd event didn’t show up in any list. Things are back to
normal, I think.
…On Sat, Jan 29, 2022 at 22:25 Harshavardhana ***@***.***> wrote:
Above script should help identify buckets using this old webhook
minio-ercot-cop:notify_webhook. If you do `mc event remove /
minio-ercot-cop:notify_webhook for such buckets, you should be able to add
a new target - this PR is just ensuring that the config is valid at the
time of saving and not deleting an actively referenced target
@pfriedland <https://github.com/pfriedland> please do not comment on pull
requests make new issues - this is merged and released as per requirement.
mc: Unable to set 'notify_webhook:abc enable=on endpoint=
http://ercot-qenel8.develop.svc.cluster.local:5000/health' to server.
Unable to disable configured targets 'minio-ercot-cop:webhook'.
You should make sure to disable and enable new targets that replace
existing targets should be unregistered from existing bucket configurations.
—
Reply to this email directly, view it on GitHub
<#14203 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACEFZVMUMCN72MRMMWM7PLUYSVRDANCNFSM5M7JINZQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
👍🏽 we added this PR to potentially avoid the issue you had, so you shouldn't have future problems in this manner because unset or deletion of notification targets should require prior removal on the bucket notification configuration first. The PR ensures that an active setting is not allowed to be "reset" or "removed" |
Description
Motivation and Context
mc admin config reset alias notify_webhook
should fail when actively registered buckets exist. Currently, this succeeds but leaves behind stale bucket notification metadata on the registered buckets. It would be cleaner to throw an error at the time of notify target reset so thatmc event remove
can be performed before removing the targetsHow to test this PR?
Types of changes
Checklist:
commit-id
orPR #
here)