Merge "doc: How to pdb under systemd"

This commit is contained in:
Jenkins 2017-09-07 22:17:52 +00:00 committed by Gerrit Code Review
commit 0ad8fc5be9

View File

@ -98,8 +98,7 @@ Follow logs for a specific service::
Following logs for multiple services simultaneously::
journalctl -f --unit devstack@n-cpu.service --unit
devstack@n-cond.service
journalctl -f --unit devstack@n-cpu.service --unit devstack@n-cond.service
or you can even do wild cards to follow all the nova services::
@ -121,6 +120,29 @@ left/right arrow keys.
See ``man 1 journalctl`` for more.
Debugging with pdb
==================
In order to break into a regular pdb session on a systemd-controlled
service, you need to invoke the process manually - that is, take it out
of systemd's control.
Discover the command systemd is using to run the service::
systemctl show devstack@n-sch.service -p ExecStart --no-pager
Stop the systemd service::
sudo systemctl stop devstack@n-sch.service
Inject your breakpoint in the source, e.g.::
import pdb; pdb.set_trace()
Invoke the command manually::
/usr/local/bin/nova-scheduler --config-file /etc/nova/nova.conf
Known Issues
============