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.
- http://debugopenstack.blogspot.com/
- https://ask.openstack.org/question/815/how-do-i-debug-nova-service-with-eclipse-and-pydev/
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
pysrc
folder from host OS to guest OS. - Path of pysrc in guest OS is:
/usr/lib/python2.7/site-packages/pysrc
. - Added line
sys.path.append('/usr/lib/python2.7/site-packages/pysrc/')
afterimport sys
in the fileswift-init
located at/opt/stack/swift/bin
. - Added line
import pydevd
andpydevd.settrace("10.99.13.16", port=5678, stdoutToServer=True, stderrToServer=True,suspend=True)
under the functiondef put(self, metadata, extension='.data')
in fileserver.py
located at '/opt/stack/swift/swift/obj
to set a breakpoint. - Started the debug server on my host OS.
Now I am unable to execute
stack.s
script successfully and it gives the following errors at the end:
Errors:
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.