[lxc-devel] [lxd/master] doc/debugging.md: Add hacking guide

techtonik on Github lxc-bot at linuxcontainers.org
Wed Oct 26 20:08:24 UTC 2016


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 379 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20161026/b8dac20e/attachment.bin>
-------------- next part --------------
From aaacce3e9e6c33f013e9ba2ce9738922e581c1ce Mon Sep 17 00:00:00 2001
From: anatoly techtonik <techtonik at gmail.com>
Date: Wed, 26 Oct 2016 23:07:02 +0300
Subject: [PATCH] doc/debugging.md: Add hacking guide

---
 doc/debugging.md | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 doc/debugging.md

diff --git a/doc/debugging.md b/doc/debugging.md
new file mode 100644
index 0000000..dbbca86
--- /dev/null
+++ b/doc/debugging.md
@@ -0,0 +1,28 @@
+Here are different ways to help troubleshooting `lxc` and `lxd` code.
+
+#### lxc --debug
+
+Adding `--debug` flag to any client command will give extra information
+about internals. If there is no useful info, it can be added with the
+logging call:
+
+    shared.LogDebugf("Hello: %s", "Debug")
+    
+#### lxc monitor
+
+This command will monitor messages as they appear on remote server.
+
+#### lxd --debug
+
+Shutting down `lxd` server and running it in foreground with `--debug`
+flag will bring a lot of (hopefully) useful info:
+
+    systemctl stop lxd lxd.socket
+    lxd --debug
+
+### Testing REST API through browser
+
+There are browser plugins that provide convenient interface to create,
+modify and replay web requests. Usually they won't pass through LXD
+authorization level. To make that possible, find certificate generated
+for `lxc` and import it into browser.


More information about the lxc-devel mailing list