-
Notifications
You must be signed in to change notification settings - Fork 174
Bulk silencing not working for some clients #677
Comments
Hi @narcistesa, Sorry for the delay. I just pushed a fix (https://github.com/sensu/uchiwa-web/pull/161) but I'm not 100% sure it will fix your particular problem. Do you have an easy way to identify which clients are affected without trying first? Do you have at least two clients with the same name on different datacenters? Could you show me, as an example, a client that can be bulk silenced and another one that can't? Thanks |
Hi @palourde, what seems to be happening is that uchiwa gets confused between two clients with similar names at the same data center, server and server2 in this case. If I select just the client named server and use the bulk silencing feature, I get the client named server2 in the bulk silencing UI dialog, and it will silence server2 instead. If I select both server and server2 and use the bulk silencing feature, none of them are listed in the bulk silencing UI and only one silencing entry is created for server2 (and angular throws the duplicate keys error). So for some reason uchiwa thinks that the client named server is actually server2. I can silence the clients named server1 and server2 together or individually using bulk silencing with no problems. I've downloaded the latest uchiwa-web master and replaced it in my uchiwa install and it doesn't seem to fix my issue. I've added the json for my 3 clients with similar names below, please let me know if there's anything else I can provide.
Thanks for looking into this. |
Hey @narcistesa Thank you for providing me this information, I was able to reproduce the issue with it and add a unit test to cover this specific issue. Turns out a simple function didn't performed strict comparison when filtering, which consequently made the id It has been resolved through https://github.com/sensu/uchiwa-web/pull/164 and will be available in the next release. Thanks! |
Thanks @palourde for the fix. |
Expected Behavior
The Bulk silencing UI dialog should show a list of the clients being silenced and should silence the selected clients.
Current Behavior
Some but not all clients seem to be affected by this issue when I try to use the bulk silencing feature. Individual client silencing works when clicking on the silencing icon.
If I select one of the clients affected by this bug and try to use bulk silencing on it, a different client name will show up in the UI dialog for silencing.
If I select two of the clients that are affected by this bug, none of them will show up in the UI silencing dialog and I get an angular error in the browser console (I decoded the URL already):
I asked a UI developer to quickly look at this with me and he said it looks like there are duplicate keys in angular, which would make sense since it looks like the affected clients might be using the same key for some reason (I'm guessing that's object:12650 in this case). That could cause the previous error when selecting two clients with the same key and could also cause the UI to return the wrong client name in the bulk silencing dialog.
Environment
The text was updated successfully, but these errors were encountered: