Last modified: 2013-12-16 07:43:14 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T54540, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 52540 - redis::ganglia collides with python-redis package
redis::ganglia collides with python-redis package
Status: RESOLVED FIXED
Product: Wikimedia Labs
Classification: Unclassified
General (Other open bugs)
unspecified
All All
: Unprioritized minor
: ---
Assigned To: Ori Livneh
https://github.com/ganglia/monitor-co...
: upstream
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-08-05 04:22 UTC by Tim Landscheidt
Modified: 2013-12-16 07:43 UTC (History)
5 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Tim Landscheidt 2013-08-05 04:22:53 UTC
I was testing an instance (toolsbeta-puppettestbed) for Ganglia statistics of a Redis server with "import redis::ganglia".  The instance had the Ubuntu package python-redis installed from earlier, unrelated tests.

This led to ganglia-monitor, upon reading /etc/ganglia/conf.d/redis.pyconf's:

| modules {
|   module {
|     name = "redis"
|     language = "python"
|     param host { value = "127.0.0.1" }
|     param port { value = 6379 }

|   }
| }

to import the Python module redis from the Ubuntu package, but not the module of the same name in /usr/lib/ganglia/python_modules/redis.py.  Symptoms were /var/log/upstart/ganglia-monitor.log containing:

| [PYTHON] Can't find the metric_init function in the python module [redis].

| Unable to find the metric information for 'connected_clients'. Possible that the module has not been loaded.

| [...]

but in fact *a* module had been loaded, just not the "right" one.

Two immediate possible solutions:

a) Rename /usr/lib/ganglia/python_modules/redis.py to redis_monitoring.py or something similar;

b) liaison with upstream Ganglia so that /usr/lib/ganglia/python_modules gets higher priority in Python's path.
Comment 1 Ori Livneh 2013-08-05 05:51:29 UTC
(In reply to comment #0)
> Two immediate possible solutions:
> 
> a) Rename /usr/lib/ganglia/python_modules/redis.py to redis_monitoring.py or
> something similar;

Yep. That's a nice, simple fix.

> b) liaison with upstream Ganglia so that /usr/lib/ganglia/python_modules gets
> higher priority in Python's path.

Upstream: https://github.com/ganglia/monitor-core/issues/22
Comment 2 Gerrit Notification Bot 2013-08-05 05:57:42 UTC
Change 77657 had a related patch set uploaded by Ori.livneh:
Rename 'redis.py' to 'redis_monitoring.py' to avoid conflict

https://gerrit.wikimedia.org/r/77657
Comment 3 Gerrit Notification Bot 2013-08-07 15:34:20 UTC
Change 77657 merged by Faidon:
Rename 'redis.py' to 'redis_monitoring.py' to avoid conflict

https://gerrit.wikimedia.org/r/77657

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links