<html><body><div style="font-family: times new roman, new york, times, serif; font-size: 12pt; color: #000000"><div>Thanks a lot, this works, i will update the wiki.</div><div><br></div><div>Gal.</div><hr id="zwchr"><div style="color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><b>From: </b>"Henry Gessau" <gessau@cisco.com><br><b>To: </b>openstack-dev@lists.openstack.org<br><b>Sent: </b>Wednesday, June 11, 2014 2:41:47 PM<br><b>Subject: </b>Re: [openstack-dev] [Neutron] Debugging Devstack Neutron with        Pycharm<br><div><br></div>
  
    
  
  
    <div class="moz-cite-prefix">Gal Sagie wrote:<br>
    </div>
    <blockquote cite="mid:380344871.6364052.1402311545792.JavaMail.root@vmware.com">
      
      <div style="font-family: times new roman, new york, times, serif;
        font-size: 12pt; color: #000000">I am trying to debug devstack
        Neutron with Pycharm, i have found here (<a href="https://wiki.openstack.org/wiki/NeutronDevelopment#How_to_debug_Neutron_.28and_other_OpenStack_projects_probably_.29" target="_blank">https://wiki.openstack.org/wiki/NeutronDevelopment#How_to_debug_Neutron_.28and_other_OpenStack_projects_probably_.29</a>)
        <div style="color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;">
          <div style="font-family: times new roman, new york, times,
            serif; font-size: 12pt; color: #000000">
            <div>That i need to change the neutron server code to
              this=><b style="color: #333333; font-family: 'Arial
                Unicode MS', Arial, sans-serif; font-size: 14px;
                line-height: 20px; background-color: #ffffff;">eventlet.monkey_patch()</b><span style="color: #333333; font-family: 'Arial Unicode MS',
                Arial, sans-serif; font-size: 14px; line-height: 20px;
                background-color: #ffffff;"> To: </span><b style="color:
                #333333; font-family: 'Arial Unicode MS', Arial,
                sans-serif; font-size: 14px; line-height: 20px;
                background-color: #ffffff;">eventlet.monkey_patch(os=False,
                thread=False)</b></div>
          </div>
        </div>
      </div>
    </blockquote>
    I don't need to do this. But I do need to go into the PyCharm
    settings under Python Debugger and enable "Gevent compatible
    debugging".<br>
    <blockquote cite="mid:380344871.6364052.1402311545792.JavaMail.root@vmware.com">
      <div style="font-family: times new roman, new york, times, serif;
        font-size: 12pt; color: #000000">
        <div style="color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;">
          <div style="font-family: times new roman, new york, times,
            serif; font-size: 12pt; color: #000000">
            <div><br>
            </div>
            <div>I have done so, debug seems to run, but when i am
              trying to initiate commands from the CLI i get this:</div>
            <div>
              <p>gal@ubuntu:~/devstack$ neutron net-list<br>
                Connection to neutron failed: Maximum attempts reached</p>
            </div>
          </div>
        </div>
      </div>
    </blockquote>
    Are you sure you have sourced openrc correctly for the credentials?<br>
    <blockquote cite="mid:380344871.6364052.1402311545792.JavaMail.root@vmware.com">
      <div style="font-family: times new roman, new york, times, serif;
        font-size: 12pt; color: #000000">
        <div style="color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;">
          <div style="font-family: times new roman, new york, times,
            serif; font-size: 12pt; color: #000000">
            <div>
              <p>(the server seems to run ok...)</p>
              <p><span style="font-size: 12pt;">Any help is appreciated
                  as i am trying to learn and understand main flows by
                  debugging the code locally.</span></p>
              <br>
            </div>
          </div>
        </div>
      </div>
    </blockquote>
    First I start devstack in offline mode.<br>
        OFFLINE=True ./stack.sh<br>
    <br>
    Once it is running I go to the neutron window in screen.<br>
    There I stop neutron-server with ctrl-C, and press up-arrow to view
    the start command.<br>
    <br>
    To run neutron-server in the PyCharm debugger edit the Run/Debug
    configuration with the following settings:<br>
    <br>
    Script: /usr/local/bin/neutron-server<br>
    Script params: --config-file /etc/neutron/neutron.conf --config-file
    /etc/neutron/plugins/ml2/ml2_conf.ini<br>
        # I got this from the screen window where I stopped neutron<br>
    Working directory: /opt/stack/neutron<br>
    <br>
    Now restart neutron from PyCharm instead of screen.<br>
    <br>
  

<br>_______________________________________________<br>OpenStack-dev mailing list<br>OpenStack-dev@lists.openstack.org<br>http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev<br></div><div><br></div></div></body></html>