<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">On 10/31/2013 2:53 PM, Rajshree Thorat
      wrote:<br>
    </div>
    <blockquote cite="mid:52722174.9060808@gslab.com" type="cite">
      <meta http-equiv="content-type" content="text/html;
        charset=ISO-8859-1">
      <div class="moz-cite-prefix">Hi All,<br>
        <br>
        I have successfully configured Openstack Havana with xen
        hypervisor(XCP). Initially creating/deleting<br>
        instances from OpenStack works as expected but networking
        part(neutron with OpenvSwitch) was not working.<br>
        <br>
        The steps I performed to make it work are as below:<br>
        <br>
        Normal flow to get DHCP IP:<br>
        <br>
        - VM boots and asks for an IP through DHCP<br>
        - The Nova Compute has a GRE tunnel to the OpenStack Networking
        node where the neutron/openvSwitch agent provides an IP to the
        VM.<br>
        <br>
        VM <---> Nova Compute Node <---> GRE tunnel
        <---> OpenStack Networking node <---> DHCP agent<br>
        <br>
        In case of XCP when guest VM boots it sends a DHCP request to
        dom0 through xenapi but dom0 unable to communicate with<br>
        OpenStack Networking node over GRE tunnel.<br>
        <br>
        To allow VM's to communicate with Network node over GRE tunnel,
        we can assign one more nic(eth2) which is part of xapi1 of dom0<br>
        to nova-compute and add eth2 to br-int on nova-compute.<br>
        <br>
        xapi1 is a openstack network bridge in dom0.<br>
        <br>
        Now the packet will traverse as<br>
        <br>
        VM --> xapi1(dom0) --> eth2(compute) -->
        br-tun(compute) --> Network-node(over GRE tunnel)<br>
        <br>
        VM <-- xapi1(dom0) <-- eth2(compute) <--
        br-tun(compute) <-- Network-node(over GRE tunnel)<br>
        <br>
        Inbuilt Openvswitch-controller configures the v-switches to
        allow only specific flows which<br>
        matches the rules installed on them. Even if we add eth2 to
        br-int, we will also need to add<br>
        generic rules to br-tun such that they are able to pass the
        packets received from eth2<br>
        to br-int, then to br-tun and then to network node over GRE
        tunnel. That's it you are done !<br>
        <br>
        dump-flows before adding rules:<br>
        <br>
        root@compute:~# ovs-ofctl dump-flows br-tun<br>
        NXST_FLOW reply (xid=0x4):<br>
         cookie=0x0, duration=3.248s, table=0, n_packets=0, n_bytes=0,
        idle_age=3, priority=1,in_port=1 actions=resubmit(,1)<br>
         cookie=0x0, duration=2.069s, table=0, n_packets=0, n_bytes=0,
        idle_age=2, priority=1,in_port=2 actions=resubmit(,2)<br>
         cookie=0x0, duration=3.187s, table=0, n_packets=1, n_bytes=70,
        idle_age=2, priority=0 actions=drop<br>
         cookie=0x0, duration=3.066s, table=1, n_packets=0, n_bytes=0,
        idle_age=3,
        priority=0,dl_dst=01:00:00:00:00:00/01:00:00:00:00:00
        actions=resubmit(,21)<br>
         cookie=0x0, duration=3.126s, table=1, n_packets=0, n_bytes=0,
        idle_age=3,
        priority=0,dl_dst=00:00:00:00:00:00/01:00:00:00:00:00
        actions=resubmit(,20)<br>
         cookie=0x0, duration=3.006s, table=2, n_packets=0, n_bytes=0,
        idle_age=3, priority=0 actions=drop<br>
         cookie=0x0, duration=2.946s, table=3, n_packets=0, n_bytes=0,
        idle_age=2, priority=0 actions=drop<br>
         cookie=0x0, duration=2.886s, table=10, n_packets=0, n_bytes=0,
        idle_age=2, priority=1
