Wednesday, 2019-01-16

*** etienne has quit IRC00:14
*** harlowja has joined #ara00:23
dmsimardoh, right, some people put *spaces* in their file or directory names02:07
openstackgerritDavid Moreau Simard proposed openstack/ara-server master: Fixed config code example if the path has spaces.  https://review.openstack.org/63103002:09
openstackgerritMerged openstack/ara-server master: Fixed default configuration loading and do not write default config if a config is specified.  https://review.openstack.org/63102902:13
dmsimardoh, sweet.02:24
dmsimardThe new integration tests save the database as an artifact of the jobs02:25
dmsimardso I just used one to update the demo server \o/02:25
dmsimardapollo13: I guess we're a bit redundant: https://i.imgur.com/HEAt8pb.png I'll fix that02:34
openstackgerritMerged openstack/ara-web master: Move playbook details page in a dedicated page  https://review.openstack.org/62845102:53
openstackgerritDavid Moreau Simard proposed openstack/ara-web master: Do not merge: test playbook info  https://review.openstack.org/63113004:00
*** sshnaidm has quit IRC04:52
*** sshnaidm has joined #ara04:55
ara-slackvandanakec: @vandanakec has joined the channel06:56
ara-slackkelian.saintbonnet: @dmsimard I've finally managed to get ARA working with AWX, thank you for your help08:06
ara-slackkelian.saintbonnet: I will redo my steps with a fresh install of AWX to have a full view of what must be done08:08
ara-slackkelian.saintbonnet: And it may help you to write your documentation08:10
*** themroc has joined #ara08:23
*** herald85 has joined #ara09:36
*** sshnaidm is now known as sshnaidm|afk10:28
ara-slackkelian.saintbonnet: @dmsimard In fact you don't need to create a custom virtualenv11:01
ara-slackkelian.saintbonnet: I've just installed ARA in the awx_task container but not in a virtualenv11:02
ara-slackkelian.saintbonnet: Changed the ansible.cfg file according to the plugins path11:02
ara-slackkelian.saintbonnet: Added the path to callback plugin in AWX UI11:02
ara-slackkelian.saintbonnet: And, this is important because it doesn't work without that, I need to remove the HOME extra environment variable from AWX UI11:03
apollo13awx seems to do something fishy12:35
*** sshnaidm|afk is now known as sshnaidm12:41
dmsimardapollo13: it mixes rpm installs with virtualenvs :(12:42
dmsimardhttps://github.com/ansible/awx/issues/1737#issuecomment-44245451912:42
openstackgerritFlorian Apolloner proposed openstack/ara-server master: Renamed most of config to settings and dropped the default_ prefix.  https://review.openstack.org/63103412:44
apollo13dmsimard: I think I fixed the merge issues, lets see what zuul says12:44
ara-slackdmsimard: @kelian.saintbonnet it's not recommended to install things outside the virtualenv since it can conflict with python dependencies otherwise installed through distribution packages12:46
ara-slackdmsimard: That's why getting ara to work in the default virtualenv would be nice12:46
openstackgerritMerged openstack/ara-server master: Fixed config code example if the path has spaces.  https://review.openstack.org/63103012:47
ara-slackdmsimard:  But the default virtualenv inherits from system site packages and Ansible comes from rpm, not from pip12:47
ara-slackdmsimard: Anyway, this is all documented in that AWX issue I linked12:48
openstackgerritFlorian Apolloner proposed openstack/ara-server master: Renamed most of config to settings and dropped the default_ prefix.  https://review.openstack.org/63103412:56
apollo13zuul hates me12:57
apollo13dmsimard: feel free to review the last one and merge :)12:58
dmsimardapollo13: I'm not fully woken up either12:59
apollo13no rush, that is it for me for the next few hours anyways12:59
apollo13unless I get bored at work12:59
dmsimardapollo13: any minute of your time is highly appreciated :)13:00
dmsimardI'm happy we ironed out the manage.py and secret key things yesterday, that was productive13:01
dmsimardapollo13: web is slowly coming together too: http://logs.openstack.org/30/631130/1/check/ara-web-build-dashboard/43582ec/npm/html/playbooks13:02
dmsimardHmmm, that link doesn't actually work13:02
dmsimardI guess it's http://logs.openstack.org/30/631130/1/check/ara-web-build-dashboard/43582ec/npm/html13:03
apollo13yeah, weirdly enough zuul didn't recheck my last rebase13:03
dmsimardLink ?13:03
apollo13https://review.openstack.org/#/c/631034/ the last patchset here13:03
dmsimardIt's still running13:04
dmsimardSee http://zuul.openstack.org/status13:04
dmsimardAnd filter for "ara"13:04
apollo13how do you find those dashboard links after it's finished?13:06
apollo13ah toggle ci13:09
apollo13there it is13:09
dmsimardYou can also search in builds, projects, etc13:09
apollo13jupp13:09
apollo13anyways, did pass now13:09
apollo13at least the server part of it13:10
dmsimardOk, will take a look after dropping kids at school13:10
*** spiette has quit IRC13:34
*** spiette has joined #ara13:41
ara-slackamurphy: @amurphy has joined the channel13:47
*** Jmainguy has joined #ara14:17
Jmainguycan ansible being run from a centos6 box, connect to a ara server? tried installing ara on the cent6 box and it says I need python 2.714:17
Jmainguywe have 2 main cent6 boxes alot of ansible is run from, so i wanted to capture input from them14:17
Jmainguyby input I mean ansible run output14:18
dmsimardJmainguy: ohai14:29
dmsimardI believe 2.7 is as low as it will go but I forget exactly why14:29
Jmainguywuzza buddy, sounds about right14:30
dmsimardWhat version of Ansible are you using on c6 ?14:30
dmsimardAnsible dropped 2.6 support a while ago already iirc14:30
Jmainguyansible-2.6.7-1.el6.noarch14:30
Jmainguyhttps://docs.ansible.com/ansible/latest/reference_appendices/release_and_maintenance.html14:31
Jmainguygives me an excuse to update our ansible central host to centos7 I guess =)14:32
dmsimardJmainguy: if ansible works on 2.6 maybe ara does ? I would need to test14:32
dmsimardI know that we don't run integration tests with 2.6 anymore for sure14:33
Jmainguyit might, but I am nub and just following the documentation on how to install ara14:33
Jmainguypip doesnt want to install it14:33
Jmainguypip complains it needs 2.7 for ara basically14:33
dmsimardJmainguy: can you pastebin that ?14:33
Jmainguysure standby14:33
Jmainguyhttps://paste.fedoraproject.org/paste/i9e7acQpHHy2ijimWF~nYA14:34
Jmainguyflask sqlalchemy requires 2.714:34
dmsimardHmm, perhaps you can find out what is the latest release that supports 2.6 and see if it breaks anything14:35
dmsimardNo guarantee though :(14:35
Jmainguyack, one more nub question14:36
Jmainguyto setup a remote ara server, and send stuff to it14:36
Jmainguyis that the host,port settings in ansible.cfg14:36
Jmainguyor is there more settings then that to connect to a remote ara module (with callbacks configured ofc)14:36
dmsimardSo in ara 0.x, everything is bundled together and the callback talks directly to the database -- sqlite by default but this can be mysql/postgre/etc14:37
Jmainguygotcha, so for seperating ti out, I should use mysql, and config database in ansible.cfg14:37
dmsimardIn the upcoming 1.0, we're introducing an API in between14:38
Jmainguynice14:38
dmsimardWhat this means is that you can have callbacks send their data to a remote API if need be14:38
Jmainguyyeah thats ideal14:38
JmainguyI can do the database trick until then14:38
dmsimardBut we still default to everything local without requiring an API server to be up14:39
dmsimardThis is what the API looks like: https://api.demo.recordsansible.org/api/v1/14:39
Jmainguynice14:39
dmsimardAnd the new WIP web UI reads from that API: https://web.demo.recordsansible.org/14:40
*** ssbarnea|rover has quit IRC14:40
dmsimardThe architecture is very different, almost everything has been rewritten from scratch14:40
dmsimardI mention this because the new back end will be py3 only (no official centos support until 8)14:41
*** ssbarnea|rover has joined #ara14:41
Jmainguynice, that should be fine14:41
JmainguyI plan on running it in a container on kube, just need to be able to connect to it with ansible from laptops and central server14:42
dmsimardHowever, I'd like to have a simple callback that is py2 compatible14:42
JmainguyI like running ansible from laptop, others on team use a server to do it, I wanna record all our runs regardless of where we run it from14:42
Jmainguyso if the callback plugin supports python2 that would be ideal14:43
Jmainguyor the ability to support python2 as an option14:43
dmsimardyes14:43
dmsimardwhether we like it or not, py2 is going to be around for a while14:44
Jmainguyyup =)14:44
Jmainguywe were so excited when centos5 finally actually died, so we didnt have to do python 2.4 anymore14:44
dmsimardJmainguy: setting up 0.x should hopefully be straightforward -- the web ui, the callback and the CLI all rely on having access to the database14:46
dmsimardso as long as everything is set up to point to the right place it should work fine14:47
Jmainguysweet, ty ty, I will give that a shot14:47
dmsimardapollo13: I'm looking at the integration tests and I was wondering if an ara_api ansible module would be helpful even if just to test our things, pseudocode: https://gist.github.com/dmsimard/318682878b90041b4b0e47a11c67aa0015:15
apollo13good idea imo15:15
*** etienne has joined #ara15:16
dmsimardalso, another thing that I need to look into15:16
dmsimardis that there are callback errors during the integration tests but they aren't fatal to the actual playbook so they don't fail the task that runs the playbook15:17
openstackgerritMerged openstack/ara-server master: Renamed most of config to settings and dropped the default_ prefix.  https://review.openstack.org/63103415:17
dmsimardI feel like it would be hacky to register the output of the task and then grep for like http 400 or whatever15:17
openstackgerritGuillaume Vincent proposed openstack/ara-web master: Add tasks plays and records number in Playbook summary  https://review.openstack.org/63124815:22
openstackgerritMerged openstack/ara-web master: Add tasks plays and records number in Playbook summary  https://review.openstack.org/63124815:56
Jmainguygot mysqldb running on kube, got my ansible output to go to it15:59
Jmainguyran webserver on lappy, first click on reports shows my run, if I reload, or try and click on that run, webserver crashes15:59
Jmainguyjust running the devleopment flask one15:59
Jmainguyhttps://paste.fedoraproject.org/paste/rq0Fplupzj4M3uoQ9rdIgw15:59
Jmainguyall subsequent loads of http://127.0.0.1:9191/ show error 50016:01
dmsimardJmainguy: ouch, not sure what is going on there16:03
dmsimardis the playbook large by any means ?16:03
dmsimardTwo things to look at is that there's been reports of the UI taking more memory than it should and when using mysql, need to ensure a reasonable max_connections16:05
Jmainguynah small play, the data seems fine in mysql db, prolly somethign wrong with my mysql setup16:05
dmsimardexport ARA_LOG_LEVEL=DEBUG might have a bit more info16:06
dmsimard(from where the webapp is running)16:06
dmsimardthere might be a delta between what is logged in the foreground and in ~/.ara/ara.log16:07
Jmainguyyeah its something with my mysql, if I run mysql in a container locally it works great, ty sir16:19
Jmainguyfirst time using it, the display is amazing, really nice work. Love all the detail, I can even dive into the tasks and how they were written16:24
Jmainguyreally top notch work16:24
Jmainguyeach of my tasks when run by ansible, show this on the cli, any way to get rid of this?16:26
Jmainguyhttps://paste.fedoraproject.org/paste/GlsdpjVTSQUckReLNAimxA16:26
dmsimardJmainguy: haven't seen that before, would need to look into it16:31
apollo13dmsimard: if I were to write a simple permission framework for 1.0 that only decides between noaccess/readonly/rw and supports basic auth (from a static config) would that something you'd be okay with?16:34
apollo13and no fine grained permissions yet, just api wide16:34
dmsimardapollo13: I think the first step is to support basic authentication in the client so people can use a web server for security16:42
apollo13dmsimard: basic auth comes for free with DRF16:42
apollo13so we can support it at that level16:43
dmsimardNot the python client though16:43
apollo13I know16:43
apollo13well rather free16:43
apollo13requests makes it easy16:43
dmsimardYeah16:43
apollo13but I could do you a PR with the server side stuff so you can configure and test the client accordingly without having to setup a webserver16:43
dmsimardFor the permission model, we probably need to have a wider discussion16:43
apollo13for 1.0 read/write on the whole api should suffice16:44
apollo13I think16:44
apollo13everything more finegrained will be interesting16:44
dmsimardyes, agreed on either read/write or read only16:48
dmsimardI'm not interested in the business of managing multitenancy, hierarchical and endpoint-granular permissions16:50
dmsimardeither you have access or you don't, IMO16:50
apollo13I currently have API_READ_LOGIN_REQUIRED and API_WRITE_LOGIN_REQUIRED as bool16:51
dmsimarddoing otherwise would become complicated very quickly16:51
dmsimardapollo13: oh, that's the DRF built in you mentioned ?16:51
apollo13no that is the setting and permission class I just added16:51
apollo13for lack of better imagination16:51
dmsimardAPI is perhaps a bit redundant16:52
apollo13I mean we can drop read for now and say we can always read16:52
apollo13which would leave us with write_login_required16:52
dmsimardboth are probably okay if people don't want to manage it through a webserver I guess16:52
dmsimardthey would both default to false, yeah ?16:52
apollo13yeah16:53
apollo13that said, api with basic auth for read might be fun for the web interface to implement16:53
apollo13cause after all the client makes those requests directly16:53
apollo13I think in the longrun we'd probably add support for remote_user16:53
dmsimardthe javascript client uses axios which supports basic auth16:53
dmsimardhttps://stackoverflow.com/questions/44072750/how-to-send-basic-auth-with-axios16:53
apollo13yeah sure, but where to get the auth data from?16:54
apollo13actually the user could enter it and the web iface would store it locally, so far so good16:54
dmsimardapollo13: config file https://github.com/openstack/ara-web/blob/master/public/config.json16:54
apollo13ok, I'll drop api_ but leave the two16:54
apollo13sure but those credentials are then __public__16:54
apollo13you might as well have none :D16:54
dmsimardoh, wait16:54
dmsimardare you talking about the auth from the web to the api16:55
dmsimardto just to the web16:55
dmsimardor just to the web*16:55
apollo13well axious runs on the client in the webbrowser16:55
apollo13so yeah I am talking about how the web dashboard authenticates itself to the api if one sets read_login_required to true16:55
dmsimardnot sure16:56
apollo13well the javascript could ask the user for credentials and then put them in localstorage16:56
apollo13either way that is something we can adjust along the way16:57
dmsimardI guess how it would work is that the web UI would have a login screen16:57
dmsimardthe auth is sent to the API server16:57
dmsimardAPI returns a token or something like that16:57
apollo13right, and now you also have to manage tokens and renewals and whatnot16:57
apollo13something for post 1.0 :D16:57
dmsimardyeah...16:58
dmsimardI mean, for the time being16:58
dmsimardwe can leave read_login_required to false and have users implement basic auth on the web ui instead16:58
apollo13yeah16:58
dmsimardleaving the API private or something16:58
apollo13no you cannot leave it private16:58
apollo13because the webbrowser needs to reach it16:58
dmsimardoh, right16:58
apollo13but, if one puts the whole web & api behind a webserver with basic auth and we enable the remoteusermiddleware in django we can handle that…16:59
apollo13will be two PRs16:59
apollo13one for auth as such and the other for external auth16:59
dmsimardsure17:00
dmsimardfeel free to send something, we'll rope in gvincent for input17:01
apollo13as long as he doesn't want to use jwt :D17:01
dmsimardeh, I know zuul has a spec for implementing jwt17:01
dmsimardI know nothing about jwt though17:01
dmsimardhttps://github.com/GetBlimp/django-rest-framework-jwt17:02
dmsimard¯\_(ツ)_/¯17:02
apollo13I know, but still17:03
gvincenttldr? need authentication?17:06
dmsimardgvincent: we were wondering how the web interface might eventually authenticate against the API17:12
dmsimardgvincent: we're not going full blown enterprise RBAC, just basic auth for now17:12
dmsimardapollo13 will submit a proposal we can talk about17:14
dmsimardgvincent: to be clear, this isn't a blocker for 1.017:14
dmsimardbut it's something we need to think about to make things easier later17:15
openstackgerritFlorian Apolloner proposed openstack/ara-server master: Added very basic read/write authentication.  https://review.openstack.org/63128517:36
openstackgerritFlorian Apolloner proposed openstack/ara-server master: Added support for external auth via REMOTE_USER provided by webservers.  https://review.openstack.org/63128717:41
*** themroc has quit IRC17:44
gvincentJWT or basic auth will work17:44
*** herald85 has quit IRC18:14
*** gvincent has quit IRC18:46
*** gvincent has joined #ara19:23
*** pabelanger has joined #ara19:57
pabelangerdmsimard: is there a way to run ara generate html, but just for the last run only or a specific run19:57
dmsimardpabelanger: --playbook19:58
dmsimardpabelanger: ara generate html --playbook <uuid>19:59
dmsimardyou can find uuids with ara playbook list19:59
pabelangerk, testing20:00
dmsimardif you need the currently running playbook uuid during the execution, it can also be done20:00
Jmainguydmsimard: looks like if it loses connection to mysql, it never reconnects20:00
dmsimardpabelanger: note that there's a bug when specifying a playbook id https://storyboard.openstack.org/#!/story/200101320:00
Jmainguydmsimard: does it open one connection when flask starts, and then never again?20:01
dmsimardthis works: ara generate html /tmp/test --playbook 7ccdd306-1414-4d11-aa53-108035cb712b20:01
dmsimardthis doesn't: ara generate html --playbook 7ccdd306-1414-4d11-aa53-108035cb712b /tmp/test20:01
dmsimardJmainguy: this is abstracted heavily by flask and sqlalchemy but ara does expose settings to tweak some of the configuration20:02
dmsimardJmainguy: SQLALCHEMY_POOL_SIZE, SQLALCHEMY_POOL_TIMEOUT and SQLALCHEMY_POOL_RECYCLE20:02
dmsimardhttps://ara.readthedocs.io/en/stable/configuration.html#parameters-and-their-defaults && http://flask-sqlalchemy.pocoo.org/2.3/config/#configuration-keys20:03
Jmainguyty20:03
Jmainguypool-size for a nub like me, is number of connections it maintains in a pool?20:03
pabelangerdmsimard: thanks, I think ara generate html --playbook=08c65c0e-9334-4e53-a718-2190c1474503 /tmp/x123 worked20:03
dmsimardJmainguy: According to https://docs.sqlalchemy.org/en/latest/core/pooling.html#connection-pool-configuration, I think so20:06
Jmainguyu so good to me20:06
pabelangerdmsimard: how do you get the UUID from current execution?20:12
dmsimardpabelanger: something like this: https://gist.github.com/dmsimard/0335667e69539c1dd22a169cbd43e61620:13
dmsimardIt's not pretty but it's what we've got for now20:14
pabelangerk20:14
dmsimardtl;dr, registering an ara_record task provides the playbook_id20:14
pabelangeryah20:15
dmsimardif you use ara_record, you'll need to supply an action_plugins path20:15
dmsimard$ python -m ara.setup.action_plugins20:16
dmsimard/usr/lib/python2.7/site-packages/ara/plugins/actions20:16
dmsimardpabelanger: note that it's an action plugin and it should ideally only ever run once (i.e, not a task that runs on all the hosts)20:16
pabelangerara playbook list | grep playbooks/site.yaml | tail -1 | cut -d' ' -f220:18
pabelangerwriting up job now20:18
dmsimardpabelanger: yeah.. that's about what the integration tests are running today..20:18
dmsimardhttps://github.com/openstack/ara/blob/74557137f8755efe71067a4650597011e40f3c53/run_tests.sh#L14220:19
pabelangercool thanks20:19
pabelangerthis is to finish up nested zuul deployments20:19
pabelangereg20:19
pabelangersf.io zuul, deploying zuul control plane in vexxhost20:20
pabelangerhttps://object-storage-ca-ymq-1.vexxhost.net/v1/a0b4156a37f9453eb4ec7db5422272df/logs/69/69b77a3434320b75bf5d6c711d0c5837023ebe97/post/windmill-config-deploy/c8f0bf2/20:20
dmsimardrock on20:20
*** gvincent has quit IRC20:26
pabelangerokay, testing now20:34
Jmainguydmsimard: to ease your troubled mind, once I removed quota from openshift its running like a dream, so who knows21:10
Jmainguygonna write a bloggy type post tomorrow on how to use laptops and servers to connect to a central ara on openshift. its slick =)21:11
Jmainguywomp, I spoke too soon, it died with No handlers could be found for logger "sqlalchemy.pool.QueuePool" now21:13
ara-slacknj.chandu: @dmsimard I have found the solution to the problem. The tool is just amazing.21:26
ara-slack Do you think it would make sense to add a note that Hosting statically generated reports is not very efficient at a large scale. in this page https://ara.readthedocs.io/en/stable/usage.html?highlight=ara%20generate%20html? If so, please let me know I will raise a PR with the changes.21:26
Jmainguyadded --processes 1 --threaded to runserver and its stableish atm21:26
dmsimardJmainguy: 0.x is still supported from a bugfix standpoint so if we find anything we can fix and release22:27
dmsimardJmainguy: happy to share a bloggy type post, just let me know when it's up :)22:28
dmsimard@nj.chandu Yeah I think we can do that -- I can walk you through the process of sending the patch if you'd like, we're not using pull requests right now22:29
dmsimardthere's doc on contributing here: https://ara.readthedocs.io/en/stable/contributing.html or a tl;dr version I gave a while back https://github.com/openstack/ara/pull/12#issuecomment-43311953922:31
pabelangerdmsimard: yay, it worked: https://object-storage-ca-ymq-1.vexxhost.net/v1/a0b4156a37f9453eb4ec7db5422272df/logs/20/2035ce05811e66986b9f3e1f94990652fafe8ff9/post/windmill-config-deploy/d5faf2f/logs/ara-report/22:59
pabelangerthat is production control plane22:59
dmsimardpabelanger: cool, but that's also 1200+ html files :(23:00
*** apollo13 has quit IRC23:00
pabelangerdmsimard: yah, swift23:00
pabelangerdmsimard: still using sqlite for it, need to get up a dedicated db server, then likely launch ara wsgi app and expose ara.poctrong.xyz23:01
*** apollo13 has joined #ara23:02
pabelangerara.poctron.xyz*23:02
dmsimardpabelanger: I hope that 1.0 will be in a somewhat usable state soon (tm)23:03
dmsimardWe still don't have an "ara-report" implementation but it's on my plate23:03
Jmainguycan confirm, neither domain works for me23:06
Jmainguybut now I know that ATT is intercepting my dns requests despite me specifying dns servers, so theres that23:06
*** etienne has quit IRC23:07
*** sshnaidm is now known as sshnaidm|afk23:43

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