Sophie

Sophie

distrib > Fedora > 17 > i386 > media > updates > by-pkgid > b50d8ee6d7871fcc13c0677a9364ed59 > files > 341

bcfg2-doc-1.3.0-1.fc17.noarch.rpm



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>Client Debugging &mdash; Bcfg2 1.3.0 documentation</title>
    
    <link rel="stylesheet" href="../_static/default.css" type="text/css" />
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
    
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '../',
        VERSION:     '1.3.0',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="../_static/jquery.js"></script>
    <script type="text/javascript" src="../_static/underscore.js"></script>
    <script type="text/javascript" src="../_static/doctools.js"></script>
    <script type="text/javascript" src="../_static/sidebar.js"></script>
    <link rel="shortcut icon" href="../_static/favicon.ico"/>
    <link rel="top" title="Bcfg2 1.3.0 documentation" href="../index.html" />
    <link rel="up" title="The Bcfg2 Client" href="index.html" />
    <link rel="next" title="The Bcfg2 Reporting System" href="../reports/index.html" />
    <link rel="prev" title="Agent Functionality using SSH" href="agent.html" />
 
<link rel="stylesheet" href="../_static/bcfg2.css" type=""/>

  </head>
  <body>

<div style="text-align: left; padding: 10px 10px 15px 15px">
<a href="../index.html"><img src="../_static/bcfg2_logo.png" border="0" alt="sampledoc"/></a>
</div>

    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="../reports/index.html" title="The Bcfg2 Reporting System"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="agent.html" title="Agent Functionality using SSH"
             accesskey="P">previous</a> |</li>
	<li><a href="../index.html">home</a> |&nbsp;</li>
	<!--<li><a href="../search.html">search</a> |&nbsp;</li>-->
	<li><a href="../help/index.html">help</a> |&nbsp;</li>
	<li><a href="../contents.html">documentation </a> &raquo;</li>

          <li><a href="../contents.html" >Bcfg2 documentation 1.3.0</a> &raquo;</li>
          <li><a href="index.html" accesskey="U">The Bcfg2 Client</a> &raquo;</li> 
      </ul>
    </div>
  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <div class="section" id="client-debugging">
<span id="id1"></span><h1>Client Debugging<a class="headerlink" href="#client-debugging" title="Permalink to this headline">ΒΆ</a></h1>
<p>When working on the Bcfg2 client, it is helpful to employ a few specific
techniques to isolate and remedy problems.</p>
<p>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:
<tt class="docutils literal"><span class="pre">bcfg2</span> <span class="pre">-f</span> <span class="pre">test-config.conf</span></tt> with the following test-config.conf:</p>
<div class="highlight-rst"><div class="highlight"><pre><span class="nt">&lt;Configuration&gt;</span>
    &lt;Bundle name=&quot;ssh-tests&quot;&gt;
        &lt;Service type=&quot;launchd&quot; name=&quot;com.openssh.sshd&quot; status=&quot;on&quot; /&gt;
    &lt;/Bundle&gt;
<span class="nt">&lt;/Configuration&gt;</span>
</pre></div>
</div>
<p>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: <tt class="docutils literal"><span class="pre">python</span> <span class="pre">-i</span>
<span class="pre">/usr/bin/bcfg2</span></tt> or, for more fun, a local config file and also enable
Debugging and Verbose output with <cite>-d</cite> and <cite>-v</cite>, yielding <tt class="docutils literal"><span class="pre">python</span> <span class="pre">-i</span>
<span class="pre">/usr/bin/bcfg2</span> <span class="pre">-d</span> <span class="pre">-v</span> <span class="pre">-f</span> <span class="pre">test-config.conf</span></tt>.</p>
<p>Now we just explore; use <tt class="docutils literal"><span class="pre">dir()</span></tt> to examine different objects in the
client, or run a reconfiguration again by calling <cite>client.run()</cite></p>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar">
        <div class="sphinxsidebarwrapper">
  <h4>Previous topic</h4>
  <p class="topless"><a href="agent.html"
                        title="previous chapter">Agent Functionality using SSH</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="../reports/index.html"
                        title="next chapter">The Bcfg2 Reporting System</a></p>
  <h3>This Page</h3>
  <ul class="this-page-menu">
    <li><a href="../_sources/client/debugging.txt"
           rel="nofollow">Show Source</a></li>
  </ul>
<div id="searchbox" style="display: none">
  <h3>Quick search</h3>
    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" />
      <input type="submit" value="Go" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
    <p class="searchtip" style="font-size: 90%">
    Enter search terms or a module, class or function name.
    </p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="../reports/index.html" title="The Bcfg2 Reporting System"
             >next</a> |</li>
        <li class="right" >
          <a href="agent.html" title="Agent Functionality using SSH"
             >previous</a> |</li>
	<li><a href="../index.html">home</a> |&nbsp;</li>
	<!--<li><a href="../search.html">search</a> |&nbsp;</li>-->
	<li><a href="../help/index.html">help</a> |&nbsp;</li>
	<li><a href="../contents.html">documentation </a> &raquo;</li>

          <li><a href="../contents.html" >Bcfg2 documentation 1.3.0</a> &raquo;</li>
          <li><a href="index.html" >The Bcfg2 Client</a> &raquo;</li> 
      </ul>
    </div>
    <div class="footer">
        &copy; Copyright 2009-2013, Narayan Desai.
      Last updated on Mar 20, 2013.
      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3.
    </div>
  </body>
</html>