libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From to...@apache.org
Subject [6/7] git commit: Add troubleshoting section to the docs.
Date Sat, 03 Aug 2013 16:00:42 GMT
Add troubleshoting section to the docs.


Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/75ac8ca5
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/75ac8ca5
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/75ac8ca5

Branch: refs/heads/trunk
Commit: 75ac8ca5f4524f83750508129080ec8b1c5e7f87
Parents: b6be3e7
Author: Tomaz Muraus <tomaz@apache.org>
Authored: Sat Aug 3 17:56:12 2013 +0200
Committer: Tomaz Muraus <tomaz@apache.org>
Committed: Sat Aug 3 17:56:12 2013 +0200

----------------------------------------------------------------------
 docs/troubleshooting.rst | 48 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 48 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/75ac8ca5/docs/troubleshooting.rst
----------------------------------------------------------------------
diff --git a/docs/troubleshooting.rst b/docs/troubleshooting.rst
new file mode 100644
index 0000000..78cb6e0
--- /dev/null
+++ b/docs/troubleshooting.rst
@@ -0,0 +1,48 @@
+Troubleshooting
+===============
+
+This page contains various tips which can help you troubleshoot and debug
+code with interfaces with libcloud.
+
+Debugging
+---------
+
+Libcloud has a special debug mode which when enabled outputs all the outgoing
+HTTP requests and all the incoming HTTP responses. Output also includes cURL
+commands which can be used to re-produce the requests.
+
+When this mode is enabled and if ``paramiko`` library is installed (used for
+deployment), paramiko library log level is also set to ``DEBUG`` which helps
+with debugging the deployment issues.
+
+To enable it, set ``LIBCLOUD_DEBUG`` environment variable and make it point
+to a file where the output should be saved.
+
+For example if you want the output to be logged to the standard error (on
+Unix) you can set it to ``/dev/stderr``:
+
+.. sourcecode:: bash
+
+    LIBCLOUD_DEBUG=/dev/stderr python my_script.py.
+
+Example output:
+
+.. sourcecode:: bash
+
+    # -------- begin 4431824872 request ----------
+    curl -i -X GET -H 'Host: s3.amazonaws.com' -H 'X-LC-Request-ID: 4431824872' -H 'Content-Length:
0' -H 'User-Agent: libcloud/0.6.0-beta1 (Amazon S3 (standard))' 'https://s3.amazonaws.com:443/?AWSAccessKeyId=foo&Signature=bar'
+    # -------- begin 4431824872:4431825232 response ----------
+    HTTP/1.1 200 OK
+    X-Amz-Id-2: 1234
+    Server: AmazonS3
+    Transfer-Encoding: chunked
+    X-Amz-Request-Id: FFFFFFFFFF
+    Date: Tue, 01 Nov 2011 22:29:11 GMT
+    Content-Type: application/xml
+
+    171
+    <?xml version="1.0" encoding="UTF-8"?>
+    <ListAllMyBucketsResult xmlns="http://s3.amazonaws.com/doc/2006-03-01/"><Owner><ID>sada8932dsa8d30i</ID><DisplayName>kami</DisplayName></Owner><Buckets><Bucket><Name>test34324323</Name><CreationDate>2011-11-01T22:17:23.000Z</CreationDate></Bucket></Buckets></ListAllMyBucketsResult>
+    0
+
+    # -------- end 4431824872:4431825232 response ----------


Mime
View raw message