-
-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
seeing sensors failing to start related to virtualenv creation issues #260
Comments
Thanks for the report, we will look into it. @dennybaa @armab can one of you please look into this? It seems like it's related to the way we create virtual environments with the new packages. We used to use Which version of virtualenv do we use / install right now? Do we pin it to the latest available version or do we use system version? If we use system version, it could be related to a bug in an old version or similar. In any case, we need to have some end to end tests for this. |
@saahn Hi there! Would it be possible to provide steps to reproduce the ^^^ please. Also it's important to know which distro, since virtualenvs are treated in different way. All platforms except rhel7/centos7 use this option https://github.com/StackStorm/st2/blob/master/conf/st2.package.conf#L23. @Kami using |
@dennybaa Sure, I've described the steps below. They were executed on Ubuntu-14.04-trusty, where I was trying to set up the latest stackstorm.
At this point, i was seeing our sensor processes crash. While debugging with @manasdk , we noticed that permissions were not set correctly, and I was seeing the following in the sensorcontainer logs: "Exception:
However, my sensor processes continued to crash after the permissions fix.
This succeeded and I saw our sensor processes running; we verified that they were still running after 10 seconds. However, they continued to crash when invoked via the st2ctl or service commands. Next, @Kami asked me to try running the following:
which resulted in:
That's when we started suspecting the issue was virtualenv creation related. I tried removing and re-installing them:
I still saw the same That's when I opened this issue. Thank you for looking into this. |
@dennybaa I can confirm I am seeing the same issue as @saahn. I think the behavior of --always-copy has changed recently. With a fresh install, I ran st2 run packs.install packs=jira and I see the following for packs.setup_virtualenv https://gist.github.com/lakshmi-kannan/2561e893a508ac43175c4f8f45efa6dc Relevant st2 change: StackStorm/st2#2372 I am pretty sure --always-copy worked at some point. |
Thanks for verifying @lakshmi-kannan . Please keep me updated on any fix or workaround for this. Thanks again! |
@saahn can you post the output for the following commands? i was not able to reproduce the problem. i followed instruction @ https://docs.stackstorm.com/install/deb.html to install a fresh st2 v1.3.2 on ubuntu 14.04. i was able to install the rabbitmq pack and run the rabbitmq sensor without problem. i had a script that publishes message to a queue every sec for 10 min. the rabbitmq sensor picked up every single message and the sensor container stayed up. may i suggest you to try the rabbitmq sensor and see if that works for you just so we are on the same page here. |
@m4dcoder sure:
@lakshmi-kannan reported that he was able to reproduce. |
We identified the problem with @saahn. It has to do with the packs being in /root directory and symlinked under /opt/stackstorm/packs. Once the packs are moved physically to /opt/stackstorm/packs and with the correct permissions set, the sensor container started working. |
@m4dcoder Good "investigation" :) I would imagine there is a bug in virtualenv copy functionality (it doesn't handle symlinks correctly), but maybe hard links would still work (something to try out in case they want to preserve the linking flow). In any case, it's something we should probably document and update the code if such scenario is encountered to throw and make it explicit what is going on and how to resolve it. |
I was seeing our sensor processes crash when run as daemon processes via st2ctl or the st2sensorcontainer service. Strangely, running them as foreground processes succeeded.
After some debugging with @Kami , we saw that the virtualenvs for our packs were not set up correctly (e.g. it was missing the eventlet and st2common modules).
This happened even though the
st2 run packs.setup_virtualenv packs=<pack name>
action ran and succeeded; we were able to reproduce it when we ranrm -rf /opt/stackstorm/virtualenvs/<pack name>
andst2 run packs.setup_virtualenv packs=<pack name>
again.Sounds like this is an ' --always-copy relayed' issue where it doesn't copy parent dependencies, to quote from our chat.
The text was updated successfully, but these errors were encountered: