
"lifuqiong" <lifuqiong@cncloudsec.com> writes:
I know it’s a multithreaded application , and debug vdsm is a very difficult job, but without debug, I don’t know which code I should replace or logging, Is there any remote debug solution like ovirt engine? I found that
I can do remote debug in simple python application , but I didn’t success yet remote debugging vdsm.
As Michal mentioned, making a breakpoint in Vdsm may break things due to the stopped execution of the given thread. Inserting logging messages to proper places of the code, where you need to get some information about the runtime state, is typically much simpler and good enough solution. If you still want to try more interactive approach and need to access `vdsm' user, you can change the login shell of `vdsm' account to /bin/sh and then use `su - vdsm' from root account. But I don't recommend doing that on any production system.
Now one of our case I want to consider using ovirt as our solution , we may do little change over ovirt. but as described above, without debug , we can hardly understand vdsm clearly and cannot do correctly code change.
Is there some good advice ?
If you want to study Vdsm runtime execution, read the logs, there's plenty of information there. When you are interested in a particular place in the source code, where you intend to perform the changes, and some information is missing, simply add your own debugging calls there, restart Vdsm and watch the log. I do it all the time and it works. :-)