summaryrefslogtreecommitdiffstats
path: root/doc/client/debugging.txt
diff options
context:
space:
mode:
authorSol Jerome <solj@ices.utexas.edu>2010-01-24 18:47:00 +0000
committerSol Jerome <solj@ices.utexas.edu>2010-01-24 18:47:00 +0000
commit7c6c1e10f3cc62acc919123d0067a8a9720aeffa (patch)
treea6f6cb0cc17d41e6ccbc27c2e9f986df2e37c67d /doc/client/debugging.txt
parente3bd887d601dad1be9352768206cbb45a91a8cc7 (diff)
downloadbcfg2-7c6c1e10f3cc62acc919123d0067a8a9720aeffa.tar.gz
bcfg2-7c6c1e10f3cc62acc919123d0067a8a9720aeffa.tar.bz2
bcfg2-7c6c1e10f3cc62acc919123d0067a8a9720aeffa.zip
doc: Add a lot more unsorted stuff from the wiki
Signed-off-by: Sol Jerome <solj@ices.utexas.edu> git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5703 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'doc/client/debugging.txt')
-rw-r--r--doc/client/debugging.txt24
1 files changed, 24 insertions, 0 deletions
diff --git a/doc/client/debugging.txt b/doc/client/debugging.txt
new file mode 100644
index 000000000..c99e73c3e
--- /dev/null
+++ b/doc/client/debugging.txt
@@ -0,0 +1,24 @@
+.. -*- mode: rst -*-
+
+.. _client-debugging:
+
+================
+Client Debugging
+================
+
+When working on the Bcfg2 client, it is helpful to employ a few specific techniques to isolate and remedy problems.
+
+First, running the client with the -f flag allows configuration from a local file, rather than querying the server. This helps rule out server configuration problems, and allows for rapid development. For example: `bcfg2 -f test-config.conf` with the following test-config.conf:
+
+.. code-block:: rst
+
+ <Configuration>
+ <Bundle name="ssh-tests">
+ <Service type="launchd" name="com.openssh.sshd" status="on" />
+ </Bundle>
+ </Configuration>
+
+Next, it is important to look at the interactive mode. This is similar to the interactive mode on the server and provides an interactive Python interpreter with which one may manipulate all the objects in the client. It will setup all the infrastructure so you will have the appropriate objects to play with. It will run the client through once, then present you with an interpreter. Try it out with: `python -i /usr/bin/bcfg2` or, for more fun, a local config file and also enable Debugging and Verbose output with `-d` and `-v`, yielding `python -i /usr/bin/bcfg2 -d -v -f test-config.conf`
+
+Now we just explore; use `dir()` to examine different objects in the client, or run a reconfiguration again by calling `client.run()`
+