From 0f1ad38c2f7e8d3cd6cce5db959773dc516d836a Mon Sep 17 00:00:00 2001 From: Luis Pabon Date: Wed, 4 Sep 2013 10:01:28 -0400 Subject: [PATCH] Add OpenStack Swift as a git submodule This allows developers to easily insert the python debugger to the OpenStack Swift code which in turn calls gluster-swift. Using 'git submodule' allows developers to not only create a clone of the OpenStack Swift repo locally, but also automatically set the repo to the appropriate tested version. This change also allows us to always match the version of OpenStack Swift that gluster-swift has been tested against. For this change, the submodule of OpenStack Swift has been set to version 1.9.1 which, according to the RDO rpms, it is commit id 95bcd7180c546f91414c2493d343fe1a4ae3ce44. Here is how developers can setup their repo after this change: $ git submodule init $ git submodule update Now that the correct version of the OpenStack Swift code has been cloned to the modules directory, it can be used for debugging during development. First we need to setup a link called 'swift' to point to the python code from the root of the gluster-swift repo as follows: $ ln -s swift modules/swift/swift Here is simple example of how to debug an object PUT command. First, we need to add the following line: `import pdb ; pdb.set_trace` to swift/proxy/controllers/obj.py at line 818. To execute the debug line added above, we can use the following unit test: $ nosetests -v -s -exe test/unit/proxy/test_server.py Change-Id: I01dd58954e5ef139208a1132140c6c83ada82c18 Signed-off-by: Luis Pabon Reviewed-on: http://review.gluster.org/5787 Reviewed-by: Chetan Risbud Tested-by: Chetan Risbud Reviewed-by: Peter Portante --- .gitmodules | 3 +++ modules/swift | 1 + 2 files changed, 4 insertions(+) create mode 100644 .gitmodules create mode 160000 modules/swift diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..cb4321c --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "modules/swift"] + path = modules/swift + url = git://github.com/openstack/swift.git diff --git a/modules/swift b/modules/swift new file mode 160000 index 0000000..95bcd71 --- /dev/null +++ b/modules/swift @@ -0,0 +1 @@ +Subproject commit 95bcd7180c546f91414c2493d343fe1a4ae3ce44