Thursday, 2018-07-26

*** tbielawa|mtg is now known as tbielawa|g0n301:35
*** jparrill has quit IRC01:56
*** jparrill has joined #ara01:57
*** dougbtv has quit IRC02:26
*** dougbtv has joined #ara02:30
*** dougbtv has quit IRC02:39
*** openstack has joined #ara02:48
*** ChanServ sets mode: +o openstack02:48
*** bcoca has quit IRC03:32
*** sshnaidm|afk is now known as sshnaidm08: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: 'SELECT09:29
ara-slackdata.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-slackin 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|afk10:13
*** gvincent_ has joined #ara11:09
*** gvincent has quit IRC11:12
*** gvincent_ has quit IRC11:15
*** DrWaluigi has quit IRC11:30
*** gnupyx has joined #ara12:39
*** bcoca has joined #ara12:45
*** bcoca has joined #ara12:45
*** bcoca has quit IRC12:47
*** bcoca has joined #ara12:47
*** bcoca has joined #ara12:47
*** sshnaidm|afk is now known as sshnaidm12:48
*** tbielawa has joined #ara13:24
*** dougbtv has joined #ara14:03
*** myoung has quit IRC14:07
*** weshay_PTO has quit IRC14:07
*** weshay has joined #ara14: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 #ara14:12
*** themurph has joined #ara14:26
*** tbielawa is now known as tbielawa|mtg14:28
ara-slack<dieter.hubau> I fixed the problem btw14:40
ara-slack<dieter.hubau> It seems to be a problem with the following combination: NGINX + Postgres + SSL connection14: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, apparently14: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=ara14:43
ara-slackEnvironment=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 script14: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 script14:44
*** tbielawa|mtg is now known as tbielawa|briefs14: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-ara15: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 heh15:30
dmsimardbcoca: doing a bit of tower right now so maybe your wish will be granted15:43
ara-slack<dieter.hubau> well, I didnt like the ara_override stuff15:46
ara-slack<dieter.hubau> you should do that in the group_vars for example15:46
ara-slack<dieter.hubau> in a simple vars.yml15:46
ara-slack<dieter.hubau> you can easily install and run everything on python3 without the virtual env stuff15:46
ara-slack<dieter.hubau> i could make some issues in github with more explanation and possibly contribute here and there15:47
*** tbielawa|briefs is now known as tbielawa15:47
dmsimardgroup_vars in a role is tricky since groups are defined in inventories at the playbook level15:48
dmsimardI'm not sure I'm convinced about ara_override either15: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_vars15: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 there15:51
ara-slack<dieter.hubau> we have a separate Ara instance for running the webapp15:51
dmsimardThere is another great role for ARA here with a different approach: https://github.com/robertdebock/ansible-role-ara15: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
dmsimardThe 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 different15:56
dmsimardoh, with different database backends too, that's an integration testing gap right now.15:56
*** myoung is now known as myoung|lunch16:00
*** sshnaidm is now known as sshnaidm|afk16:00
*** andymccr_ has joined #ara16:29
*** andymccr_ has quit IRC16:33
*** andymccr_ has joined #ara16:33
*** andymccr_ has quit IRC16:34
*** andymccr_ has joined #ara16:34
*** andymccr_ has quit IRC16:38
*** andymccr_ has joined #ara16:38
*** tbielawa is now known as tbielawa|brb16:38
*** andymccr_ has quit IRC16:39
*** andymccr_ has joined #ara16:44
*** andymccr_ has quit IRC16:53
*** andymccr_ has joined #ara16:54
*** andymccr_ has quit IRC16:55
*** andymccr_ has joined #ara16:55
*** jlozadad has joined #ara16:56
*** tbielawa|brb is now known as tbielawa17:26
*** tbielawa is now known as tbielawa|mtg17:35
*** myoung|lunch is now known as myoung17:35
*** tbielawa|mtg is now known as tbielawa17:36
*** tbielawa is now known as tbielawa|mtg17:36
*** tbielawa|mtg is now known as tbielawa|lunch18:17
*** tbielawa|lunch is now known as tbielawa19:16
*** tbielawa is now known as tbielawa|mtg19:45
*** tbielawa|mtg is now known as tbielawa19:53
*** gnupyx has quit IRC20:15
*** dougbtv_ has joined #ara21:11
*** dougbtv has quit IRC21:12
*** DrWaluigi has joined #ara21:15
*** DrWaluigi has quit IRC21:17
*** tbielawa is now known as tbielawa|g0n3z021:23
*** themurph has quit IRC21:29
*** bcoca has quit IRC22:07
*** jlozadad has quit IRC23:07
*** jlozadad has joined #ara23:09
*** DrWaluigi has joined #ara23:16

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