actions=learn(table=20,hard_timeout=300,priority=1,NXM_OF_VLAN_TCI[0..11],NXM_OF_ETH_DST[]=NXM_OF_ETH_SRC[],load:0->NXM_OF_VLAN_TCI[],load:NXM_NX_TUN_ID[]->NXM_NX_TUN_ID[],output:NXM_OF_IN_PORT[]),output:1<br>
         cookie=0x0, duration=2.825s, table=20, n_packets=0, n_bytes=0,
        idle_age=2, priority=0 actions=resubmit(,21)<br>
         cookie=0x0, duration=2.766s, table=21, n_packets=0, n_bytes=0,
        idle_age=2, priority=0 actions=drop<br>
        <br>
        Add flows:<br>
        <br>
        root@compute:~# ovs-vsctl add-port br-int eth2 tag=1<br>
        <br>
                                     Here the
        neutron-plugin-openvswitch-agent has put port eth2 into VLAN 1
        (tag 1) on br-int.<br>
        <br>
        root@compute:~# ovs-ofctl add-flow br-tun
        priority=3,in_port=1,dl_vlan=1,actions=set_tunnel:0x1,NORMAL<br>
                <br>
                                       It is for outgoing traffic from
        br-int VLAN 1 - it sets the GRE key to 0x1 and gives it the
        NORMAL action.<br>
        <br>
        root@compute:~# ovs-ofctl add-flow br-tun
        priority=2,tun_id=0x1,actions=mod_vlan_vid:1,NORMAL<br>
        <br>
                                      This flow accepts incoming
        traffic.<br>
        <br>
        dump-flows after adding rules:<br>
        <br>
        root@compute:~# ovs-ofctl dump-flows br-tun<br>
        NXST_FLOW reply (xid=0x4):<br>
         cookie=0x0, duration=115.467s, table=0, n_packets=5,
        n_bytes=958, idle_age=58, priority=2,tun_id=0x1
        actions=mod_vlan_vid:1,NORMAL<br>
         cookie=0x0, duration=133.203s, table=0, n_packets=5,
        n_bytes=830, idle_age=61, priority=3,in_port=1,dl_vlan=1
        actions=set_tunnel:0x1,NORMAL<br>
         cookie=0x0, duration=343.011s, table=0, n_packets=7,
        n_bytes=1230, idle_age=186, priority=1,in_port=1
        actions=resubmit(,1)<br>
         cookie=0x0, duration=341.832s, table=0, n_packets=0, n_bytes=0,
        idle_age=341, priority=1,in_port=2 actions=resubmit(,2)<br>
         cookie=0x0, duration=342.95s, table=0, n_packets=4,
        n_bytes=300, idle_age=334, priority=0 actions=drop<br>
         cookie=0x0, duration=342.829s, table=1, n_packets=7,
        n_bytes=1230, idle_age=186,
        priority=0,dl_dst=01:00:00:00:00:00/01:00:00:00:00:00
        actions=resubmit(,21)<br>
         cookie=0x0, duration=342.889s, table=1, n_packets=0, n_bytes=0,
        idle_age=342,
        priority=0,dl_dst=00:00:00:00:00:00/01:00:00:00:00:00
        actions=resubmit(,20)<br>
         cookie=0x0, duration=342.769s, table=2, n_packets=0, n_bytes=0,
        idle_age=342, priority=0 actions=drop<br>
         cookie=0x0, duration=342.709s, table=3, n_packets=0, n_bytes=0,
        idle_age=342, priority=0 actions=drop<br>
         cookie=0x0, duration=342.649s, table=10, n_packets=0,
        n_bytes=0, idle_age=342, priority=1
actions=learn(table=20,hard_timeout=300,priority=1,NXM_OF_VLAN_TCI[0..11],NXM_OF_ETH_DST[]=NXM_OF_ETH_SRC[],load:0->NXM_OF_VLAN_TCI[],load:NXM_NX_TUN_ID[]->NXM_NX_TUN_ID[],output:NXM_OF_IN_PORT[]),output:1<br>
         cookie=0x0, duration=342.588s, table=20, n_packets=0,
        n_bytes=0, idle_age=342, priority=0 actions=resubmit(,21)<br>
         cookie=0x0, duration=342.529s, table=21, n_packets=7,
        n_bytes=1230, idle_age=186, priority=0 actions=drop<br>
        <br>
        This works for me. Please correct me if I am breaking any
        functionality of neutron.<br>
        <br>
        Regards,<br>
        Rajshree<br>
        <br>
        On 10/4/2013 7:57 PM, Bob Ball wrote:<br>
      </div>
      <blockquote
