how to debug swift

Asked by Kenneth Jiang

I ran into a problem with swift and I was trying to debug it. When I did

python -m pdb /usr/bin/swift-proxy-server --verbose /etc/swift/proxy-server.conf

the debugging session would exit after this:
capture_stdio(logger)

I commented out this line, but ran into another problem, swift forks processes to handle request. If I break in a middle of a sub-process, pdb input/output is messed up (it doesn't echo and shows other strange behaviors).

I'd appreciate if someone can help me with instructions on debugging swift.

Question information

Language:
English Edit question
Status:
Solved
For:
OpenStack Object Storage (swift) Edit question
Assignee:
No assignee Edit question
Solved by:
yaguang wang
Solved:
Last query:
Last reply:
Revision history for this message
Best yaguang wang (ywang19) said :
#1

setting workers to 0 in proxy-server.conf will avoid sub process, it may help solve your issues.

Revision history for this message
Kenneth Jiang (kenneth-jiang) said :
#2

Thanks amwang, that solved my question.

Revision history for this message
Sybrand (sybrand-strauss) said :
#3

F.y.i - if like me, you couldn't get pdb to work debugging the WSGI auth component. (I tried doing what amwang said, but I couldn't step into any of the processes in the pipeline)

You can use embedded debugging with Winpdb (see http://winpdb.org/docs/embedded-debugging/)

Revision history for this message
Kenneth Jiang (kenneth-jiang) said :
#4

Thanks Sybrand. Winpdb looks like a cute little tool. Will find a chance to try it sometime.

Revision history for this message
dangming (743759846-7) said :
#5

thanks,I have ran into same question,it help me to fix it