*** hughsaunders has quit IRC | 02:23 | |
*** hughsaunders has joined #ara | 02:30 | |
*** openstackgerrit has joined #ara | 04:22 | |
openstackgerrit | David Moreau Simard proposed openstack/ara feature/1.0: WIP: Start using the API in the callback https://review.openstack.org/495568 | 04:22 |
---|---|---|
*** jparrill has joined #ara | 07:01 | |
*** resmo has joined #ara | 07:26 | |
*** openstackgerrit has quit IRC | 10:02 | |
*** vcn[m] has quit IRC | 11:41 | |
*** rattboi has quit IRC | 11:41 | |
*** jrist has quit IRC | 11:41 | |
*** hiroki has quit IRC | 11:41 | |
*** hughsaunders has quit IRC | 11:41 | |
*** berendt has quit IRC | 11:41 | |
*** boxrick has quit IRC | 11:41 | |
*** jparrill has quit IRC | 11:41 | |
*** ChanServ has quit IRC | 11:41 | |
*** dmsimard has quit IRC | 11:41 | |
*** leifmadsen has quit IRC | 11:41 | |
*** BlessJah has quit IRC | 11:41 | |
*** andymccr has quit IRC | 11:41 | |
*** resmo has quit IRC | 11:41 | |
*** evrardjp has quit IRC | 11:41 | |
*** dougbtv has quit IRC | 11:41 | |
*** logan- has quit IRC | 11:41 | |
*** sshnaidm|off has quit IRC | 11:41 | |
*** larsks has quit IRC | 11:41 | |
*** mnaser has quit IRC | 11:41 | |
*** imrg has quit IRC | 11:41 | |
*** twouters has quit IRC | 11:41 | |
*** _dev has quit IRC | 11:41 | |
*** jmccrory has quit IRC | 11:41 | |
*** harlowja has quit IRC | 11:41 | |
*** themurph has quit IRC | 11:41 | |
*** weshay has quit IRC | 11:41 | |
*** njohnston has quit IRC | 11:41 | |
*** cliles has quit IRC | 11:41 | |
*** openstack has joined #ara | 12:57 | |
*** tbielawa has joined #ara | 13:19 | |
*** tbielawa is now known as tbielawa|mtg | 13:56 | |
*** sebiwi has joined #ara | 14:20 | |
sebiwi | hi, I'm having an issue running ARA with Jenkins | 14:20 |
sebiwi | I can't see any data when I log into ARA | 14:20 |
sebiwi | I'm using ara v0.14.0 and ansible 2.3.1 | 14:21 |
dmsimard | sebiwi: hey there | 14:22 |
sebiwi | I'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 service | 14:22 |
sebiwi | I'm kinda lost, could you give me some pointers please ? | 14:23 |
dmsimard | sebiwi: okay, let's start from the beginning -- how are you installing ara ? Are you doing it inside your jobs ? | 14:24 |
sebiwi | No, I installed it on my Jenkins server using pip | 14:25 |
dmsimard | sebiwi: ok, and your jobs are running from your jenkins server ? not on another slave ? | 14:26 |
sebiwi | yes. standalone jenkins server | 14:26 |
sebiwi | no slaves | 14:26 |
dmsimard | sebiwi: okay, your ansible.cfg file -- where is it ? | 14:26 |
*** tbielawa|mtg is now known as tbielawa | 14:27 | |
sebiwi | inside the ansible directory, at the root of the cloned project | 14:28 |
sebiwi | it 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 |
dmsimard | sebiwi: okay, perfect. Now, next step. Your job runs as what user ? jenkins ? | 14:29 |
sebiwi | yes | 14:29 |
sebiwi | ah | 14:29 |
sebiwi | yes? | 14:29 |
dmsimard | ok so you'd have a /var/lib/jenkins/.ara folder most likely, yes ? | 14:29 |
dmsimard | with an ansible.sqlite file in it | 14:30 |
*** resmo has quit IRC | 14:30 | |
sebiwi | no, not really | 14:31 |
dmsimard | sebiwi: is /var/lib/jenkins the home directory for jenkins ? I guess it depends on your distro or how you installed it | 14:31 |
sebiwi | no, it's /home/jenkins | 14:31 |
dmsimard | the default location for the ara database is $HOME/.ara/ansible.sqlite (~/.ara/ansible.sqlite) | 14:31 |
dmsimard | oh, okay, so you'd have /home/jenkins/.ara/ansible.sqlite then | 14:31 |
sebiwi | yes | 14:32 |
sebiwi | ls | 14:32 |
sebiwi | and a logfile | 14:33 |
dmsimard | sebiwi: okay, perfect -- now what user does the systemd unit use ? | 14:33 |
sebiwi | I didn't define one | 14:35 |
sebiwi | should it be Jenkins ? | 14:35 |
dmsimard | sebiwi: yeah, try that. | 14:35 |
sebiwi | should i specify a group as well ? | 14:35 |
dmsimard | sebiwi: sure, you can set jenkins. | 14:35 |
dmsimard | sebiwi: so, the idea is basically that all components (CLI, callback, web application) need to know where the database is located | 14:37 |
sebiwi | I see | 14:37 |
sebiwi | okay, so now I should restart the service and launch the playbook again | 14:37 |
sebiwi | right? | 14:37 |
dmsimard | sebiwi: 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/.ara | 14:37 |
dmsimard | sebiwi: the playbooks are probably already there | 14:37 |
dmsimard | sebiwi: since the database is there, just restart the service | 14:38 |
dmsimard | the web application isn't necessary to save data, the callback knows how to save data to the database directly | 14:38 |
dmsimard | sebiwi: does it work now ? | 14:43 |
sebiwi | I'm battling against it | 14:43 |
sebiwi | so the callback just writes to the database | 14:43 |
dmsimard | yeah, the callback writes to the database -- and then the web application loads data from it. | 14:44 |
dmsimard | so the web application needs to know where the database is (and have access to it) | 14:44 |
dmsimard | for what it's worth, our use case with jobs (such as with jenkins) is to store results per-job and inside the job logs | 14:45 |
dmsimard | it 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 |
dmsimard | for 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 |
sebiwi | I see | 14:48 |
sebiwi | it doesn't seem to work though | 14:49 |
sebiwi | the ara log is empty | 14:49 |
dmsimard | sebiwi: if you do this command, does it display any playbook data ? | 14:51 |
dmsimard | sqlite3 /home/jenkins/.ara/ansible.sqlite "select * from playbooks;" | 14:51 |
dmsimard | (please use pastebin if you need to paste anything) | 14:52 |
sebiwi | there are some things | 14:53 |
sebiwi | https://paste.fedoraproject.org/paste/SOwnuy6dD3EuOLv8ZPhYTA | 14:53 |
dmsimard | Ok 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 |
sebiwi | wow yes that works | 14:56 |
sebiwi | I can see every playbook run since I configured it too, you were right | 14:56 |
sebiwi | it is strange that the logs are empty though | 14:57 |
sebiwi | so my unit file isn't working | 14:57 |
dmsimard | Well if the unit file is wrong, it won't be able to log things :) | 14:57 |
dmsimard | Maybe there would be hints in journalctl | 14:57 |
dmsimard | Like journalctl -u <unit> | 14:58 |
sebiwi | I just realised I can't start the service when I specify that I want to start it as the jenkins user | 14:58 |
sebiwi | I get this: " Aug 25 17:00:08 jenkins-ng.dila systemd[1]: ara.service: main process exited, code=exited, status=217/USER" | 15:00 |
dmsimard | That's it ? Doesn't tell us much :( | 15:01 |
sebiwi | It says starting ara.service before that | 15:01 |
sebiwi | It doesn't fail that way when I don't specify a User on the service namespace of the unit file | 15:01 |
sebiwi | but then it runs as root | 15:02 |
sebiwi | anyway, that's another issue | 15:07 |
sebiwi | thanks a lot for your help :) | 15:07 |
sebiwi | I'll probably write something about ara, after using it for a while | 15:08 |
sebiwi | have a good weekend! | 15:08 |
*** sebiwi has quit IRC | 15:10 | |
*** tbielawa is now known as tbielawa|lunch | 16:02 | |
*** tbielawa|lunch is now known as tbielawa | 17:01 | |
*** tbielawa has quit IRC | 20:49 | |
*** openstackgerrit has joined #ara | 23:47 | |
openstackgerrit | Monty Taylor proposed openstack/ara master: Add environment variable to skip alembic logging https://review.openstack.org/498125 | 23:47 |
openstackgerrit | Monty Taylor proposed openstack/ara master: Add environment variable to configure alembic logging https://review.openstack.org/498125 | 23:54 |
Generated by irclog2html.py 2.15.3 by Marius Gedminas - find it at mg.pov.lt!