Ask Your Question
0

how to debug swift

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

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
0

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

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

edit flag offensive delete link more
0

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

kenneth-jiang gravatar image

Thanks amwang, that solved my question.

edit flag offensive delete link more
0

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

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/ (http://winpdb.org/docs/embedded-debug...) )

edit flag offensive delete link more
0

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

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

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

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

Seen: 263 times

Last updated: Feb 01 '12