Getting cron trigger by name is returning 404 even if the cron exists
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mistral |
Fix Released
|
Undecided
|
Arnaud Morin |
Bug Description
When getting a cron trigger by name, it can fail if the name is ending with .pl (but also other extensions) because the pecan core thinks we are asking for a perl file.
How to reproduce
================
# create cron trigger:
openstack cron trigger create --pattern '* * * * *' test.pl std.delete_instance '{"instance_id": "ec156981-
# list the cron triggers:
openstack cron trigger list
+------
| Name | Workflow | Params | Pattern | Next execution time | Remaining executions | Created at | Updated at |
+------
| test.pl | std.delete_instance | {} | * * * * * | 2022-08-23 16:08:00 | None | 2022-08-23 15:22:16 | 2022-08-23 16:07:34 |
+------
# grab it from name:
openstack cron trigger show 'test.pl'
b'<html>\n <head>\n <title>404 Not Found</title>\n </head>\n <body>\n <h1>404 Not Found</h1>\n The resource could not be found.<br /><br />\n\n\n\n </body>\n</html>'
In mistral-api.log you can see:
ERROR pecan.core [-] Controller 'get' defined does not support content_type 'text/x-perl'. Supported type(s): dict_keys(
Changed in mistral: | |
assignee: | nobody → Arnaud Morin (arnaud-morin) |
Fix proposed to branch: master /review. opendev. org/c/openstack /mistral/ +/854240
Review: https:/