Friday, 2019-06-14

*** etienne has quit IRC01:06
*** cyberpear has quit IRC03:08
*** cyberpear has joined #ara03:09
*** mugsie has quit IRC03:22
*** cyberpear has quit IRC03:22
*** mugsie has joined #ara03:37
*** cyberpear has joined #ara03:38
*** irclogbot_1 has quit IRC03:41
*** irclogbot_3 has joined #ara03:41
*** vincent-- has joined #ara06:51
*** vincent--- has quit IRC06:54
apollo13dmsimard: how did it go? :)06:59
openstackgerritFlorian Apolloner proposed recordsansible/ara master: POC for mass hosting.  https://review.opendev.org/66532308:00
*** zbr|ooo is now known as zbr|ruck08:01
apollo13dmsimard: seems to work ^ :)08:15
dmsimardapollo13 : I had gotten the wsgi part to work but couldn't seem to get the thread local thing working11:46
apollo13well mine is relatively untested11:46
apollo13but it tried to pick up a database11:47
dmsimardI'll review after sending kids to school11:47
apollo13so if you put a few databases into /tmp and then try http://localhost…/tmp/path1/ara-report/api11:47
apollo13it should work *tm*11:47
*** herald85 has joined #ara12:51
dmsimardapollo13: added comments but it's mostly bikeshedding, trying now13:29
dmsimardso this works: http://127.0.0.1:8000/home/dmsimard/.ara/server/ara-report/api/v1/13:37
dmsimardbut it expects the database in /home/dmsimard/.ara/server instead of inside /home/dmsimard/.ara/server/ara-report13:38
dmsimardfor example:13:39
dmsimard2019-06-14 13:36:51,389 INFO root: db_file does not exist: /home/dmsimard/.ara/ansible.sqlite13:39
dmsimard[14/Jun/2019 13:36:51] "GET /home/dmsimard/.ara/ara-report/api/v1/playbooks HTTP/1.1" 404 7713:39
dmsimard(Added some logging to debug)13:39
dmsimardotherwise it works and it's less dirty than we initially thought it would be13:40
dmsimard++13:40
apollo13well just add ara-report to the path13:40
apollo13in my code where I + ansible.sqlite, just do 'ara-report/ansible.sqlite' instead13:41
dmsimardyeah, I realize that -- just pointing it out :p13:41
apollo13and not ugly is relative :)13:41
apollo13hehe, feel free to fix it was a POC so you had something to work on :)13:41
dmsimardsure13:42
apollo13I'll try to answer your comments13:42
apollo13dmsimard: there might still be some dragons hidden somewhere and we maybe want a root path to start from somewhere13:48
dmsimardyeah, there are some security considerations13:48
apollo13right :)13:48
dmsimardapollo13: I had not noticed this sorcery: db_file = Path(fs_path) / "ansible.sqlite"14:22
apollo13dmsimard: no sorcery, just pathlib :)14:22
dmsimardI'm more of an os.path.join guy14:22
dmsimarddidn't know about pathlib14:23
apollo13yeah it's py3 only I think14:23
dmsimardalso, this is what I was missing yesterday: from ara.server.db_backend.base import local_storage14:28
dmsimardI was trying to use current_thread or something14:28
apollo13ah yes, that will get annoying14:39
*** herald85 has quit IRC14:58
*** vincent--- has joined #ara15:06
*** vincent-- has quit IRC15:08
*** dbpiv has quit IRC17:27
*** dbpiv has joined #ara17:30
*** dbpiv has joined #ara17:32
*** vincent--- has quit IRC18:16
*** etienne has joined #ara18:47
dmsimardapollo13: we should probably not allow write ops through that middleware18:53
dmsimardaka, read only ?18:53
dmsimardboth at the API level and at the database level18:53
dmsimards/middleware/backend/18:54
dmsimardalso, an issue for another dot release but sql migrations (or lack thereof) might be an issue18:55
dmsimardas in different versions of databases in logs (for whatever reason)18:56
apollo13dmsimard: well if you don't know the schema of your tables stuff will break *gg*19:25
apollo13dmsimard: 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 #ara19:40
*** etienne has quit IRC20:32
*** etienne has joined #ara20:32
*** dbpiv has quit IRC20:53
*** dbpiv has joined #ara20:54
*** zbr|ruck has quit IRC21:13
*** zbr has joined #ara21:30
*** dbpiv has quit IRC21:41
openstackgerritDavid Moreau Simard proposed recordsansible/ara master: Add distributed_sqlite db backend and WSGI app  https://review.opendev.org/66532322:33
openstackgerritDavid Moreau Simard proposed recordsansible/ara master: Add distributed_sqlite db backend and WSGI app  https://review.opendev.org/66532322:38
*** harlowja has quit IRC23:16

Generated by irclog2html.py 2.15.3 by Marius Gedminas - find it at mg.pov.lt!