doc: How to pdb under systemd
Add a section to the systemd doc describing how to use regular pdb in a
systemd environment.
Change-Id: Ib1f616f407eccc087de1c60624fa74e2555971c2
diff --git a/doc/source/systemd.rst b/doc/source/systemd.rst
index 60a7719..f9971ab 100644
--- a/doc/source/systemd.rst
+++ b/doc/source/systemd.rst
@@ -98,8 +98,7 @@
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 @@
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
============