Details
-
Bug
-
Resolution: Fixed
-
1.6.0 beta3
-
None
-
Operating System: All
Platform: All
Description
We've got a lot of nice tools implemented in Python that expose that detail too much. All of the tools got a .py suffix that should be removed from the installed bits (we don't install our c-programs as memcached.c etc).
In addition it seems to me that all of our tools just dump out a traceback if an error occurs instead of printing an error message suitable for the average end user.
If you try to run stats.py towards a server that isn't running memcached (or got a typo in the port number), you get the following dump instead of the "typical" connection refused message:
trond@ubuntu:2025> ./stats.py localhost:9999 all
Traceback (most recent call last):
File "./stats.py", line 36, in <module>
c.execute()
File "/home/trond/compile/tools/membase/leak/ep-engine/management/clitool.py", line 33, in execute
f[0](mc, *sys.argv[3:])
File "./stats.py", line 19, in stats_all
stats_formatter(mc.stats())
File "/home/trond/compile/tools/membase/leak/ep-engine/management/mc_bin_client.py", line 234, in stats
self._sendCmd(memcacheConstants.CMD_STAT, sub, '', opaque)
File "/home/trond/compile/tools/membase/leak/ep-engine/management/mc_bin_client.py", line 56, in _sendCmd
self.s.send(msg + extraHeader + key + val)
socket.error: [Errno 32] Broken pipe
Please note that I'm not saying that we should remove the tracebacks in all cases, but we should not print a traceback for normal/expected failures like this...