*** ccamacho has joined #ara | 07:13 | |
*** ccamacho has quit IRC | 07:16 | |
*** ccamacho has joined #ara | 07:32 | |
*** ccamacho has quit IRC | 08:20 | |
*** ccamacho has joined #ara | 08:32 | |
*** ccamacho has quit IRC | 08:53 | |
*** ccamacho has joined #ara | 09:02 | |
*** gvincent has joined #ara | 14:13 | |
*** eliv has quit IRC | 15:47 | |
*** eliv has joined #ara | 15:47 | |
-openstackstatus- NOTICE: The Gerrit service on review.openstack.org is being restarted to pick up some updates, and should be available again momentarily | 19:00 | |
ara-slack | kaivanov: @kaivanov has joined the channel | 20:29 |
---|---|---|
ara-slack | kaivanov: hey guys, anyone have few minutes to help me with an issue ? | 20:30 |
dmsimard | @kaivanov what's up ? | 20:48 |
ara-slack | kaivanov: so on a fresh install from pip3 when I run ansible I get [WARNING]: Skipping plugin (/root/.local/lib/python3.8/site-packages/ara/plugins/callback/ara_default.py) as it seems to be invalid: No module named 'ara'. | 20:52 |
ara-slack | kaivanov: Both ARA and ansible are installed from pip | 20:52 |
ara-slack | kaivanov: seems to be using the same python interpreter | 20:53 |
dmsimard | if you run "which ansible", which path is it coming from ? | 20:53 |
ara-slack | kaivanov: /usr/local/bin/ansible | 20:53 |
dmsimard | that's the typical path when installing from pip system-wide but the path in the error seems to have been installed with --user | 20:53 |
dmsimard | you might have a /root/.local/bin/ansible if you also installed it with pip | 20:54 |
dmsimard | sometimes depending on the distro ~/.local/bin is not in PATH, it could be that too. | 20:55 |
ara-slack | kaivanov: hm there is /root/.local/bin/ansible is that what ARA is using ? | 20:55 |
dmsimard | the problem is that your ansible at /usr/local/bin/ansible is expecting the plugin to be in /usr/local/lib/python[...] | 20:56 |
dmsimard | if you try again with /root/.local/bin/ansible-playbook instead it would probably work | 20:56 |
dmsimard | python site packages libraries are confusing :) | 20:57 |
ara-slack | kaivanov: I see | 20:57 |
dmsimard | from ara's perspective, it doesn't matter whether it's installed system wide or with --user, so long as both ansible and ara are using the same site-packages | 20:58 |
ara-slack | kaivanov: can I copy the plugin in the systemwide python plugin path, or change something with the env vars ? | 20:58 |
dmsimard | copy, not really, but you can install ara with pip and without --user | 20:59 |
dmsimard | it would probably be best to uninstall what you've got under .local and then re-export ANSIBLE_CALLBACK_PLUGINS with the right path once it's been re-installed | 20:59 |
ara-slack | kaivanov: ok, let me try that real quick, appreciate the help | 21:00 |
ara-slack | kaivanov: hm same thing with the global path | 21:04 |
dmsimard | same warning as before ? | 21:04 |
dmsimard | as in, it complains about /root/.local/lib ? | 21:04 |
ara-slack | kaivanov: [WARNING]: Skipping plugin (/usr/local/lib/python3.8/dist-packages/ara/plugins/callback/ara_default.py) as it seems to be invalid: No module named 'ara' | 21:04 |
ara-slack | kaivanov: not in .local anymore | 21:04 |
dmsimard | and it's using /usr/local/bin/ansible-playbook ? | 21:05 |
dmsimard | hmmmm, can you run something like "ansible localhost -m setup |grep -C5 python" ? | 21:07 |
dmsimard | to find out what python interpreter ansible is using | 21:07 |
dmsimard | should be under ansible_python.executable | 21:07 |
ara-slack | kaivanov: hmm it's using /opt/ansible-runtime/bin/python | 21:08 |
dmsimard | using openstack-ansible ? | 21:08 |
ara-slack | kaivanov: actually that's just a symlink to /usr/bin/python3 | 21:08 |
ara-slack | kaivanov: and yes, openstack-ansible | 21:08 |
dmsimard | hmmm, I know for sure ara works with OSA so there's something funny going on | 21:09 |
dmsimard | if you run /usr/bin/python3 -m ara.setup.callback_plugins, what does it print ? | 21:09 |
dmsimard | oh, isn't that a virtualenv though ? | 21:09 |
dmsimard | it might be expecting ara to be installed kinda like /opt/ansible-runtime/bin/pip install ara[server] | 21:10 |
ara-slack | kaivanov: oh I see, let me try that | 21:10 |
dmsimard | and then you'd need to re-export the path again so /opt/ansible-runtime/bin/python3 -m ara.setup.callback_plugins | 21:11 |
ara-slack | kaivanov: this is what I have now | 21:15 |
ara-slack | kaivanov: no warning when I ran ansible | 21:15 |
ara-slack | kaivanov: should I see something recorder in ara ? | 21:16 |
ara-slack | kaivanov: should I see something recorded in ara ? | 21:16 |
dmsimard | for recording regular ansible adhoc commands it needs an extra export ANSIBLE_LOAD_CALLBACK_PLUGINS=true but otherwise ansible-playbook commands should be recorded now yes | 21:17 |
dmsimard | try with a small or test playbook and see if that works | 21:18 |
ara-slack | kaivanov: I guess I need to start the dev server from that location as well /opt/ansible-runtime/bin/ara-manage runserver | 21:19 |
dmsimard | you need to start the server if you want to browse results out of the web UI but by default it's not required for recording things -- there's a default "offline" client that takes care of spinning up an ephemeral server for the duration of the playbook | 21:20 |
dmsimard | but yeah, if you want to start it, that's where it would be from | 21:20 |
dmsimard | you can change the listen address if you're not looking from localhost so for example "ara-manage runserver 0.0.0.0:8000" | 21:21 |
dmsimard | ah, but if you do that, you'll also need to add whatever the hostname (or IP) of the machine you're trying to reach in ~/.ara/server/settings.yaml's ALLOWED_HOSTS | 21:23 |
ara-slack | kaivanov: yup | 21:25 |
ara-slack | kaivanov: it worked, thank you so much for your help! | 21:25 |
dmsimard | \o/ | 21:25 |
dmsimard | I have to be off for now but feel free to come by and chat every now and then | 21:25 |
dmsimard | have a nice weekend o/ | 21:25 |
ara-slack | kaivanov: thank you, you too! | 21:26 |
*** ccamacho has quit IRC | 22:59 |
Generated by irclog2html.py 2.17.2 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!