-
Notifications
You must be signed in to change notification settings - Fork 490
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
carbon install via pip doesn't show up in "pip freeze" Edit #86
Comments
This appears to be a side effect of a default /opt/graphite install. This works: This is perhaps another argument for getting rid of /opt/graphite as a default install location, but that should be covered elsewhere |
@mleinart That workaround is not really an option when you use a configuration management system like saltstack/salt. The pip.installed command (actually state) checks if pip freeze has "carbon" in its list before it tries to install it. This causes the pip.installed commands to reinstall carbon every single time the configuration state check is executed. Please reopen and link as dependent on said fix mentioned above. If you install to /opt/graphite, shouldn't the global pip index still be updated, or doesn't pip work like that? |
Yeah, there's no index - pip (actually distribute or setuptools) is looking through sys.path to find installed packages. I'll reopen to track it but I dont think there's anything we can do in this case right now. Installing in a Virtualenv or in the system site-packages might be workarounds, but will require some extra flags passed to pip to override the default /opt/graphite prefix. See: |
This is basically the workaround I've had to set up to avoid carbon and graphite-web being reinstalled every single time state.highstate (in salt) is run:
As you can see, whisper installs cleanly, but for the two others I've had to resort to a manual test instead (which I'm sure could be rewritten to something cleaner if I knew more about pip). |
Another way of dealing with this is by creating symlinks of the .egg-info files in the directory pip freeze expects them to be. On Ubuntu 12.04 you'd do something like:
Same for graphite-web... |
@bernd-copperfroghosting Thanks for that tip. Adding in that link should most likely take care of things. I'll report back when I've had time to try it out. |
Doing this with in my graphite.sls file seems to work as expected.
|
This issue is a major bummer since Puppet doesn't support passing arguments to pip, causing it never to find and keep re-installing the package. |
In systems that allow you to control the shell environment in which pip executes you can also set PYTHONPATH to include /opt/graphite/lib and /opt/graphite/webapp. PYTHONPATH="/opt/graphite/lib/:/opt/graphite/webapp/" Which has the advantage that you do not have to symlink a specific version and remember to fix the symlink after upgrading. In Ansible this works like: ---
# file: roles/graphite/tasks/pip.yml
- name: /opt/graphite/requirements.txt
template: src=requirements.txt dest={{ graphite_root }}/requirements.txt owner=root group=root mode=0440
tags: pip
- name: ensure graphite is installed (virtualenv /opt/graphite)
pip: requirements=/opt/graphite/requirements.txt use_mirrors=yes virtualenv=/opt/graphite virtualenv_site_packages=no state=present
environment:
PYTHONPATH: "/opt/graphite/lib:/opt/graphite/webapp"
tags: pip |
@trbs thanks for the workaround |
Caused by and workaround taken from: - graphite-project/carbon#86
Caused by and workaround taken from: - graphite-project/carbon#86
mleinart:
This is issue #74. |
I'm really tempted to not address this in 0.9.13. Everyone already has a flavor of workaround that works and in 0.10.x we can begin to refactor away from the Thoughts? |
I'm OK with that. On 27 September 2014 06:29, Scott Sanders [email protected] wrote:
|
Moved this to 0.10.0 milestone. |
We need to fix this for Note that Whisper works fine. |
Sorry for the milestone tom-foolery, this is indeed |
this is a workaround of a know bug : graphite-project/carbon#86
The installation docs now formally instruct the user to set |
Imported from https://bugs.launchpad.net/bugs/1022576
The text was updated successfully, but these errors were encountered: