*** pvc has joined #ara | 05:10 | |
pvc | hi | 05:10 |
---|---|---|
pvc | dmsimard | 05:10 |
pvc | anyone | 05:11 |
*** gvincent has joined #ara | 06:13 | |
apollo13 | dmsimard: oh it is back; hard to fix those though | 06:48 |
pvc | hi apollo13 | 07:00 |
apollo13 | hi pvc | 07:00 |
pvc | hi | 07:01 |
pvc | may i know if it possible | 07:01 |
pvc | that i have one ara server for all of my ansible host | 07:01 |
*** apollo13 has quit IRC | 07:52 | |
*** apollo13 has joined #ara | 07:54 | |
*** pvc has quit IRC | 08:29 | |
*** sshnaidm|off is now known as sshnaidm | 08:30 | |
*** pvc has joined #ara | 10:41 | |
pvc | hi | 10:41 |
pvc | can i host an stand alone ara webserver | 10:41 |
pvc | and add a node for that? | 10:42 |
apollo13 | I am not sure what you are asking | 10:58 |
pvc | i have a node for ara web server | 11:06 |
pvc | then i want a case that i can add another node to it | 11:06 |
pvc | so one ara server then 5 ansible hosts | 11:06 |
*** pvc_ has joined #ara | 11:08 | |
*** pvc has quit IRC | 11:11 | |
*** pvc_ has quit IRC | 12:58 | |
*** tbielawa has joined #ara | 13:09 | |
dmsimard | apollo13: he asked the same question last week... http://eavesdrop.openstack.org/irclogs/%23ara/%23ara.2018-09-27.log.html | 14:03 |
*** themurph has joined #ara | 14:07 | |
*** Glandos has joined #ara | 14:16 | |
apollo13 | dmsimard: ah well; btw I am considering to use ara (0.16) at work. Is there any way to abort the run if the callback plugin fails? | 14:19 |
apollo13 | ie we do not want to apply anything without logging it | 14:19 |
dmsimard | apollo13: I don't think so but I invited a core dev to ask him about it :D | 14:28 |
*** bcoca has joined #ara | 14:29 | |
dmsimard | bcoca: apollo13 was asking if there would be a way for callbacks to actually kill the ansible run (for example if the callback fails or detects a failure that should result in the execution being killed) | 14:30 |
bcoca | currently only the stdout callback triggers that, all other callbacks are considered 'optional', but we can add a feature that you can toggle this from configuration (all callback failures are fatal) | 14:31 |
openstackgerrit | Merged openstack/ara-server master: Fixed tox warning. https://review.openstack.org/605443 | 14:31 |
openstackgerrit | Merged openstack/ara-server master: Run black & isort over the codebase. https://review.openstack.org/606615 | 14:32 |
bcoca | and there are 2 diff ones, a) loading a plugin and b) executing a plugin method, in this case a 'event' | 14:32 |
dmsimard | bcoca: sort of related, that reminds me .. does the callback type (other than stdout) actually do something ? cause I have this and it just works I guess https://github.com/openstack/ara-plugins/blob/master/ara/plugins/callback/ara_default.py#L42 | 14:33 |
dmsimard | ¯\_(ツ)_/¯ | 14:33 |
bcoca | not currently, its mostly an indicator, i thought of restricting by type on what you could do but it seemed overkill | 14:34 |
dmsimard | ah, okay .. so what you suggested (all callback failures are fatal) could be an option I guess | 14:35 |
dmsimard | I can file an issue about it if you want ? or something else | 14:36 |
bcoca | issue is fine | 14:36 |
dmsimard | apollo13, bcoca: https://github.com/ansible/ansible/issues/46397 | 14:45 |
bcoca | not sure i agree with that premiss, callbacks should not affect playbook execution, one thing is having callback errors cascade, another is them deciding play flow logic, that is what strategy plugins are for | 14:46 |
bcoca | or just even tasks | 14:47 |
dmsimard | bcoca: oh, feel free to correct me if I'm wrong -- I'm not really familiar with strategy plugins | 14:47 |
dmsimard | (yet) | 14:47 |
bcoca | they control play execution flow | 14:47 |
bcoca | deafult is 'linear' but we have 'free' and 'host_pinned' | 14:48 |
bcoca | openstack has a 'aspect oriented strategy' that inserts tasks before/after each task | 14:48 |
openstackgerrit | David Moreau Simard proposed openstack/ara-server master: Added CI for black/isort. https://review.openstack.org/605439 | 14:51 |
dmsimard | ^ just rebased, there was a merge conflict because of the tox py3 fix | 14:51 |
*** tbielawa is now known as tbielawa|stand | 14:58 | |
openstackgerrit | David Moreau Simard proposed openstack/ara-plugins master: Implement self-configuration of the callback through Ansible https://review.openstack.org/607280 | 14:59 |
openstackgerrit | David Moreau Simard proposed openstack/ara-plugins master: Update README.rst to be more accurate https://review.openstack.org/607281 | 14:59 |
dmsimard | bcoca: for the docstring module config, I see https://github.com/ansible/ansible/blob/devel/lib/ansible/modules/files/template.py and https://github.com/ansible/ansible/blob/devel/lib/ansible/plugins/action/template.py but there doesn't seem to be something like the set_options/get_option funcs ? | 15:04 |
dmsimard | only task.args which already existed | 15:05 |
bcoca | modules use arg_spec which is totally diff | 15:06 |
bcoca | action plugins 'use nothing' as they mostly rely on modules .. template has had some code added but its not a 'framwork' | 15:06 |
bcoca | for dealing with args, validation and conditions | 15:07 |
dmsimard | oh but I asked yesterday about being able to pass in some parameters like the callback docstrings and you pointed me to template :p | 15:07 |
bcoca | no, you asked about documentation | 15:07 |
dmsimard | hrm, must have not gotten across properly, sorry :/ | 15:07 |
bcoca | i didnt realize the context was 'documentation also as config' | 15:07 |
bcoca | for most plugins docs == config, modules and action plugins are the big exceptions | 15:08 |
bcoca | filters/tests dont really have config | 15:08 |
dmsimard | bcoca: context is some ara modules and the callback would share config (like api server url, etc.) | 15:08 |
dmsimard | I can add a module arg for api server or source it from env | 15:08 |
bcoca | this is why i wanted 'auth plugins' | 15:08 |
dmsimard | that would be kind of nice, auth is a bit all over the place right now | 15:09 |
bcoca | agreed | 15:09 |
apollo13 | bcoca: my main reasoning is that part of our "audit" work is the requirement to log ansible executions, so even if the plugin fails to import I'd need to import | 15:09 |
bcoca | hence my proposal, but seems like there are diff workarounds for cloud and nework, so dont know if it will go anywhere | 15:10 |
dmsimard | bcoca: I'll just use get_config from the modules (LOL) | 15:10 |
bcoca | modules are not guaranteed to run on controller | 15:10 |
apollo13 | this will obviously not protect against a malicious user removing the callback in the first place, but at least relieves us from documenting all actions | 15:10 |
bcoca | action plugins are | 15:10 |
dmsimard | bcoca: all ara has are action modules yeah | 15:10 |
dmsimard | what's the spiritual successor to get_config ? | 15:11 |
bcoca | get_config_value in lib/ansible/config/manager.py | 15:12 |
bcoca | self.get_config_value_and_origin <= if you want to know 'where it came from' | 15:12 |
apollo13 | bcoca: the main issue with strategies is that I can override the default from a play itself | 15:13 |
apollo13 | aside from that, strategies do indeed look like a viable option for me | 15:13 |
bcoca | apollo13: you can override most anything from the pllay itself | 15:13 |
bcoca | play | 15:13 |
apollo13 | bcoca: callbacks too? | 15:13 |
*** tbielawa|stand is now known as tbielawa | 15:13 | |
bcoca | kindof, you can introduce new ones adjacent to play or by role, but they are not available for 'stdout' | 15:14 |
apollo13 | yeah, but that is harder than accidentally overriding a strategy :D | 15:14 |
bcoca | so you cannot override stdout one, but you can the rest | 15:14 |
apollo13 | either way I get your point and will investigate if I can write my strategy that plays nicely with the ara callbacks | 15:15 |
bcoca | what conditions are you looking for to change play flow? | 15:15 |
apollo13 | ara callback failed to log -> abort | 15:16 |
bcoca | i would just end the callback in an exception and have the toggle i talked about | 15:16 |
apollo13 | yeah, that would work for me too | 15:16 |
bcoca | CALLBACK_ERRORS_ARE_FATAL=false|true | 15:16 |
bcoca | the way the ticket was phrased implied a more complex reasoning | 15:17 |
bcoca | i.e if host1/task3 is success but host2/task1 fails, end play | 15:17 |
apollo13 | sorry, I was away from the PC, didn't really notice that dmsimard filed a ticket at all | 15:17 |
bcoca | that is why im not allowed out of the basement and i'm chained to my chair | 15:18 |
apollo13 | hehe, gotta run, cy tomorrow | 15:19 |
*** tbielawa is now known as tbielawa|mtgLife | 16:03 | |
dmsimard | ARA got a mention on the AnsibleFest keynote this morning https://twitter.com/rcarrillocruz/status/1047147496638681089 :D | 16:13 |
dmsimard | bcoca: the "more complex reasoning" just meant that instead of the callback exception'ing out, a callback go like sys.exit(1) and the end result would be the same | 16:26 |
dmsimard | if it needs to be an exception, the calback could raise a custom one, etc. | 16:34 |
*** themurph has quit IRC | 17:08 | |
*** mmercer has joined #ara | 17:14 | |
mmercer | hey guys, has anyone come up with a way of setting a config flag for 'USE_ARA' and 'NO_ARA' or similar ? | 17:15 |
mmercer | the one problem using ARA causes is that doing development then requires you to have an additional ansible.cfg based on your environment... in dev you dont necessarily have the same ara access that you do in prod... so you either have to do something wonky, or find a nice way of disabling it that doesnt cause failure to begin with | 17:15 |
mmercer | I suppose by using ENV vars in prod, you can set prod so that it uses it, but dev does not... | 17:17 |
mmercer | since you dont have to explicitly define the env vars anywhere else | 17:17 |
*** spiette has quit IRC | 17:26 | |
bcoca | dmsimard: what reason to call 'sys.exit'? one thing is callback encountering fatal error another it is finding 'an exit condition' | 17:26 |
mmercer | wow, im surprised to see bcoca in here, lol... xD | 17:28 |
*** spiette has joined #ara | 17:29 | |
*** spiette has quit IRC | 17:29 | |
bcoca | like root, im everywhere, not always visible, but managing things in the background | 17:30 |
*** spiette has joined #ara | 17:38 | |
*** themurph has joined #ara | 17:49 | |
*** openstackgerrit has quit IRC | 17:51 | |
mmercer | darn... my idea wont work the way i wanted because env variables override ansible.cfg | 18:12 |
*** openstackgerrit has joined #ara | 18:44 | |
openstackgerrit | Merged openstack/ara-plugins master: Implement self-configuration of the callback through Ansible https://review.openstack.org/607280 | 18:44 |
openstackgerrit | Merged openstack/ara-server master: Added CI for black/isort. https://review.openstack.org/605439 | 18:52 |
*** bcoca has quit IRC | 18:58 | |
*** bcoca has joined #ara | 18:58 | |
dmsimard | mmercer: interestingly enough you're not the first person to ask this kind of question | 19:04 |
dmsimard | There's no toggle in ARA to disable itself because if you don't want to enable ara, you actually don't specify it as a callback | 19:04 |
dmsimard | mmercer: you could effectively do something like "export ANSIBLE_CALLBACK_PLUGINS=" to not make ansible load ara | 19:06 |
dmsimard | bcoca: I dunno, exiting cleanly instead of raising an exception ? | 19:07 |
openstackgerrit | David Moreau Simard proposed openstack/ara-plugins master: Update README.rst to be more accurate https://review.openstack.org/607281 | 19:12 |
*** spiette has quit IRC | 19:18 | |
*** spiette has joined #ara | 19:21 | |
*** tbielawa|mtgLife is now known as tbielawa|lunch | 19:23 | |
openstackgerrit | David Moreau Simard proposed openstack/ara-server master: Implement API for ARA records https://review.openstack.org/607354 | 19:44 |
mmercer | meh, i settled for creating a separated version of ansible.cfg for prod/dev, and then linked it for prod. added it to gitignore, and now in dev, you can just relink it against local | 20:09 |
*** Serienmorder has joined #ara | 20:09 | |
dmsimard | ¯\_(ツ)_/¯ | 20:11 |
Serienmorder | How's it going dmsimard | 20:11 |
dmsimard | bcoca: trying to port a feature from 0.x to 1.0 and it's not straightforward, was wondering if you would come up with an idea... tl;dr, the ara action modules need to be aware of the playbook id that is known by the callback | 20:12 |
dmsimard | Serienmorder: tired but doing alright, ansiblefest is fun :) | 20:13 |
dmsimard | bcoca: so it goes like "callback creates playbook id 1" -> "i use an ara action module that should run against playbook id 1" | 20:13 |
dmsimard | back in 0.x, I did this by caching the playbook id in a flask context but now that the backend and the callback are really decoupled, I don't really have this kind of capability | 20:14 |
Serienmorder | dmsimard: I wish my job would send me to stuff like that | 20:15 |
Serienmorder | What is ara written in? | 20:16 |
Serienmorder | I assume Python. I guess I could look at the repo lol | 20:16 |
dmsimard | python yeah | 20:16 |
dmsimard | frontend uses patternfly which is a css/js framework a bit like bootstrap | 20:16 |
dmsimard | https://github.com/openstack/?q=ara | 20:17 |
dmsimard | ara = v0.x | 20:18 |
dmsimard | ara-(server,plugins,clients,web) is 1.0 | 20:18 |
Serienmorder | Gotchya. So mostly 1.0 development. | 20:20 |
dmsimard | yes, maybe we will release it someday | 20:21 |
*** tbielawa|lunch is now known as tbielawa | 20:21 | |
dmsimard | This is the current state of the todo list: https://etherpad.openstack.org/p/ara-todo-1.0 | 20:22 |
*** tbielawa is now known as tbielawa|g0n3 | 20:24 | |
Serienmorder | That's a lot to do | 20:27 |
dmsimard | that's actually a pretty short list | 20:29 |
dmsimard | I've been talking about 1.0 for over a year, that list is just what's left | 20:29 |
Serienmorder | How much time do you spend on it in a week? | 20:32 |
dmsimard | not enough | 20:33 |
dmsimard | but I also trashed about 6 months worth of work to head in a completely different direction | 20:33 |
dmsimard | it wasn't an easy decision but in hindsight, it'll pay off | 20:33 |
dmsimard | it was the one opportunity to turn around, otherwise considering this kind of rewrite for even a 2.0 would've been much more work | 20:34 |
*** ChanServ sets mode: +o dmsimard | 20:35 | |
Serienmorder | The hardest part for most people is looking forward and realizing when something needs to be ditched | 20:35 |
dmsimard | yup, it's called sunk costs :) | 20:36 |
dmsimard | it's a huge thing in economy | 20:36 |
Serienmorder | lol I slept through that class | 20:40 |
Serienmorder | I need to get into a web project. But first starting I get pretty intimidated | 20:41 |
dmsimard | Serienmorder: the new web frontend is being implemented with react, are you familiar with it at all ? | 20:46 |
Serienmorder | @dmsimard: I am not. I have 0 front end experience. Like 200 hours of C# Backend experience | 20:48 |
*** themurph has quit IRC | 20:52 | |
openstackgerrit | David Moreau Simard proposed openstack/ara-plugins master: Run black/isort on ara-plugins https://review.openstack.org/607361 | 20:55 |
openstackgerrit | David Moreau Simard proposed openstack/ara-plugins master: Add zuul job to run tox-format environment for executing black and isort https://review.openstack.org/607362 | 20:55 |
mmercer | hmmm... | 21:17 |
mmercer | has anyone ever seen sqlalechmy error as soon as you try to start ara-manager runserver ? | 21:17 |
*** Serienmorder has quit IRC | 21:18 | |
mmercer | sqlalchemy.exc.InternalError: (pymysql.err.InternalError) (1071, u'Specified key was too long; max key length is 767 bytes') [SQL: u'\nCREATE TABLE data (\n\tid VARCHAR(36) NOT NULL, \n\tplaybook_id VARCHAR(36), \n\t`key` VARCHAR(255), \n\tvalue BLOB(4294967295), \n\tPRIMARY KEY (id), \n\tFOREIGN KEY(playbook_id) REFERENCES playbooks (id) ON DELETE RESTRICT, \n\tUNIQUE (playbook_id, `key`)\n)\n\n'] (Background | 21:20 |
mmercer | on this error at: http://sqlalche.me/e/2j85) | 21:20 |
mmercer | looking through the bugs, googling... not seeing any references to see whats going on | 21:20 |
dmsimard | mmercer: that doesn't ring me a bell | 21:32 |
dmsimard | if you do find out what the problem is, please let me know | 21:33 |
mmercer | dmsimard: what is the default encoding you guys use on the database ? latin-1 or utf-8 ? | 21:34 |
mmercer | trying to find the create database statement right now, it seems to be non compliant with mysql 5.6 xD | 21:36 |
dmsimard | mmercer: it's abstracted by sqlalchemy | 21:36 |
mmercer | thats what i figured... seems that somehow, its not compatible with mysql 5.6 currently.... which i dont remember being a problem in the past | 21:36 |
dmsimard | ara doesn't actually create the database in the case of mysql, it's expected that you create it first | 21:36 |
dmsimard | https://ara.readthedocs.io/en/stable/configuration.html#ara-database | 21:37 |
mmercer | dmsimard: let me rephrase --- create the table | 21:37 |
dmsimard | I don't think we specify an encoding so it's probably using default ? | 21:37 |
dmsimard | Everything that's database related is either here: https://github.com/openstack/ara/blob/master/ara/models.py or here: https://github.com/openstack/ara/tree/master/ara/db/versions | 21:38 |
mmercer | hmmm. seems to be incompatible with mariadb 10.0-not sure, as well as mysql-aurora v5.6, that seems surprising | 21:45 |
mmercer | what version of mysql has been tested lately ? | 21:45 |
openstackgerrit | David Moreau Simard proposed openstack/ara-clients master: Run black/isort on ara-clients https://review.openstack.org/607373 | 21:46 |
openstackgerrit | David Moreau Simard proposed openstack/ara-clients master: Add zuul job to run tox-format environment for executing black and isort https://review.openstack.org/607374 | 21:46 |
dmsimard | mmercer: that seems surprising to me as well | 21:46 |
dmsimard | mmercer: mysql integration tests are not a thing right now :( | 21:46 |
mmercer | not sure, ill spin up another box just to be sure, but for a complete scratch test on an ubuntu 16.04 instance with mariadb-server, it fails to create the table for ara because the key constraints exceed the limits allowed by versions of mysql prior to 5.7 | 21:47 |
mmercer | now granted, 10.0 is a VERY old release of mariadb-server, im checking to see if there is a newer 10.x release right now | 21:47 |
dmsimard | It sounds like it should just work | 21:48 |
dmsimard | what version of sqlalchemy and pymysql are you running ? | 21:48 |
mmercer | PyMySQL (0.9.2) SQLAlchemy (1.2.12) | 21:49 |
dmsimard | looks like that's the latest | 21:49 |
mmercer | yeap | 21:49 |
dmsimard | ¯\_(ツ)_/¯ | 21:49 |
mmercer | it appears to be an actual issue with compatibility with 'older' mysql releases | 21:50 |
mmercer | older being subjective of course | 21:50 |
dmsimard | I hope we can test sqlalchemy, mysql and postgresql in a more official capacity sometime in the future | 21:50 |
dmsimard | errr s/sqlalchemy/sqlite/ | 21:51 |
* mmercer nods | 21:51 | |
mmercer | im checking to see if it really did somehow manage to break and go unnoticed, if so thats not good xD | 21:51 |
dmsimard | I'll give it a quick try here out of curiosity | 21:52 |
mmercer | np | 21:52 |
mmercer | fastest starting point is a bento/ubuntu16 image in vagrant if you have access to virtualbox/vagrant :) | 21:53 |
dmsimard | I have an openstack cloud in my basement | 21:54 |
dmsimard | I'm good :P | 21:54 |
mmercer | good point, lol | 21:55 |
mmercer | i plan on having mine up and running... eventually | 21:55 |
mmercer | i still really really want to get myself a full dell m3000 blade cluster to run it on, lol | 21:55 |
dmsimard | mmercer: works on centos with mariadb-5.5 | 22:01 |
dmsimard | what I used to test: https://gist.github.com/dmsimard/cb28393b10c75a018d42bc30b1f199ab | 22:01 |
*** bcoca has quit IRC | 22:18 | |
mmercer | hrum... interesting | 23:09 |
mmercer | dmsimard: can you check the default character set for me on your database schema | 23:09 |
Generated by irclog2html.py 2.15.3 by Marius Gedminas - find it at mg.pov.lt!