Friday, 2021-04-23

*** ccamacho has joined #ara07:13
*** ccamacho has quit IRC07:16
*** ccamacho has joined #ara07:32
*** ccamacho has quit IRC08:20
*** ccamacho has joined #ara08:32
*** ccamacho has quit IRC08:53
*** ccamacho has joined #ara09:02
*** gvincent has joined #ara14:13
*** eliv has quit IRC15:47
*** eliv has joined #ara15:47
-openstackstatus- NOTICE: The Gerrit service on review.openstack.org is being restarted to pick up some updates, and should be available again momentarily19:00
ara-slackkaivanov: @kaivanov has joined the channel20:29
ara-slackkaivanov: hey guys, anyone have few minutes to help me with an issue ?20:30
dmsimard@kaivanov what's up ?20:48
ara-slackkaivanov: 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-slackkaivanov: Both ARA and ansible are installed from pip20:52
ara-slackkaivanov: seems to be using the same python interpreter20:53
dmsimardif you run "which ansible", which path is it coming from ?20:53
ara-slackkaivanov: /usr/local/bin/ansible20:53
dmsimardthat's the typical path when installing from pip system-wide but the path in the error seems to have been installed with --user20:53
dmsimardyou might have a /root/.local/bin/ansible if you also installed it with pip20:54
dmsimardsometimes depending on the distro ~/.local/bin is not in PATH, it could be that too.20:55
ara-slackkaivanov: hm there is /root/.local/bin/ansible is that what ARA is using ?20:55
dmsimardthe problem is that your ansible at /usr/local/bin/ansible is expecting the plugin to be in /usr/local/lib/python[...]20:56
dmsimardif you try again with /root/.local/bin/ansible-playbook instead it would probably work20:56
dmsimardpython site packages libraries are confusing :)20:57
ara-slackkaivanov: I see20:57
dmsimardfrom 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-packages20:58
ara-slackkaivanov: can I copy the plugin in the systemwide python plugin path, or change something with the env vars ?20:58
dmsimardcopy, not really, but you can install ara with pip and without --user20:59
dmsimardit 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-installed20:59
ara-slackkaivanov: ok, let me try that real quick, appreciate the help21:00
ara-slackkaivanov: hm same thing with the global path21:04
dmsimardsame warning as before ?21:04
dmsimardas in, it complains about /root/.local/lib ?21:04
ara-slackkaivanov: [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-slackkaivanov: not in .local anymore21:04
dmsimardand it's using /usr/local/bin/ansible-playbook ?21:05
dmsimardhmmmm, can you run something like "ansible localhost -m setup |grep -C5 python" ?21:07
dmsimardto find out what python interpreter ansible is using21:07
dmsimardshould be under ansible_python.executable21:07
ara-slackkaivanov: hmm it's using /opt/ansible-runtime/bin/python21:08
dmsimardusing openstack-ansible ?21:08
ara-slackkaivanov: actually that's just a symlink to /usr/bin/python321:08
ara-slackkaivanov: and yes, openstack-ansible21:08
dmsimardhmmm, I know for sure ara works with OSA so there's something funny going on21:09
dmsimardif you run /usr/bin/python3 -m ara.setup.callback_plugins, what does it print ?21:09
dmsimardoh, isn't that a virtualenv though ?21:09
dmsimardit might be expecting ara to be installed kinda like /opt/ansible-runtime/bin/pip install ara[server]21:10
ara-slackkaivanov: oh I see, let me try that21:10
dmsimardand then you'd need to re-export the path again so /opt/ansible-runtime/bin/python3 -m ara.setup.callback_plugins21:11
ara-slackkaivanov: this is what I have now21:15
ara-slackkaivanov: no warning when I ran ansible21:15
ara-slackkaivanov: should I see something recorder in ara ?21:16
ara-slackkaivanov: should I see something recorded in ara ?21:16
dmsimardfor recording regular ansible adhoc commands it needs an extra export ANSIBLE_LOAD_CALLBACK_PLUGINS=true but otherwise ansible-playbook commands should be recorded now yes21:17
dmsimardtry with a small or test playbook and see if that works21:18
ara-slackkaivanov: I guess I need to start the dev server from that location as well /opt/ansible-runtime/bin/ara-manage runserver21:19
dmsimardyou 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 playbook21:20
dmsimardbut yeah, if you want to start it, that's where it would be from21:20
dmsimardyou 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
dmsimardah, 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_HOSTS21:23
ara-slackkaivanov: yup21:25
ara-slackkaivanov: it worked, thank you so much for your help!21:25
dmsimard\o/21:25
dmsimardI have to be off for now but feel free to come by and chat every now and then21:25
dmsimardhave a nice weekend o/21:25
ara-slackkaivanov: thank you, you too!21:26
*** ccamacho has quit IRC22:59

Generated by irclog2html.py 2.17.2 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!