Friday, 2017-03-24

*** harlowja has joined #ara01:16
harlowjaso dmsimard neats that this exists01:16
harlowjatrying to integrate it into a bot we have that is going to do the deployments and such (that itself runs ansible)01:16
harlowja*slack bot01:17
harlowjaand ara will provide a nice UI for all of that imho01:17
*** themurph has quit IRC01:25
dmsimardharlowja: sexy01:27
harlowjaya, this is a missing piece, so thx :-P01:27
harlowjawill this just replace what i'd assume is in ansible tower eventually01:28
harlowjapretty sure tower has similar(?) code01:28
dmsimardharlowja: there's no real API for ARA, I definitely want to better split the components into clear server/client/api to allow people to further integrate with it01:28
harlowjafair nuff01:29
dmsimardTower has it's own way of recording things, I didn't look at how they do it01:29
dmsimardI saw a demo of Tower once in my life01:29
dmsimardAnd I wasn't paying attention01:29
dmsimardSo any similarities is mostly a coincidence :)01:29
*** themurph has joined #ara01:31
dmsimardSomething I really wanna do and I haven't figured out yet how, mostly because I suck at logstash01:31
dmsimardIs to send ARA data to it01:32
harlowjaya, seems nice01:32
dmsimardLike, cliff CLI to json, dump that into logstash pre-indexed01:32
dmsimardIt's good that you're here01:33
dmsimardCause ara should probably be using (at least) oslo.log and oslo.db :p01:34
harlowjameh, up to u01:35
dmsimardPart of the challenge is that ARA uses the same (in fact outright imports) Ansible's config mechanism01:37
dmsimardSo oslo.config is a no go01:37
dmsimardUnless there'd be a driver or something, not super familiar with oslo internals01:38
harlowjanah, i'd recommend to just stick with what u got01:39
harlowjasimilar with oslo.db01:47
harlowjanot sure it'd buy u that much01:47
dmsimardWell, I have to fix logging in general, that's for sure. It has been very neglected.01:56
harlowjadmsimard something i just hit https://gist.github.com/harlowja/50e076a72993d50d18b047de039fb4cd01:59
harlowjathough, i guess i'll fix that, just weird that pbr is blowing up there01:59
*** openstackgerrit has joined #ara02:05
openstackgerritJoshua Harlow proposed openstack/ara master: If overriden PBR version isn't PBR compliant just ignore it  https://review.openstack.org/44939602:05
dmsimardHuh, never seen that before02:05
harlowjaya, pbr is to strict, lol02:05
dmsimardpbr is black magic to me02:06
harlowjaya, to much so imho, though i mean i get it02:06
harlowjajust it's to strict for itself :-P02:06
harlowjalike it has an ability to override that version02:06
harlowjabut then u get stuff like this, where we overrode it, then it pukes (because we used its capability to override the version)02:07
*** larsks has quit IRC02:18
dmsimardharlowja: patch lgtm but how do you reproduce that particular issue ?02:18
harlowjado some like export PBR_VERSION=1.4.4.4.j2 should work i think02:20
harlowja*something like02:20
*** larsks has joined #ara02:20
harlowjahttps://gist.github.com/harlowja/4a87b6662d2e58dac40b43a558c2431502:25
dmsimard¯\_(ツ)_/¯02:35
openstackgerritMerged openstack/ara master: If overriden PBR version isn't PBR compliant just ignore it  https://review.openstack.org/44939602:41
*** cliles has quit IRC04:01
*** karimb has joined #ara06:50
*** karimb has quit IRC06:51
*** jrist has quit IRC09:34
*** jrist has joined #ara13:22
openstackgerritMerged openstack/ansible-role-ara master: Remove weird non-ascii quote character  https://review.openstack.org/44864814:20
dmsimardleifmadsen: just looked at your dockerfile review again14:21
dmsimardleifmadsen: do I remember properly that you said there'd be a readme ?14:21
leifmadsendmsimard: there should be?14:22
leifmadsenit was in the directory...14:22
dmsimardleifmadsen: it didn't make it's way to the review14:22
leifmadsenok, I'll double check that14:22
leifmadsenmaybe I forgot to ADD...14:22
leifmadsengit add*14:22
dmsimardmy finger type "git add ." "git commit --amend" ":wq" and "git review" so fast14:23
dmsimardfingers*14:23
dmsimardit's muscle memory by now14:23
openstackgerritLeif Madsen proposed openstack/ara master: Add Dockerfile for building ARA  https://review.openstack.org/44505814:58
leifmadsendmsimard: ^^14:58
leifmadsenyep, forgot the `git add` :)14:58
leifmadsenso I have a question!14:58
dmsimardleifmadsen: me too, you first14:59
leifmadsenI have a jenkins slave that runs oooq and uses ARA for callbacks, and then that generates a sqlite DB. I then have a plugin that copies that data back to the master into a centralized location. So now I have multiple sqlite DBs for each run on each slave (1 per workspace). Is there a way I "merge" those DBs so that I can get a centralized view of all the runs?14:59
dmsimardleifmadsen: not natively ? I mean, you could do like the equivalent of mysqldump with no create table statements and then pipe that to sqlite3 to import data into one database15:01
leifmadsen(I know the real answer is to write this data to a MySQL location, but I don't want to build that infra right now...)15:01
dmsimardthere's probably a way with sqlite3 to dump data to another database with the same schema15:01
leifmadsenlet me look on google15:01
leifmadsenit might even have the answer :)15:01
leifmadsendmsimard: what was your question?15:02
dmsimardleifmadsen: I do have this bookmark, however http://www.tylerlesmann.com/2009/apr/27/copying-databases-across-platforms-sqlalchemy/15:02
dmsimardThat I wanted to try in the context of importing sqlite to mysql15:02
leifmadsenah neato15:03
leifmadsenyea, the other idea I had, and not sure this can work currently, was to effectively "replay" from the logs in a centralized location, so that the DB being written to was the only one15:03
leifmadsenbut don't think that's how ARA works15:04
leifmadsenoh the other real question I guess is... if I have multiple runs, and they write to the same DB, does the web interface provide a "list" of the different runs and their results?15:04
leifmadsenif not, then this is really a moot point :D15:04
dmsimardleifmadsen: asked my question in the Dockerfile review15:05
dmsimardleifmadsen: yeah, of course if you write to the same db, you have all the results in one place15:06
leifmadsen+115:06
leifmadsendmsimard: looking15:06
dmsimardleifmadsen: http://ara-demo.dmsimard.com/reports/index.html15:06
leifmadsenyea, just found the youtube video too15:06
dmsimardis from *one* job from openstack-ansible15:06
leifmadsendmsimard: I see your questions, and those are good points. I'll try and address them.15:07
leifmadsendmsimard: are different runs groups differently?15:11
leifmadsengrouped*15:11
leifmadsenso like... I run jenins_job_1 and jenkins_job_215:11
leifmadsenbut use ARA and write to the same DB file15:11
leifmadsen(for example)15:11
dmsimardleifmadsen: not sure I understand15:12
dmsimardan ansible-playbook execution is an ansible-playbook execution15:13
leifmadsenso you have all these rows in this demo15:13
leifmadsenare each of these one execution of ansible-playbook ?15:13
dmsimardeach of those is a separate playbook run, a separate execution of ansible-playbook15:13
leifmadsengotcha, ok cool15:13
leifmadsenso I run:  ansible-playbook site.yml, and then run it again, I should see 2 rows15:14
dmsimardright15:14
leifmadsen++15:14
dmsimardand if you run ansible-playbook site.yml on another host pointing to the same db, you'll see 3 rows15:14
leifmadsenman I think it might be early lunch day :)15:14
leifmadsenok awesome, so that's what I was hoping, perfect15:14
leifmadsenrun now I don't see that because the runs are remote on the slave, so there is no centralized source of info15:15
leifmadsenthey are all independent of each other, so I hadn't really tried it with a single DB :)15:15
leifmadsen0.12.3 gives me this currently...16:39
leifmadsen/home/stack/quickstart/lib/python2.7/site-packages/ara/cli/generate.py:60: MissingURLGeneratorWarning: Nothing frozen for endpoints reports.ajax_results, reports.ajax_records, file.show_file, reports.ajax_stats, reports.ajax_plays, result.show_result, reports.ajax_files, host.show_host. Did you forget a URL generator?16:39
leifmadsen  freezer.freeze()16:39
leifmadsenguess I'm missing a dep for some reason16:39
leifmadsenoh, or maybe flask changed something of how this is called16:41
leifmadsendmsimard: ^16:44
dmsimardleifmadsen: that means you generated from an empty databasr17:09
dmsimardbrb17:09
leifmadsenhrmmm17:10
leifmadsendmsimard: ah, did the path to the callbacks move?17:20
leifmadsen(that's what it looks like)17:20
dmsimardleifmadsen: not in a long time17:23
leifmadsen:)17:23
dmsimardleifmadsen: since like 5 months ?17:23
leifmadsenprobably used to be like that WAY back in the day :)17:23
leifmadsenyea, so I guess I haven't tested this in a while :D17:23
leifmadsenwell, mostly that our deploy at a partner is probably old at this point, so might have been using ARA 0.10 or something17:24
leifmadsenall good, found it, testing now, but thanks for the tip, that lead me in the right direction17:24
leifmadsenbah... I wonder if my issues are because there is an export ARA_DATABASE in quickstart.sh...17:37
dmsimardleifmadsen: maybe17:37
dmsimardleifmadsen: there's some magic there17:37
dmsimardleifmadsen: because, like, even browbeat gets ara reports for free or something17:38
leifmadsenI think the issue is that I have a mismatch between the path for ARA_DATABASE. I set it, then I think a DB is generated, then... quickstart.sh runs, but there is no DB in the location hard coded there17:38
leifmadsengoing to try and match things up, and see if the DB is generated in the default path...17:39
leifmadsendmsimard: so yea, that was it...18:40
leifmadsenremoved all my exports for ARA and now the callbacks seem to write data to the sqlite db in ~/quickstart/ara.sqlite18:41
leifmadsenhowever... an ara generate html gave me this... :(  https://paste.fedoraproject.org/paste/M-HHXC-2cxwMchTyxwKA~V5M1UNdIGYhyRLivL9gydE=18:41
dmsimardthat's bad yo18:43
dmsimardThis is not a connection string /home/stack/quickstart/ara.sqlite18:43
harlowjadmsimard qq, if we have extra_vars that have secrets in them, will those show up in the ara UI?18:43
dmsimardThis is a connection string: sqlite:////home/stack/quickstart/ara.sqlite18:44
dmsimardharlowja: ara does not store vars/extra-vars or tags (yet)18:44
harlowjak18:44
harlowjaif it does, can we run them through https://github.com/openstack/oslo.utils/blob/master/oslo_utils/strutils.py#L316 :)18:44
harlowja*if it ever does18:45
dmsimardharlowja: if you have tasks that would expose them (i.e in results' stdout), I suggest you use no_log: yes18:45
harlowjak18:45
dmsimardharlowja: ansible's no_log: yes is basically that18:45
harlowjahmmm, though i still want a log :-P18:45
dmsimardharlowja: http://docs.ansible.com/ansible/faq.html#how-do-i-keep-secret-data-in-my-playbook18:45
harlowjahmmm, k18:46
harlowjawill have to try that18:46
dmsimardharlowja: I'm not sure what the result ends up being18:46
dmsimardharlowja: but yeah, secrets are already mentioned in the feature request https://storyboard.openstack.org/#!/story/200074718:47
harlowjakk18:47
dmsimardharlowja: there's also an "ara_no_log" directive that will maybe exist one day: https://storyboard.openstack.org/#!/story/200084018:47
dmsimardwhich wouldn't be recorded by ara at all18:47
harlowjaya, i like what jenkins does with ansible18:48
harlowjaexcept for the jenkins part18:48
dmsimardleifmadsen: see my reply ?18:48
harlowjalol18:48
dmsimardharlowja: what does jenkins do ?18:48
leifmadsendmsimard: oh sorry, I didn't, reading scrollback18:48
leifmadsendmsimard: /me facepalms18:48
leifmadsenyou're right18:48
dmsimardharlowja: my usage of jenkins with ansible is just a shell builder18:48
leifmadsenlayer 8 ftl18:48
dmsimardharlowja: so nothing smart18:48
harlowjahttps://gist.githubusercontent.com/harlowja/be7247c4c380490cb470309a73fad1e8/raw/6946b391baa3d3c84cb12821c63bd49c8b274e44/gistfile1.txt18:48
harlowjathat for example is running the script to deploy the control bot that i am making18:49
dmsimardharlowja: interesting18:49
dmsimardif you're using jenkins, there's this junit export thing too18:49
harlowjawell i want to use ara and just python instead of jenkins for that18:49
harlowja*via the bot18:50
dmsimardthat works too18:50
harlowjabut still retain the extra vars (even if they turn into '****' for certain ones)18:50
dmsimardIn the context of ara, if it's implemented it'd probably be an all-or-nothing deal18:51
dmsimardshow the var values or don't show them18:51
harlowjawell i'd assume u'd be able to pass it through at least https://github.com/openstack/oslo.utils/blob/master/oslo_utils/strutils.py#L24818:51
harlowjaright?18:51
dmsimards/don't show them/don't record them/18:51
harlowjaya, i guess the other thing is ansible vault for these vault18:52
dmsimardharlowja: I'd debate recording anything at all, recording obfuscated things in the first place is a bit pointless -- and recording them in clear and obfuscating only the output is worse18:53
harlowjafair18:53
leifmadsendmsimard: so close!18:53
leifmadsenI feel like such a rookie...18:53
leifmadsendatabase doesn't appear to be empty now, but still getting a freezer.freeze() error18:53
dmsimardleifmadsen: what is it ? ajax_records ?18:53
leifmadsenyea18:54
leifmadsen/home/stack/quickstart/lib/python2.7/site-packages/ara/cli/generate.py:60: MissingURLGeneratorWarning: Nothing frozen for endpoints reports.ajax_records. Did you forget a URL generator?18:54
dmsimardleifmadsen: https://review.openstack.org/#/c/447553/18:54
dmsimardleifmadsen: it's a warning, not an error -- your thing got generated properly18:54
leifmadsenoic18:54
leifmadsenlooking18:54
leifmadsenah nice18:54
dmsimardthe warning is going away by default in 0.12.418:54
leifmadsenI looked in the ONE directory that had nothing diff :)18:54
leifmadsen++18:55
leifmadsenthanks!18:55
dmsimardI'll probably cut 0.12.4 next week, some fixes in there18:56
leifmadsen+119:07
leifmadsenrock on, thanks!19:07
leifmadsenthings seem to be working now19:07
dmsimardleifmadsen: it's awesome when things work19:08
leifmadsenhell yea19:09
leifmadsenI've now exposed the generated logs for our jenkins slave runs19:09
leifmadsenmuch nice :)19:09
dmsimardmagic19:09
leifmadsenhttp://i.imgur.com/iZcUNxH.gif19:10
dmsimardhttps://media.giphy.com/media/26ufdipQqU2lhNA4g/giphy.gif19:11
leifmadsenhttp://i.imgur.com/VvpBTG9.jpg19:11
dmsimardwe must go deeper19:13
dmsimardhttp://i.imgur.com/p0DkDRG.jpg19:14
leifmadsenI feel like this is the nerdy version of a guitar battle19:15
dmsimardnah, that happens on /r/HighQualityGifs/19:16
leifmadsen:)19:17
*** tbielawa has joined #ara19:19
tbielawadmsimard: stickersstickersstickersstickersstickersstickersstickers19:34
dmsimardtbielawa: stickersstickersietksicekriasdhjlakjhgfdsg19:36
tbielawalksjfd;lkasjd;flkjsdf yeah!19:40
*** dougbtv|laptop has joined #ara20:01
*** russellb has joined #ara20:01
*** dougbtv|laptop has quit IRC20:35
openstackgerritDavid Moreau Simard proposed openstack/ara master: Test ansible-2.3.0.0-0.1.rc1  https://review.openstack.org/44981320:50
openstackgerritDavid Moreau Simard proposed openstack/ara master: Test ansible-2.2.2.0-0.2.rc2  https://review.openstack.org/44981520:51
openstackgerritDavid Moreau Simard proposed openstack/ara master: Test ansible-2.1.5.0-0.2.rc2  https://review.openstack.org/44981620:52
*** tbielawa is now known as tbielawa|weekend20:55
dmsimardharlowja: what I told you about no_log earlier21:40
dmsimardthat was a lie21:40
harlowjalol21:40
dmsimardI just learned that no_log places the burden on the callback to scrap the data21:40
dmsimardnot the modules21:40
harlowjainteresting21:40
dmsimardso the modules send the whole thing to the callbacks and they're the ones that have to "respect" no_log21:40
dmsimardharlowja: i.e, https://github.com/ansible/ansible/blob/9a05113daf4ab90b43c5570ef69b43e42ecd0ecd/lib/ansible/plugins/callback/__init__.py#L76-L7821:41
harlowjawouldn't have expected that, but TIL21:41
dmsimardharlowja: yeah so ARA just slurps everything21:42
dmsimardI noticed because there was this one task (os_auth) that's pretty darn verbose and tells you all about tokens, endpoints and everything21:42
harlowjaright right21:42
dmsimardhad no_log on it21:42
dmsimardnope21:42
harlowjaweirds21:42
harlowjathe more u know, the less u want to21:42
harlowjalol21:42
dmsimardso I'll go and be a good little white hat21:43
dmsimardand patch that in21:43
harlowja:-P21:43
* dmsimard sighs21:43
harlowjaat least patch in https://github.com/openstack/oslo.utils/blob/master/oslo_utils/strutils.py#L248 ?21:43
dmsimardharlowja: ara has access to that method I linked21:44
dmsimardit just doesn't use it, it dumped the raw data21:45
openstackgerritDavid Moreau Simard proposed openstack/ara master: Use Ansible's CallbackBase._dump_results to dump results  https://review.openstack.org/44982721:51
openstackgerritDavid Moreau Simard proposed openstack/ara master: Use Ansible's CallbackBase._dump_results to dump results  https://review.openstack.org/44982721:55
harlowjadmsimard kk21:56
openstackgerritDavid Moreau Simard proposed openstack/ara master: Use Ansible's CallbackBase._dump_results to dump results  https://review.openstack.org/44982722:19
*** logan- has joined #ara22:31
openstackgerritDavid Moreau Simard proposed openstack/ara master: Use Ansible's CallbackBase._dump_results to dump results  https://review.openstack.org/44982722:34

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