how to debug swift

asked 2011-10-18 21:53:28 -0600

kenneth-jiang gravatar image

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.

edit retag flag offensive close merge delete

4 answers

Sort by ยป oldest newest most voted

answered 2011-10-19 03:46:23 -0600

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

edit flag offensive delete link more

answered 2011-10-19 16:46:32 -0600

kenneth-jiang gravatar image

Thanks amwang, that solved my question.

edit flag offensive delete link more

answered 2012-02-01 13:27:16 -0600

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 ( )

edit flag offensive delete link more

answered 2012-02-01 22:35:27 -0600

kenneth-jiang gravatar image

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

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2011-10-18 21:53:28 -0600

Seen: 376 times

Last updated: Feb 01 '12