*** tbielawa|mtg is now known as tbielawa|g0n3 | 01:35 | |
*** jparrill has quit IRC | 01:56 | |
*** jparrill has joined #ara | 01:57 | |
*** dougbtv has quit IRC | 02:26 | |
*** dougbtv has joined #ara | 02:30 | |
*** dougbtv has quit IRC | 02:39 | |
*** openstack has joined #ara | 02:48 | |
*** ChanServ sets mode: +o openstack | 02:48 | |
*** bcoca has quit IRC | 03:32 | |
*** sshnaidm|afk is now known as sshnaidm | 08:51 | |
ara-slack | <kkorolczuk> Greetings :slightly_smiling_face: I have a problem with ara_record and postgresql. When i run a playbook against a bunch of hosts I get errors like these. That does not happen when i run against a single host or use SQLite fatal: [fqdn.was.here]: FAILED! => {"changed": false, "msg": "Data not recorded in ARA: (psycopg2.DatabaseError) error with status PGRES_TUPLES_OK and no message from the libpq [SQL: 'SELECT | 09:29 |
---|---|---|
ara-slack | data.id AS data_id, data.playbook_id AS data_playbook_id, data.key AS data_key, data.value AS data_value, data.type AS data_type \\nFROM data \\nWHERE data.key = %(key_1)s AND data.playbook_id = %(playbook_id_1)s'] [parameters: {'playbook_id_1': u'b48f8a88-e3af-4769-a2b5-0e83300f7cdd', 'key_1': u'hostname.was.here'}] (Background on this error at: http://sqlalche.me/e/4xp6)"} [WARNING]: Failure using method (v2_runner_on_failed) | 09:29 |
ara-slack | in callback plugin (<ansible.plugins.callback.log_ara.CallbackModule object at 0x7f21aa9ee0d0>): (sqlalchemy.exc.InvalidRequestError) Can't reconnect until invalid transaction is rolled back [SQL: u'SELECT hosts.id AS hosts_id, hosts.playbook_id AS hosts_playbook_id, hosts.name AS hosts_name \nFROM hosts \nWHERE hosts.name = %(name_1)s AND hosts.playbook_id = %(playbook_id_1)s'] [parameters: [{}]] | 09:29 |
*** sshnaidm is now known as sshnaidm|afk | 10:13 | |
*** gvincent_ has joined #ara | 11:09 | |
*** gvincent has quit IRC | 11:12 | |
*** gvincent_ has quit IRC | 11:15 | |
*** DrWaluigi has quit IRC | 11:30 | |
*** gnupyx has joined #ara | 12:39 | |
*** bcoca has joined #ara | 12:45 | |
*** bcoca has joined #ara | 12:45 | |
*** bcoca has quit IRC | 12:47 | |
*** bcoca has joined #ara | 12:47 | |
*** bcoca has joined #ara | 12:47 | |
*** sshnaidm|afk is now known as sshnaidm | 12:48 | |
*** tbielawa has joined #ara | 13:24 | |
*** dougbtv has joined #ara | 14:03 | |
*** myoung has quit IRC | 14:07 | |
*** weshay_PTO has quit IRC | 14:07 | |
*** weshay has joined #ara | 14:08 | |
ara-slack | <dmsimard> @dieter.hubau @kkorolczuk hey sorry guys but I don't know much about postgresql :( | 14:08 |
ara-slack | <dmsimard> @kkorolczuk for ara_record, it's mostly meant to run once on the control node -- do you need to record different values for each host ? | 14:10 |
*** myoung has joined #ara | 14:12 | |
*** themurph has joined #ara | 14:26 | |
*** tbielawa is now known as tbielawa|mtg | 14:28 | |
ara-slack | <dieter.hubau> I fixed the problem btw | 14:40 |
ara-slack | <dieter.hubau> It seems to be a problem with the following combination: NGINX + Postgres + SSL connection | 14:40 |
ara-slack | <dieter.hubau> the cause came from the fact that the Flask application is managed by the Flask Manager script and its spawning child processes to handle requests (using copy on write) | 14:41 |
ara-slack | <dieter.hubau> the SSL connection seems to be copied to the child process as well and instantly fucks it up, apparently | 14:41 |
ara-slack | <dieter.hubau> the trick is to only run on 1 process, which is definitely less performant but is sufficiently fast to host ara (just a webapp with read-only statements and some rendering of information) | 14:42 |
ara-slack | <dieter.hubau> what I did, is change the ara systemd service file in the ara playbook to NOT invoke the `ara_manage` python script, but I invoke the `ara_wsgi` script directly, like this: ``` [Unit] Description=ARA Documentation=https://github.com/openstack/ara After=network.target [Service] Type=simple TimeoutStartSec=0 Restart=on-failure RestartSec=10 RemainAfterExit=yes User=ara Group=ara | 14:43 |
ara-slack | Environment=ANSIBLE_CONFIG=/etc/ara/ara.cfg ExecStart={{ ara_wsgi.stdout }} --host {{ ara_install.config.host }} --port {{ ara_install.config.port }} [Install] WantedBy=multi-user.target ``` | 14:43 |
ara-slack | <dieter.hubau> this runs the Flask application directly instead of passing it to the Flask Manager script | 14:44 |
ara-slack | <dieter.hubau> the better solution would be to tell the WSGI server to use the `lazy-apps` parameter, but I havent figured out how to pass this to the ara_manage script | 14:44 |
*** tbielawa|mtg is now known as tbielawa|briefs | 14:56 | |
ara-slack | <dmsimard> @dieter.hubau what ansible role is that from? :slightly_smiling_face: | 15:01 |
ara-slack | <dieter.hubau> https://github.com/openstack/ansible-role-ara | 15:27 |
ara-slack | <dieter.hubau> the official one :) | 15:27 |
ara-slack | <dieter.hubau> (i changed some other thinfgs there as well, to better fit our way of working, but those are not relevant i think) | 15:27 |
ara-slack | <dmsimard> oh, sweet -- I'm trying to make that role an actual thing. Would be happy to get some feedback and patches :) | 15:28 |
ara-slack | <dmsimard> happy that it sort-of-worked for you heh | 15:30 |
dmsimard | bcoca: doing a bit of tower right now so maybe your wish will be granted | 15:43 |
ara-slack | <dieter.hubau> well, I didnt like the ara_override stuff | 15:46 |
ara-slack | <dieter.hubau> you should do that in the group_vars for example | 15:46 |
ara-slack | <dieter.hubau> in a simple vars.yml | 15:46 |
ara-slack | <dieter.hubau> you can easily install and run everything on python3 without the virtual env stuff | 15:46 |
ara-slack | <dieter.hubau> i could make some issues in github with more explanation and possibly contribute here and there | 15:47 |
*** tbielawa|briefs is now known as tbielawa | 15:47 | |
dmsimard | group_vars in a role is tricky since groups are defined in inventories at the playbook level | 15:48 |
dmsimard | I'm not sure I'm convinced about ara_override either | 15:49 |
ara-slack | <dieter.hubau> exactly, so I would define sensible defaults in the role and make sure you can override them with the group_vars | 15:49 |
ara-slack | <dieter.hubau> I have setup an Ara test instance and a production instance with different group_vars (main difference was the host and database connection string) | 15:50 |
ara-slack | <dieter.hubau> also, were running our Ansible playbooks on a Jenkins, so they are recoding with Ara there | 15:51 |
ara-slack | <dieter.hubau> we have a separate Ara instance for running the webapp | 15:51 |
dmsimard | There is another great role for ARA here with a different approach: https://github.com/robertdebock/ansible-role-ara | 15:52 |
ara-slack | <dmsimard> I've been meaning to collaborate with @robert for a while but I don't have a lot of time for ARA right now :( | 15:53 |
dmsimard | The goal I have for openstack/ansible-role-ara is to be able to deploy it in different configuration scenarios (standalone, with apache, with nginx, with gunicorn, etc) and leverage it for integration testing so it's a bit different | 15:56 |
dmsimard | oh, with different database backends too, that's an integration testing gap right now. | 15:56 |
*** myoung is now known as myoung|lunch | 16:00 | |
*** sshnaidm is now known as sshnaidm|afk | 16:00 | |
*** andymccr_ has joined #ara | 16:29 | |
*** andymccr_ has quit IRC | 16:33 | |
*** andymccr_ has joined #ara | 16:33 | |
*** andymccr_ has quit IRC | 16:34 | |
*** andymccr_ has joined #ara | 16:34 | |
*** andymccr_ has quit IRC | 16:38 | |
*** andymccr_ has joined #ara | 16:38 | |
*** tbielawa is now known as tbielawa|brb | 16:38 | |
*** andymccr_ has quit IRC | 16:39 | |
*** andymccr_ has joined #ara | 16:44 | |
*** andymccr_ has quit IRC | 16:53 | |
*** andymccr_ has joined #ara | 16:54 | |
*** andymccr_ has quit IRC | 16:55 | |
*** andymccr_ has joined #ara | 16:55 | |
*** jlozadad has joined #ara | 16:56 | |
*** tbielawa|brb is now known as tbielawa | 17:26 | |
*** tbielawa is now known as tbielawa|mtg | 17:35 | |
*** myoung|lunch is now known as myoung | 17:35 | |
*** tbielawa|mtg is now known as tbielawa | 17:36 | |
*** tbielawa is now known as tbielawa|mtg | 17:36 | |
*** tbielawa|mtg is now known as tbielawa|lunch | 18:17 | |
*** tbielawa|lunch is now known as tbielawa | 19:16 | |
*** tbielawa is now known as tbielawa|mtg | 19:45 | |
*** tbielawa|mtg is now known as tbielawa | 19:53 | |
*** gnupyx has quit IRC | 20:15 | |
*** dougbtv_ has joined #ara | 21:11 | |
*** dougbtv has quit IRC | 21:12 | |
*** DrWaluigi has joined #ara | 21:15 | |
*** DrWaluigi has quit IRC | 21:17 | |
*** tbielawa is now known as tbielawa|g0n3z0 | 21:23 | |
*** themurph has quit IRC | 21:29 | |
*** bcoca has quit IRC | 22:07 | |
*** jlozadad has quit IRC | 23:07 | |
*** jlozadad has joined #ara | 23:09 | |
*** DrWaluigi has joined #ara | 23:16 |
Generated by irclog2html.py 2.15.3 by Marius Gedminas - find it at mg.pov.lt!