Friday, 2022-03-11

jamespagemrunge: the switch to using the dynamic aggregates API in gnocchi has a somewhat untended side-effect11:40
jamespagehttps://bugs.launchpad.net/aodh/+bug/196397111:41
jamespagethe gnocchi aggregates API returns 400 (bad request) rather than 404 (not found) when a metric is not found11:41
jamespagewhich an happen as aodh alarms are setup prior to instances actually running during usage from heat stacks11:41
jamespageI've raised https://github.com/gnocchixyz/gnocchi/pull/120211:42
jamespageto align this api with others in gnocchi11:42
jamespagemaybe tobias-urdin can give me an opinion on the suitability of that PR for gnocchi11:58
tobias-urdinjamespage: tricky one, i don't have access to view those paste's so can't really see where it comes from12:21
tobias-urdinbut that checking was introduced in https://github.com/gnocchixyz/gnocchi/issues/1013 - it's kind of valid though i would think since it's trying to aggregate something that doesn't exist, seems valid to be to pass bad request then12:22
tobias-urdini guess 404 would have been as valid, can't caller be made aware that it's sending an invalid request?12:22
jamespagetobias-urdin: Let me get the bug report to actually attach those to the bug report...12:41
jamespagetobias-urdin: the trick here is that the aggregate query is valid, its just that the metrics don't actually exist at the point in time the aodh alarm is created12:42
jamespagethere is no differentiation between 'this query is just broken' and 'metrics not currently found'12:42
jamespageif that makes12:43
jamespagesense12:43
jamespageat least that's my reading of it12:47
jamespagethis is the pertinent handling of 404 in aodh12:48
jamespagehttps://opendev.org/openstack/aodh/src/branch/master/aodh/api/controllers/v2/alarm_rules/gnocchi.py#L21712:48
jamespagethat has not been updated and used to use the now deprecated metric aggregation api which will return a 404 if metrics are not present12:49
mrungeugh13:49
tobias-urdinbut it works after such a metric does exist right?15:24
tobias-urdini'm actually inclined to agree that it's probably the correct behavior to have 404 there, can you push a release note with your PR - i can't really backport it to stable/4.4 for the behavior change but i can merge in master but will ping jd first for any feedback, so best thing would be to add more details to the PR about the case and about the15:26
tobias-urdinbehavior change compared to the deprecated api15:26
tobias-urdinmight even be time for a 4.5 release soon15:32
mrungeI'd prefer to see a 404 returned, not a 400 (bad request)15:39
mrungenot found for a non-existing metric seems to meet more the reality (in my eyes)15:40
tobias-urdinupdated gnocchi PR with more details15:47
mrungetobias-urdin, I've submitted a PR for RDO to rebase gnocchi to the 4.4 stable branch: https://review.rdoproject.org/r/c/rdoinfo/+/4036116:04
jamespagetobias-urdin: I can (push a release note)16:05

Generated by irclog2html.py 2.17.3 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!