cite="mid:BB824EA959B82F43820FFEE5E6B00AA6102F50@AMSPEX01CL01.citrite.net"
        type="cite">
        <div class="WordSection1">
          <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">While


              I’m a big supporter of xenserver-core (which is the name
              of the packages Endre mentions) – the packages and their
              OpenStack integration is currently very new.  We’re
              working through a number of issues in the packaging at the
              moment and will hopefully have a more stable point in a
              few weeks’ time.<o:p></o:p></span></p>
          <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
          <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">For

              the time being I would personally recommend using
              XenServer 6.2 – which is also free, unlicensed and fully
              open source.<o:p></o:p></span></p>
          <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
          <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">On

              the other hand, if you chose to use xenserver-core and
              find issues, please report them on github (<a
                moz-do-not-send="true"
                href="https://github.com/xapi-project/xenserver-core/">https://github.com/xapi-project/xenserver-core/</a>)
              and we’ll get them fixed as soon as we can – or submit a
              pull request if you find the fix yourself!<o:p></o:p></span></p>
          <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
          <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Bob<o:p></o:p></span></p>
          <p class="MsoNormal"><a moz-do-not-send="true"
              name="_MailEndCompose"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></a></p>
          <div style="border:none;border-left:solid blue
            1.5pt;padding:0cm 0cm 0cm 4.0pt">
            <div>
              <div style="border:none;border-top:solid #B5C4DF
                1.0pt;padding:3.0pt 0cm 0cm 0cm">
                <p class="MsoNormal"><b><span
style="font-size:10.0pt;font-family:"Tahoma","sans-serif""
                      lang="EN-US">From:</span></b><span
style="font-size:10.0pt;font-family:"Tahoma","sans-serif""
                    lang="EN-US"> Endre Karlson [<a
                      moz-do-not-send="true"
                      class="moz-txt-link-freetext"
                      href="mailto:endre.karlson@gmail.com">mailto:endre.karlson@gmail.com</a>]
                    <br>
                    <b>Sent:</b> 04 October 2013 14:57<br>
                    <b>To:</b> Rajshree Thorat<br>
                    <b>Cc:</b> <a moz-do-not-send="true"
                      class="moz-txt-link-abbreviated"
                      href="mailto:openstack@ask.openstack.org">openstack@ask.openstack.org</a>;
                    openstack Users<br>
                    <b>Subject:</b> Re: [Openstack] Openstack XCP with
                    OVS Quantum<o:p></o:p></span></p>
              </div>
            </div>
            <p class="MsoNormal"><o:p> </o:p></p>
            <div>
              <p class="MsoNormal">I'll suggest you to move away from
                XCP if you can and check out the new work done by Citrix
                to make XenServer packages / functionality available to
                be installed on stuff like CentOS 6 and Ubuntu + others.<o:p></o:p></p>
              <div>
                <p class="MsoNormal"><o:p> </o:p></p>
              </div>
              <div>
                <p class="MsoNormal">Endre.<o:p></o:p></p>
              </div>
            </div>
            <div>
              <p class="MsoNormal" style="margin-bottom:12.0pt"><o:p> </o:p></p>
              <div>
                <p class="MsoNormal">2013/10/4 Rajshree Thorat <<a
                    moz-do-not-send="true"
                    href="mailto:rajshree.thorat@gslab.com">rajshree.thorat@gslab.com</a>><o:p></o:p></p>
                <p class="MsoNormal">Hi,<br>
                  <br>
                  I am trying to use Openstack Grizzly to control XCP
                  hypervisor with quantum ovs plugin. I tried with the
                  steps which are mentioned in official document (<a
                    moz-do-not-send="true"
href="http://docs.openstack.org/grizzly/openstack-compute/install/apt/content/introduction-to-xen.html#xen-config-reference"
                    target="_blank">http://docs.openstack.org/grizzly/openstack-compute/install/apt/content/introduction-to-xen.html#xen-config-reference</a>)
                  but it doesn't work for me. I am not able to start
                  nova-compute service. It is giving me following error:<br>
                  <br>
                  2013-10-04 18:23:44.861 32548 INFO nova.manager [-]
                  Skipping periodic task _periodic_update_dns because
                  its interval is negative<br>
                  2013-10-04 18:23:44.902 32548 INFO nova.virt.driver
                  [-] Loading compute driver 'xenapi.XenAPIDriver'<br>
                  2013-10-04 18:23:44.922 32548 CRITICAL nova [-] [Errno
                  111] ECONNREFUSED<br>
                  2013-10-04 18:23:44.922 32548 TRACE nova Traceback
                  (most recent call last):<br>
                  2013-10-04 18:23:44.922 32548 TRACE nova   File
                  "/usr/bin/nova-compute", line 83, in <module><br>
                  2013-10-04 18:23:44.922 32548 TRACE nova    
                  db_allowed=False)<br>
                  2013-10-04 18:23:44.922 32548 TRACE nova   File
                  "/usr/lib/python2.7/dist-packages/nova/service.py",
                  line 534, in create<br>
                  2013-10-04 18:23:44.922 32548 TRACE nova    
                  db_allowed=db_allowed)<br>
                  2013-10-04 18:23:44.922 32548 TRACE nova   File
                  "/usr/lib/python2.7/dist-packages/nova/service.py",
                  line 413, in __init__<br>
                  2013-10-04 18:23:44.922 32548 TRACE nova    
                  self.manager = manager_class(host=self.host, *args,
                  **kwargs)<br>
                  2013-10-04 18:23:44.922 32548 TRACE nova   File
                  "/usr/lib/python2.7/dist-packages/nova/compute/manager.py",
                  line 353, in __init__<br>
                  2013-10-04 18:23:44.922 32548 TRACE nova    
                  self.driver = driver.load_compute_driver(self.virtapi,
                  compute_driver)<br>
                  2013-10-04 18:23:44.922 32548 TRACE nova   File
                  "/usr/lib/python2.7/dist-packages/nova/virt/driver.py",
                  line 931, in load_compute_driver<br>
                  2013-10-04 18:23:44.922 32548 TRACE nova     virtapi)<br>
                  2013-10-04 18:23:44.922 32548 TRACE nova   File
                  "/usr/lib/python2.7/dist-packages/nova/openstack/common/importutils.py",
                  line 51, in import_object_ns<br>
                  2013-10-04 18:23:44.922 32548 TRACE nova     return
                  import_class(import_value)(*args, **kwargs)<br>
                  2013-10-04 18:23:44.922 32548 TRACE nova   File
                  "/usr/lib/python2.7/dist-packages/nova/virt/xenapi/driver.py",
                  line 139, in __init__<br>
                  2013-10-04 18:23:44.922 32548 TRACE nova    
                  self._session = XenAPISession(url, username, password,
                  self.virtapi)<br>
                  2013-10-04 18:23:44.922 32548 TRACE nova   File
                  "/usr/lib/python2.7/dist-packages/nova/virt/xenapi/driver.py",
                  line 630, in __init__<br>
                  2013-10-04 18:23:44.922 32548 TRACE nova     url =
                  self._create_first_session(url, user, pw, exception)<br>
                  2013-10-04 18:23:44.922 32548 TRACE nova   File
                  "/usr/lib/python2.7/dist-packages/nova/virt/xenapi/driver.py",
                  line 641, in _create_first_session<br>
                  2013-10-04 18:23:44.922 32548 TRACE nova
                  session.login_with_password(user, pw)<br>
                  2013-10-04 18:23:44.922 32548 TRACE nova   File
                  "/usr/local/lib/python2.7/dist-packages/XenAPI.py",
                  line 182, in <lambda><br>
                  2013-10-04 18:23:44.922 32548 TRACE nova     return
                  lambda *params: self._login(name, params)<br>
                  2013-10-04 18:23:44.922 32548 TRACE nova   File
                  "/usr/local/lib/python2.7/dist-packages/XenAPI.py",
                  line 148, in _login<br>
                  2013-10-04 18:23:44.922 32548 TRACE nova     result =
                  _parse_result(getattr(self, 'session.%s' %
                  method)(*params))<br>
                  2013-10-04 18:23:44.922 32548 TRACE nova   File
                  "/usr/lib/python2.7/xmlrpclib.py", line 1224, in
                  __call__<br>
                  2013-10-04 18:23:44.922 32548 TRACE nova     return
                  self.__send(self.__name, args)<br>
                  2013-10-04 18:23:44.922 32548 TRACE nova   File
                  "/usr/lib/python2.7/xmlrpclib.py", line 1578, in
                  __request<br>
                  2013-10-04 18:23:44.922 32548 TRACE nova    
                  verbose=self.__verbose<br>
                  2013-10-04 18:23:44.922 32548 TRACE nova   File
                  "/usr/lib/python2.7/xmlrpclib.py", line 1264, in
                  request<br>
                  2013-10-04 18:23:44.922 32548 TRACE nova     return
                  self.single_request(host, handler, request_body,
                  verbose)<br>
                  2013-10-04 18:23:44.922 32548 TRACE nova   File
                  "/usr/lib/python2.7/xmlrpclib.py", line 1292, in
                  single_request<br>
                  2013-10-04 18:23:44.922 32548 TRACE nova    
                  self.send_content(h, request_body)<br>
                  2013-10-04 18:23:44.922 32548 TRACE nova   File
                  "/usr/lib/python2.7/xmlrpclib.py", line 1439, in
                  send_content<br>
                  2013-10-04 18:23:44.922 32548 TRACE nova
                  connection.endheaders(request_body)<br>
                  2013-10-04 18:23:44.922 32548 TRACE nova   File
                  "/usr/lib/python2.7/httplib.py", line 954, in
                  endheaders<br>
                  2013-10-04 18:23:44.922 32548 TRACE nova
                  self._send_output(message_body)<br>
                  2013-10-04 18:23:44.922 32548 TRACE nova   File
                  "/usr/lib/python2.7/httplib.py", line 814, in
                  _send_output<br>
                  2013-10-04 18:23:44.922 32548 TRACE nova    
                  self.send(msg)<br>
                  2013-10-04 18:23:44.922 32548 TRACE nova   File
                  "/usr/lib/python2.7/httplib.py", line 776, in send<br>
                  2013-10-04 18:23:44.922 32548 TRACE nova    
                  self.connect()<br>
                  2013-10-04 18:23:44.922 32548 TRACE nova   File
                  "/usr/lib/python2.7/httplib.py", line 757, in connect<br>
                  2013-10-04 18:23:44.922 32548 TRACE nova    
                  self.timeout, self.source_address)<br>
                  2013-10-04 18:23:44.922 32548 TRACE nova   File
                  "/usr/lib/python2.7/dist-packages/eventlet/green/socket.py",
                  line 59, in create_connection<br>
                  2013-10-04 18:23:44.922 32548 TRACE nova     raise
                  error, msg<br>
                  2013-10-04 18:23:44.922 32548 TRACE nova error: [Errno
                  111] ECONNREFUSED<br>
                  2013-10-04 18:23:44.922 32548 TRACE nova<br>
                  <br>
                  It seems network with openvswitch is not configured
                  properly.  Is there any OVS quantum plugin requires to
                  run under dom0?  Is there any document which can
                  briefly describe how Openstack + XCP works with OVS
                  Quantum?<br>
                  <br>
                  Regards,<br>
                  Rajshree<br>
                  <br>
                  _______________________________________________<br>
                  Mailing list: <a moz-do-not-send="true"
                    href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack"
                    target="_blank">
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack</a><br>
                  Post to     : <a moz-do-not-send="true"
                    href="mailto:openstack@lists.openstack.org"
                    target="_blank">openstack@lists.openstack.org</a><br>
                  Unsubscribe : <a moz-do-not-send="true"
                    href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack"
                    target="_blank">
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack</a><o:p></o:p></p>
              </div>
              <p class="MsoNormal"><o:p> </o:p></p>
            </div>
          </div>
        </div>
      </blockquote>
      <br>
    </blockquote>
    <br>
  </body>
</html>