*** etienne has quit IRC | 01:06 | |
*** cyberpear has quit IRC | 03:08 | |
*** cyberpear has joined #ara | 03:09 | |
*** mugsie has quit IRC | 03:22 | |
*** cyberpear has quit IRC | 03:22 | |
*** mugsie has joined #ara | 03:37 | |
*** cyberpear has joined #ara | 03:38 | |
*** irclogbot_1 has quit IRC | 03:41 | |
*** irclogbot_3 has joined #ara | 03:41 | |
*** vincent-- has joined #ara | 06:51 | |
*** vincent--- has quit IRC | 06:54 | |
apollo13 | dmsimard: how did it go? :) | 06:59 |
---|---|---|
openstackgerrit | Florian Apolloner proposed recordsansible/ara master: POC for mass hosting. https://review.opendev.org/665323 | 08:00 |
*** zbr|ooo is now known as zbr|ruck | 08:01 | |
apollo13 | dmsimard: seems to work ^ :) | 08:15 |
dmsimard | apollo13 : I had gotten the wsgi part to work but couldn't seem to get the thread local thing working | 11:46 |
apollo13 | well mine is relatively untested | 11:46 |
apollo13 | but it tried to pick up a database | 11:47 |
dmsimard | I'll review after sending kids to school | 11:47 |
apollo13 | so if you put a few databases into /tmp and then try http://localhost…/tmp/path1/ara-report/api | 11:47 |
apollo13 | it should work *tm* | 11:47 |
*** herald85 has joined #ara | 12:51 | |
dmsimard | apollo13: added comments but it's mostly bikeshedding, trying now | 13:29 |
dmsimard | so this works: http://127.0.0.1:8000/home/dmsimard/.ara/server/ara-report/api/v1/ | 13:37 |
dmsimard | but it expects the database in /home/dmsimard/.ara/server instead of inside /home/dmsimard/.ara/server/ara-report | 13:38 |
dmsimard | for example: | 13:39 |
dmsimard | 2019-06-14 13:36:51,389 INFO root: db_file does not exist: /home/dmsimard/.ara/ansible.sqlite | 13:39 |
dmsimard | [14/Jun/2019 13:36:51] "GET /home/dmsimard/.ara/ara-report/api/v1/playbooks HTTP/1.1" 404 77 | 13:39 |
dmsimard | (Added some logging to debug) | 13:39 |
dmsimard | otherwise it works and it's less dirty than we initially thought it would be | 13:40 |
dmsimard | ++ | 13:40 |
apollo13 | well just add ara-report to the path | 13:40 |
apollo13 | in my code where I + ansible.sqlite, just do 'ara-report/ansible.sqlite' instead | 13:41 |
dmsimard | yeah, I realize that -- just pointing it out :p | 13:41 |
apollo13 | and not ugly is relative :) | 13:41 |
apollo13 | hehe, feel free to fix it was a POC so you had something to work on :) | 13:41 |
dmsimard | sure | 13:42 |
apollo13 | I'll try to answer your comments | 13:42 |
apollo13 | dmsimard: there might still be some dragons hidden somewhere and we maybe want a root path to start from somewhere | 13:48 |
dmsimard | yeah, there are some security considerations | 13:48 |
apollo13 | right :) | 13:48 |
dmsimard | apollo13: I had not noticed this sorcery: db_file = Path(fs_path) / "ansible.sqlite" | 14:22 |
apollo13 | dmsimard: no sorcery, just pathlib :) | 14:22 |
dmsimard | I'm more of an os.path.join guy | 14:22 |
dmsimard | didn't know about pathlib | 14:23 |
apollo13 | yeah it's py3 only I think | 14:23 |
dmsimard | also, this is what I was missing yesterday: from ara.server.db_backend.base import local_storage | 14:28 |
dmsimard | I was trying to use current_thread or something | 14:28 |
apollo13 | ah yes, that will get annoying | 14:39 |
*** herald85 has quit IRC | 14:58 | |
*** vincent--- has joined #ara | 15:06 | |
*** vincent-- has quit IRC | 15:08 | |
*** dbpiv has quit IRC | 17:27 | |
*** dbpiv has joined #ara | 17:30 | |
*** dbpiv has joined #ara | 17:32 | |
*** vincent--- has quit IRC | 18:16 | |
*** etienne has joined #ara | 18:47 | |
dmsimard | apollo13: we should probably not allow write ops through that middleware | 18:53 |
dmsimard | aka, read only ? | 18:53 |
dmsimard | both at the API level and at the database level | 18:53 |
dmsimard | s/middleware/backend/ | 18:54 |
dmsimard | also, an issue for another dot release but sql migrations (or lack thereof) might be an issue | 18:55 |
dmsimard | as in different versions of databases in logs (for whatever reason) | 18:56 |
apollo13 | dmsimard: well if you don't know the schema of your tables stuff will break *gg* | 19:25 |
apollo13 | dmsimard: yeah you should be able to check if the request method is GET in the wsgi application and otherwise return 403 immediatelly :) | 19:25 |
*** harlowja has joined #ara | 19:40 | |
*** etienne has quit IRC | 20:32 | |
*** etienne has joined #ara | 20:32 | |
*** dbpiv has quit IRC | 20:53 | |
*** dbpiv has joined #ara | 20:54 | |
*** zbr|ruck has quit IRC | 21:13 | |
*** zbr has joined #ara | 21:30 | |
*** dbpiv has quit IRC | 21:41 | |
openstackgerrit | David Moreau Simard proposed recordsansible/ara master: Add distributed_sqlite db backend and WSGI app https://review.opendev.org/665323 | 22:33 |
openstackgerrit | David Moreau Simard proposed recordsansible/ara master: Add distributed_sqlite db backend and WSGI app https://review.opendev.org/665323 | 22:38 |
*** harlowja has quit IRC | 23:16 |
Generated by irclog2html.py 2.15.3 by Marius Gedminas - find it at mg.pov.lt!