Friday, 2017-08-25

*** hughsaunders has quit IRC02:23
*** hughsaunders has joined #ara02:30
*** openstackgerrit has joined #ara04:22
openstackgerritDavid Moreau Simard proposed openstack/ara feature/1.0: WIP: Start using the API in the callback  https://review.openstack.org/49556804:22
*** jparrill has joined #ara07:01
*** resmo has joined #ara07:26
*** openstackgerrit has quit IRC10:02
*** vcn[m] has quit IRC11:41
*** rattboi has quit IRC11:41
*** jrist has quit IRC11:41
*** hiroki has quit IRC11:41
*** hughsaunders has quit IRC11:41
*** berendt has quit IRC11:41
*** boxrick has quit IRC11:41
*** jparrill has quit IRC11:41
*** ChanServ has quit IRC11:41
*** dmsimard has quit IRC11:41
*** leifmadsen has quit IRC11:41
*** BlessJah has quit IRC11:41
*** andymccr has quit IRC11:41
*** resmo has quit IRC11:41
*** evrardjp has quit IRC11:41
*** dougbtv has quit IRC11:41
*** logan- has quit IRC11:41
*** sshnaidm|off has quit IRC11:41
*** larsks has quit IRC11:41
*** mnaser has quit IRC11:41
*** imrg has quit IRC11:41
*** twouters has quit IRC11:41
*** _dev has quit IRC11:41
*** jmccrory has quit IRC11:41
*** harlowja has quit IRC11:41
*** themurph has quit IRC11:41
*** weshay has quit IRC11:41
*** njohnston has quit IRC11:41
*** cliles has quit IRC11:41
*** openstack has joined #ara12:57
*** tbielawa has joined #ara13:19
*** tbielawa is now known as tbielawa|mtg13:56
*** sebiwi has joined #ara14:20
sebiwihi, I'm having an issue running ARA with Jenkins14:20
sebiwiI can't see any data when I log into ARA14:20
sebiwiI'm using ara v0.14.0 and ansible 2.3.114:21
dmsimardsebiwi: hey there14:22
sebiwiI've added `callback_plugins = /usr/lib/python2.7/site-packages/ara/plugins/callbacks` to my ansible.cfg already, and I have a systemd file which I use in order to launch ara as a service14:22
sebiwiI'm kinda lost, could you give me some pointers please ?14:23
dmsimardsebiwi: okay, let's start from the beginning -- how are you installing ara ? Are you doing it inside your jobs ?14:24
sebiwiNo, I installed it on my Jenkins server using pip14:25
dmsimardsebiwi: ok, and your jobs are running from your jenkins server ? not on another slave ?14:26
sebiwiyes. standalone jenkins server14:26
sebiwino slaves14:26
dmsimardsebiwi: okay, your ansible.cfg file -- where is it ?14:26
*** tbielawa|mtg is now known as tbielawa14:27
sebiwiinside the ansible directory, at the root of the cloned project14:28
sebiwiit is properly detected though, I can see it on the job's output: "Using /var/lib/jenkins/jobs/ansible_command/workspace/ansible/ansible.cfg as config file"14:28
dmsimardsebiwi: okay, perfect. Now, next step. Your job runs as what user ? jenkins ?14:29
sebiwiyes14:29
sebiwiah14:29
sebiwiyes?14:29
dmsimardok so you'd have a /var/lib/jenkins/.ara folder most likely, yes ?14:29
dmsimardwith an ansible.sqlite file in it14:30
*** resmo has quit IRC14:30
sebiwino, not really14:31
dmsimardsebiwi: is /var/lib/jenkins the home directory for jenkins ? I guess it depends on your distro or how you installed it14:31
sebiwino, it's /home/jenkins14:31
dmsimardthe default location for the ara database is $HOME/.ara/ansible.sqlite (~/.ara/ansible.sqlite)14:31
dmsimardoh, okay, so you'd have /home/jenkins/.ara/ansible.sqlite then14:31
sebiwiyes14:32
sebiwils14:32
sebiwiand a logfile14:33
dmsimardsebiwi: okay, perfect -- now what user does the systemd unit use ?14:33
sebiwiI didn't define one14:35
sebiwishould it be Jenkins ?14:35
dmsimardsebiwi: yeah, try that.14:35
sebiwishould i specify a group as well ?14:35
dmsimardsebiwi: sure, you can set jenkins.14:35
dmsimardsebiwi: so, the idea is basically that all components (CLI, callback, web application) need to know where the database is located14:37
sebiwiI see14:37
sebiwiokay, so now I should restart the service and launch the playbook again14:37
sebiwiright?14:37
dmsimardsebiwi: I feel what was happening is that your systemd unit was running as root (default) so it was trying to find a database file at /root/.ara14:37
dmsimardsebiwi: the playbooks are probably already there14:37
dmsimardsebiwi: since the database is there, just restart the service14:38
dmsimardthe web application isn't necessary to save data, the callback knows how to save data to the database directly14:38
dmsimardsebiwi: does it work now ?14:43
sebiwiI'm battling against it14:43
sebiwiso the callback just writes to the database14:43
dmsimardyeah, the callback writes to the database -- and then the web application loads data from it.14:44
dmsimardso the web application needs to know where the database is (and have access to it)14:44
dmsimardfor what it's worth, our use case with jobs (such as with jenkins) is to store results per-job and inside the job logs14:45
dmsimardit requires hosting the job logs behind an actual file server (it doesn't work too well within jenkins artifacts due to content security policies)14:46
dmsimardfor example, this is a statically generated report for just one job http://logs.openstack.org/95/497095/3/check/gate-openstack-ansible-openstack-ansible-ceph-ubuntu-xenial/756ee4a/logs/ara/14:46
sebiwiI see14:48
sebiwiit doesn't seem to work though14:49
sebiwithe ara log is empty14:49
dmsimardsebiwi: if you do this command, does it display any playbook data ?14:51
dmsimardsqlite3 /home/jenkins/.ara/ansible.sqlite "select * from playbooks;"14:51
dmsimard(please use pastebin if you need to paste anything)14:52
sebiwithere are some things14:53
sebiwihttps://paste.fedoraproject.org/paste/SOwnuy6dD3EuOLv8ZPhYTA14:53
dmsimardOk so there's data and it should be available if the webapp has access to the database. So maybe there's something wrong with the systemd unit file. Can you try stopping the service and start the webapp manually as jenkins ?14:55
sebiwiwow yes that works14:56
sebiwiI can see every playbook run since I configured it too, you were right14:56
sebiwiit is strange that the logs are empty though14:57
sebiwiso my unit file isn't working14:57
dmsimardWell if the unit file is wrong, it won't be able to log things :)14:57
dmsimardMaybe there would be hints in journalctl14:57
dmsimardLike journalctl -u <unit>14:58
sebiwiI just realised I can't start the service when I specify that I want to start it as the jenkins user14:58
sebiwiI get this: " Aug 25 17:00:08 jenkins-ng.dila systemd[1]: ara.service: main process exited, code=exited, status=217/USER"15:00
dmsimardThat's it ? Doesn't tell us much :(15:01
sebiwiIt says starting ara.service before that15:01
sebiwiIt doesn't fail that way when I don't specify a User on the service namespace of the unit file15:01
sebiwibut then it runs as root15:02
sebiwianyway, that's another issue15:07
sebiwithanks a lot for your help :)15:07
sebiwiI'll probably write something about ara, after using it for a while15:08
sebiwihave a good weekend!15:08
*** sebiwi has quit IRC15:10
*** tbielawa is now known as tbielawa|lunch16:02
*** tbielawa|lunch is now known as tbielawa17:01
*** tbielawa has quit IRC20:49
*** openstackgerrit has joined #ara23:47
openstackgerritMonty Taylor proposed openstack/ara master: Add environment variable to skip alembic logging  https://review.openstack.org/49812523:47
openstackgerritMonty Taylor proposed openstack/ara master: Add environment variable to configure alembic logging  https://review.openstack.org/49812523:54

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