Tuesday, 2018-10-16

*** openstackgerrit has quit IRC01:35
*** openstackgerrit has joined #ara01:51
openstackgerritDavid Moreau Simard proposed openstack/ara-plugins master: Set the playbook status and infer the resulting status  https://review.openstack.org/61075901:51
openstackgerritDavid Moreau Simard proposed openstack/ara-server master: model: change playbook.completed to playbook.status  https://review.openstack.org/61076001:52
dmsimardapollo13: ^ was thinking of doing the same thing for tasks and plays01:58
dmsimardmostly useful in a webui context, to display the right thing at the right time01:58
*** gvincent has joined #ara06:31
*** spiette has quit IRC07:00
*** spiette has joined #ara07:03
*** sshnaidm|afk has joined #ara09:32
*** sshnaidm|afk is now known as sshnaidm10:03
openstackgerritGuillaume Vincent proposed openstack/ara-server master: Add search by name on playbook endpoint  https://review.openstack.org/61092710:30
*** sshnaidm has quit IRC11:00
*** sshnaidm has joined #ara11:01
dmsimardgvincent: what's the difference between that django filter backend vs https://github.com/openstack/ara-server/blob/master/ara/server/settings.py#L145 ?11:35
gvincentsearch filter is for /api/v1/endpoint?search=<my_search>11:36
gvincentordering is for /api/v1/endpoint??ordering=<field>11:37
gvincentdjango filter is for /api/v1/endpoint?<field>=<my_search>11:37
*** sshnaidm has quit IRC11:38
*** sshnaidm has joined #ara11:38
dmsimardOh, sure. What I meant is that we added django_filters to installed apps but drf docs seem to add it another way11:38
dmsimardhttps://www.django-rest-framework.org/api-guide/filtering/#setting-filter-backends11:38
gvincentdmsimard, in settings the filtering is available for everyendpoint11:39
gvincent> You can also set the filter backends on a per-view11:39
gvincentI can update settings if you prefer11:40
dmsimardI'm not quite awake yet, I'll read about it later11:40
dmsimardapollo13 might have an opinion on https://review.openstack.org/61092711:41
dmsimardgvincent: also btw: https://review.openstack.org/#/q/topic:completed-to-status11:41
dmsimardI even have a WIP patch to implement it for ara-web11:42
dmsimardBut npm crashed my laptop last night11:42
dmsimardIt's probably not the right way though11:43
*** yeled has quit IRC11:44
openstackgerritDavid Moreau Simard proposed openstack/ara-web master: WIP implement playbook status  https://review.openstack.org/61093511:47
dmsimardgvincent: ^ it doesn't work though, I'm not sure how to pass the variable/state around11:48
*** yeled has joined #ara11:49
gvincentdmsimard, setState should never be called in render method11:49
dmsimardgvincent: yeah, I was just trying different things11:49
dmsimardI tried just setting status_metadata without setState and it wouldn't work ?11:49
dmsimardlike logging the return from get_status_metadata worked but trying to use the status_metadata var turned up empty/undef11:50
dmsimardso I thought it had to do with the state11:50
dmsimardI am soooo noob with react haha11:50
dmsimardif you can point me in the right direction I can probably land that11:51
gvincentbecause of { status_metadata } dmsimard11:51
gvincentconst { a } = b;11:51
gvincenta = 111:51
gvincentif b = { a : 1 }11:52
gvincentconst status_metadata = this._get_status_metadata(playbook.status);11:52
gvincentand in this._get_status_metadata(playbook.status) just return dict11:52
gvincentcase '...' :11:52
dmsimardyeah I was returning the dict before but it didn't work so I tried setState11:52
gvincent  return {}11:52
dmsimardI'll try that11:53
gvincentbut you can also create a dict{ running: {}, ...} and do a status[playbook.status] || defaultStatus11:54
dmsimardit works now T_T11:55
dmsimardconst var != const { var }11:55
dmsimard¯\_(ツ)_/¯11:55
gvincentdmsimard, { a } syntax is destructuring syntax11:56
gvincent== dict[a]11:57
openstackgerritDavid Moreau Simard proposed openstack/ara-web master: WIP implement playbook status  https://review.openstack.org/61093511:57
dmsimard^ "fixed" version (for now), I'll come back to it later.. going to send kids to school11:57
gvincentconst var = b[var] == const {var} = b11:57
*** bcoca has joined #ara12:16
dmsimardgvincent: oh ok, I understand the syntax now12:36
*** sshnaidm has quit IRC12:36
*** sshnaidm has joined #ara12:39
openstackgerritDavid Moreau Simard proposed openstack/ara-web master: First iteration of playbook status icons based on playbook.status  https://review.openstack.org/61093513:04
*** sshnaidm is now known as sshnaidm|afk13:05
openstackgerritDavid Moreau Simard proposed openstack/ara-web master: Make the permalink icon for playbooks larger  https://review.openstack.org/61096213:05
*** sshnaidm|afk has quit IRC13:09
*** tbielawa has joined #ara13:21
*** helloweenx has joined #ara13:23
helloweenxhello, can someone please help me out setting up ARA website?13:25
openstackgerritDavid Moreau Simard proposed openstack/ara-server master: Use playbook.updated instead of "now" for calculating duration  https://review.openstack.org/61096813:30
dmsimardhelloweenx: hey, depends what you need help with13:31
dmsimardask away :)13:31
helloweenxoh thanks13:37
helloweenxso i just followed ara documentation and now i am kind of stucked. i have running apache2, if i run ara-wsgi website starts in "test / devel / whatever mode", but when i close this, website shuts down13:39
openstackgerritDavid Moreau Simard proposed openstack/ara-server master: model: change playbook.completed to playbook.status  https://review.openstack.org/61076013:40
helloweenxi guess in the documentation its just example, where everyone can test it, but i am not sure, in which point i should start configuring it my way13:40
openstackgerritDavid Moreau Simard proposed openstack/ara-server master: Change parameters to arguments in hacking/validate  https://review.openstack.org/61097313:41
openstackgerritDavid Moreau Simard proposed openstack/ara-server master: model: change playbook.completed to playbook.status  https://review.openstack.org/61076013:42
dmsimardhelloweenx: maybe the ansible role can help you get started and you can go from there ?13:42
dmsimardhttps://github.com/openstack/ansible-role-ara13:42
dmsimardit provides three different deployment options -- apache with mod_wsgi, nginx as reverse proxy to embedded server and embedded server13:43
dmsimardIf you don't want to use the role, perhaps you can find the answers you're looking for in there13:43
dmsimardThe role is still a work in progress but it works last I know13:43
helloweenxyea thats what i thought when i see your link, thanks ;)13:44
openstackgerritDavid Moreau Simard proposed openstack/ara-server master: Add search by name on playbook endpoint  https://review.openstack.org/61092713:49
*** themurph has joined #ara14:11
openstackgerritDavid Moreau Simard proposed openstack/ara-server master: Add play filtering by playbook id  https://review.openstack.org/61099414:23
openstackgerritDavid Moreau Simard proposed openstack/ara-server master: Add play filtering by uuid  https://review.openstack.org/61099514:23
helloweenxsoo one more stupid question, if i want to run apache wsgi mod, i just run ansible-role-ara/example-playbooks/mod_wsgi.yml, or is there anything else i should do?14:27
dmsimardhelloweenx: that sets up the ARA web application to run with apache mod_wsgi, nothing else14:32
dmsimardhelloweenx: I mean, you still need to run playbooks with the right database14:32
dmsimardand the callback enabled14:32
helloweenxthats actually all what i want14:32
helloweenxbut i get error when i run that .yml14:33
dmsimardwhat's the error ?14:33
helloweenxERROR! the role 'ara' was not found in .. and my path14:33
helloweenxand ERROR! 'systemd' is not a valid attribute for a Play14:34
dmsimardoh, yeah, because the default role path in ansible is relative to the directory where the playbooks are located in14:34
dmsimardI should improve the README.. :p14:35
dmsimardok so where is your role located right now ?14:35
helloweenxyea maybe, its kind a hard for noobs in this area to understand :-D14:35
helloweenxman i have to go, can i get back to you tommorow? end of work time for now ;)14:36
dmsimardsure14:37
dmsimardhelloweenx: I'm on eastern time zone in north america so give me time to wake up if you come early :p14:38
openstackgerritDavid Moreau Simard proposed openstack/ara-server master: Add task filtering by playbook id  https://review.openstack.org/61099914:45
*** Serienmorder has joined #ara14:46
openstackgerritDavid Moreau Simard proposed openstack/ara-server master: Add host filtering by playbook id  https://review.openstack.org/61100215:00
openstackgerritDavid Moreau Simard proposed openstack/ara-server master: Add stats filtering by playbook id  https://review.openstack.org/61100315:00
openstackgerritDavid Moreau Simard proposed openstack/ara-server master: Add result filtering by playbook id  https://review.openstack.org/61100415:00
*** gvincent has quit IRC15:17
openstackgerritDavid Moreau Simard proposed openstack/ara-server master: Add result filtering status  https://review.openstack.org/61101515:29
openstackgerritDavid Moreau Simard proposed openstack/ara-server master: Add result filtering by status  https://review.openstack.org/61101515:29
openstackgerritDavid Moreau Simard proposed openstack/ara-server master: Add stats filtering by host  https://review.openstack.org/61101615:34
*** sshnaidm has joined #ara15:37
openstackgerritDavid Moreau Simard proposed openstack/ara-web master: First iteration of playbook status icons based on playbook.status  https://review.openstack.org/61093515:37
openstackgerritMerged openstack/ara-server master: Change parameters to arguments in hacking/validate  https://review.openstack.org/61097315:46
openstackgerritDavid Moreau Simard proposed openstack/ara-web master: Make the permalink and clock icons for playbooks larger  https://review.openstack.org/61096215:54
*** sshnaidm has quit IRC16:13
*** tbielawa is now known as tbielawa|mtg16:30
*** tbielawa|mtg is now known as tbielawa|lunch17:02
openstackgerritDavid Moreau Simard proposed openstack/ara-server master: Add play filtering by uuid  https://review.openstack.org/61099517:27
openstackgerritDavid Moreau Simard proposed openstack/ara-server master: Add task filtering by playbook id  https://review.openstack.org/61099917:27
openstackgerritDavid Moreau Simard proposed openstack/ara-server master: Add host filtering by playbook id  https://review.openstack.org/61100217:27
openstackgerritDavid Moreau Simard proposed openstack/ara-server master: Add stats filtering by playbook id  https://review.openstack.org/61100317:27
openstackgerritDavid Moreau Simard proposed openstack/ara-server master: Add result filtering by playbook id  https://review.openstack.org/61100417:27
openstackgerritDavid Moreau Simard proposed openstack/ara-server master: Add result filtering by status  https://review.openstack.org/61101517:27
openstackgerritDavid Moreau Simard proposed openstack/ara-server master: Add stats filtering by host  https://review.openstack.org/61101617:27
*** tbielawa|lunch is now known as tbielawa18:31
apollo13oh someone was on a rampage :D18:35
dmsimardapollo13: gvincent showed me how to do filtering and I just patterned off from there18:37
apollo13yeah I am looking at his initial PR and see if we need all of it18:37
dmsimardapollo13: seems simple enough so I went for it, I don't know if you had something else in mind18:45
apollo13dmsimard: seems fine; that said I'd drop filter_backends = (DjangoFilterBackend,) from everywhere and add 'django_filters.rest_framework.DjangoFilterBackend', to the default set…18:45
apollo13in settings.py18:45
apollo13this way we do not have to repeat ourself all the time18:45
*** themurph has quit IRC18:46
dmsimardapollo13: sure, I'll land a patch on top of that tree so we don't need to rebase everything18:46
apollo13wow, you really wrote tests for all that18:48
apollo13is there a way to see a diff for https://review.openstack.org/#/q/status:open+project:openstack/ara-server+branch:master+topic:api-filtering ?18:49
apollo13ie not the individual commits but rather the whole18:49
dmsimardapollo13: only individual commits18:49
apollo13to bad, for changes like this I vastly prefer a normal review like github has :)18:50
dmsimardapollo13: I could've added all the filters to everything in one commit but felt it would be easier to review since they were distinct bits :p18:50
openstackgerritDavid Moreau Simard proposed openstack/ara-server master: Add DjangoFilterBackend to default DRF filter backends  https://review.openstack.org/61112818:51
dmsimard^ like this ?18:52
dmsimardlooked to me like it worked from testing18:52
apollo13jupp18:52
apollo13we might also drop the search filter, it is basically for "search" like you have in the django admin18:53
apollo13not sure if it is really useful18:53
apollo13ordering as default seems to allow ordering by any fields18:53
apollo13which can be rather expensive if we don't have indices in place; so I'd remove that for the global defaults too18:53
apollo13that gerrit instance feels so weirdly different to the gerrit I know from qt18:54
dmsimardwhat's the URL for the qt one ?18:54
apollo13https://codereview.qt-project.org/18:55
apollo13mainly I miss the All Unified diff18:55
dmsimardapollo13: openstack has 2.13 and qt has 2.718:56
dmsimardand they're working on upgrading to 2.1518:56
dmsimardwith the new polygerrit ui18:56
apollo13so things are getting worse? :D18:56
dmsimardI think there are some nice things in polygerrit but I haven't looked at it too much18:56
dmsimardlooks like this: https://review.gerrithub.io/q/status:open18:56
dmsimardIt's notably better at mobile and there is a notion of single page diff somewhere18:57
apollo13left you a few +1 and a few +0 with a comment about relying on implicit result set ordering19:04
apollo13otherwise the changes look good to me19:04
apollo13btw is there a way to let zuul cherry-pick or fast forward merge patches? the current git history looks like some hot mess :D19:09
dmsimardyeah zuul automatically checks if things can merge in their current state or not19:11
dmsimardif zuul realizes it won't be able to merge a patch, it'll let you know19:11
apollo13but why all the merge commits if you look at https://github.com/openstack/ara/commits/master19:12
dmsimardthat's gerrit, not zuul19:12
dmsimardzuul basically clicks the submit button in gerrit19:13
dmsimardand the current "policy" in gerrit is merge if necessary19:13
dmsimards/policy/strategy/19:13
apollo13ah19:13
dmsimardwhen you're looking at commits that are stacked on top of another, you can look in this pane for more info: https://imgur.com/a/LZQyx4e19:14
dmsimardso for example, gvincent's patch for playbook.name is the first patch and that first patch is on top of the current master19:14
dmsimardand then all commits are respectively on top of one another until the one where I move the backend19:14
apollo13yeah, I do get that, just looked through gerrit's merge/rebase options19:15
dmsimardyou can also hover the parent sha119:15
openstackgerritMerged openstack/ara-server master: Add search by name on playbook endpoint  https://review.openstack.org/61092719:16
dmsimardapollo13: what do you think about https://review.openstack.org/#/c/610760/ ? I would tend to do the same thing for play and task (which both have "completed")19:17
dmsimardThe callback implementation is in https://review.openstack.org/#/c/610759/19:17
apollo13I like it19:19
dmsimarda big question that I have19:19
dmsimardand it's a problem even in 0.x19:19
dmsimardmaybe bcoca would have an idea19:20
dmsimardara has no way to tell if a playbook is really still running if it hasn't sent the last hook (playbook_on_stats)19:20
dmsimardi.e, we do not have a way to differentiate a playbook that is in progress vs a playbook that will never end because it's crashed or something19:21
apollo13so the crash problem you cannot fix I guess (if you just "hard" kill all python processes)19:22
dmsimardI don't see a lot of solutions that aren't about timeouts19:22
apollo13what you can do for a sensible running information is probably to update a timestamp on the playbook every time anything in the playbook is updated via the api19:23
dmsimardwe have that19:23
apollo13then you could use that as timeout too yes; but a reboot action could take minutes, so how long do you want to wait…19:23
dmsimardyeah19:23
dmsimardor I've seen command tasks take >1 hour :)19:23
apollo13"<dmsimard> we have that" I see playbook only inherit duration which is start/end19:24
dmsimardmaybe there could be a soft timeout and a hard timeout, regardless, I see those being implemented client side19:24
apollo13ah no, base19:24
apollo13sorry19:24
apollo13hrmpf, something just crashed my irc client19:25
dmsimardlike maybe after 30 minutes of inactivity without completion the playbook would turn into an unknown status and then after 2 hours it displays that it crashed or something19:25
dmsimardbut this would be business logic in the web UI19:26
apollo13jupp19:26
apollo13mhm, how can I base a change on https://review.openstack.org/#/c/611128/ ?19:27
dmsimardapollo13: you check out the patch19:27
dmsimardin the UI you can click download and then copy the checkout line19:27
dmsimardor there's also people that use git-review19:27
apollo13ah there we are19:27
dmsimardgit review -d 611128 ? I think19:28
apollo13Oh right, gotta read the cmd :D19:28
apollo13s/cmd/help/19:28
dmsimardI got into a bit of a rush today to demo 1.0 at an ansible meetup I'm presenting at tomorrow :p19:30
openstackgerritFlorian Apolloner proposed openstack/ara-server master: Removed default search and ordering filters.  https://review.openstack.org/61114119:30
apollo13hehe19:31
openstackgerritFlorian Apolloner proposed openstack/ara-server master: One does not simply send emails to gvincent *scnr*  https://review.openstack.org/61114419:37
dmsimardlol19:37
dmsimardcopy pasta19:37
dmsimardI need to check if there's a way to have tox run all the commands and then return an exit status19:38
apollo13any objections into splitting settings files up in dev, prod & test ?19:38
dmsimardso that, for example, black doesn't prevent isort from running19:38
dmsimardapollo13: need to pick up kids, be back in 15 or so19:38
openstackgerritMerged openstack/ara-server master: model: change playbook.completed to playbook.status  https://review.openstack.org/61076019:41
openstackgerritMerged openstack/ara-plugins master: Set the playbook status and infer the resulting status  https://review.openstack.org/61075919:44
openstackgerritMerged openstack/ara-server master: Add play filtering by playbook id  https://review.openstack.org/61099419:58
*** tbielawa is now known as tbielawa|mtg20:00
*** themurph has joined #ara20:02
dmsimardapollo13: the configuration for the callback and action plugins are taken care of by ansible itself20:03
dmsimardwith magic like https://github.com/openstack/ara-plugins/blob/master/ara/plugins/callback/ara_default.py#L39-L92 and https://github.com/openstack/ara-plugins/blob/master/ara/plugins/callback/ara_default.py#L120-L13420:03
apollo13I literally mean for ara-server20:03
dmsimardyup, I wasn't finished20:03
dmsimardwe need a way to configure ara-server20:05
dmsimardand ara-web as well20:05
dmsimardI guess what I'm trying to convey is that ideally we would not have 3 different places to configure things ?20:05
dmsimardhowever20:06
apollo13well, imo the callback should stay as is; it makes sense for it to be configured like ansible does20:06
dmsimardright, and it will also always have ansible installed because it's meant to run with ansible20:06
dmsimardso it can import etc20:06
dmsimardideally the backend wouldn't depend on ansible though20:07
apollo13jupp20:07
dmsimardWhat do you have in mind ?20:07
apollo13which configuration will ara-web need?20:07
dmsimardNot much, at least the API server it needs to talk to20:07
dmsimardThen perhaps things that are more preferences (default sort order, etc.)20:08
apollo13if at all; I mean ara-server could serve ara-web and then it would "know" where the server is20:08
apollo13what I had in mind was replacing settings.py with a settings/ package and then have dev/prod/test in there20:08
apollo13this way one can get rid of most of the if stuff in there and it is clean wrt usage20:09
dmsimardyeah, we need to expose only what is relevant to the users20:09
apollo13ie the env loading stuff goes into prod.py, dev.py simply has  adefault working set with no options20:09
apollo13and test will disable debug etc…20:09
apollo13I'll throw it up for review when I am done, easier to show than tell… you will see then what you'd like20:10
dmsimardsure20:10
dmsimardapollo13: fwiw ara-web currently defaults it's API server to be 127.0.0.1:8000 (the django dev server)20:11
dmsimardso you can basically do "tox -e runserver" on ara-server and then "npm install; npm start" for ara-web and you're good to go20:12
dmsimardI want to get to a point where we can have static builds of the UI and have the API server be https://demo.getara.org/api/v1/20:13
dmsimardthis allows us to have a built UI in integration job logs20:13
dmsimardZuul does this, for example: http://logs.openstack.org/80/610980/1/check/zuul-build-dashboard/0aeed9e/npm/html/status20:13
dmsimardIs actually hooking up to the http://zuul.openstack.org/status API20:14
dmsimardSo same backend, but the UI in the logs has the patch that was just tested20:14
dmsimardand then I want that demo.getara.org to get updated after every commit to ara-server/ara-plugins/ara-web20:15
dmsimardoh, ara-clients too :p20:16
openstackgerritFlorian Apolloner proposed openstack/ara-server master: Split settings into multiple files (dev/prod/test).  https://review.openstack.org/61116120:25
apollo13hehe, yeah a live deployment somewhere would be nice20:25
apollo13time for bed. good night!20:25
dmsimardapollo13: I'll look at your patch, thanks and good night :)20:26
*** sshnaidm has joined #ara21:01
*** sshnaidm is now known as sshnaidm|off21:01
openstackgerritDavid Moreau Simard proposed openstack/ara-server master: Merge the tox-pep8 and tox-format jobs and use tox-linters  https://review.openstack.org/61116621:04
*** Serienmorder has quit IRC21:16
*** tbielawa|mtg is now known as tbielawa21:40
*** tbielawa is now known as tbielawa|g0n321:46
*** sshnaidm|off has quit IRC21:48
openstackgerritMerged openstack/ara-server master: Add play filtering by uuid  https://review.openstack.org/61099522:46
openstackgerritMerged openstack/ara-server master: Add task filtering by playbook id  https://review.openstack.org/61099922:46
openstackgerritMerged openstack/ara-server master: Add host filtering by playbook id  https://review.openstack.org/61100222:46
openstackgerritMerged openstack/ara-server master: Add stats filtering by playbook id  https://review.openstack.org/61100322:46
openstackgerritMerged openstack/ara-server master: Add result filtering by playbook id  https://review.openstack.org/61100422:46
openstackgerritMerged openstack/ara-server master: Add result filtering by status  https://review.openstack.org/61101522:46
openstackgerritMerged openstack/ara-server master: Add stats filtering by host  https://review.openstack.org/61101622:46
openstackgerritMerged openstack/ara-server master: Add DjangoFilterBackend to default DRF filter backends  https://review.openstack.org/61112823:28
openstackgerritMerged openstack/ara-server master: Removed default search and ordering filters.  https://review.openstack.org/61114123:28

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