Debugging OpenStack Swift with Eclipse and Pydev
I have gone through the following links for trying to setup my debugging environment for OpenStack Swift but haven't been able to do so far.
Following is my development environment configuration:
- Ubuntu 12.04 as the host OS (No VM).
- Ubuntu 12.04 as the guest OS running on VMWare Player.
- OpenStack has been successfully deployed on the guest OS using DevStack.
Following the aforementioned links, I have tried setting up my remote debugging environment as follows:
- Eclipse is installed on my host OS along with pydev.
- I have copied the
pysrcfolder from host OS to guest OS.
- Path of pysrc in guest OS is:
- Added line
import sysin the file
- Added line
pydevd.settrace("10.99.13.16", port=5678, stdoutToServer=True, stderrToServer=True,suspend=True)under the function
def put(self, metadata, extension='.data')in file
server.pylocated at '
/opt/stack/swift/swift/objto set a breakpoint.
- Started the debug server on my host OS.
Now I am unable to execute
stack.sscript successfully and it gives the following errors at the end:
Request returned failure status. 500 Internal Server Error Failed to upload image (HTTP 500) ++ failed ++ local r=1 +++ jobs -p ++ kill ++ set +o xtrace
This error is obviously due to my addition of import line in the file
server.py as commenting it out makes it work just fine.
Contents of my localrc file are:
http_proxy=http://10.1.11.11:8080/ https_proxy=http://10.1.11.11:8080/ export no_proxy="localhost,127.0.0.1" HOST_IP=localhost SERVICE_HOST=$HOST_IP IMAGE_HOST=$HOST_IP IDENTITY_HOST=$HOST_IP ADMIN_PASSWORD=password MYSQL_PASSWORD=password RABBIT_PASSWORD=password SERVICE_PASSWORD=password SERVICE_TOKEN=tokentoken enable_service key mysql s-proxy s-object s-container s-account SWIFT_HASH=d40a025f0ebcd7de1650
Please guide me in light of the provided information.