<div dir="ltr"><div><br></div><div>taken cisco plugin file from below url: </div><div><br></div><div><a href="https://github.com/CiscoSystems/devstack/blob/bobmel/csr1kv_for_routing_icehouse/lib/neutron_plugins/cisco">https://github.com/CiscoSystems/devstack/blob/bobmel/csr1kv_for_routing_icehouse/lib/neutron_plugins/cisco</a></div><div><br></div><div>Downloaded vem and vem-dkms from the below url:</div><div><br></div><div><a href="https://launchpad.net/~cisco-n1kv/+archive/ubuntu/n1kv-updates/+packages">https://launchpad.net/~cisco-n1kv/+archive/ubuntu/n1kv-updates/+packages</a></div><div><br></div><div>nexus-1000v-vem-dkms_14.04.5.2.1.sk3.1.0.s0.187-1_all.deb </div><div><br></div><div>nexus-1000v-vem_14.04.5.2.1.sk3.1.0.s0.187.orig.tar.gz </div><div><br></div><div>manually installed vem-dkms using:</div><div><br></div><div>sudo dpkg -i nexus-1000v-vem-dkms_14.04.5.2.1.sk3.1.0.s0.187-1_all.deb </div><div><br></div><div>configured VEM.deb in local.conf:</div><div><br></div><div>Q_CISCO_PLUGIN_UVEM_DEB_IMAGE=/var/lib/nexus-1000v-vem_14.04.5.2.1.sk3.1.0.s0.187-1_amd64.deb</div><div><br></div><div>Now I am getting different error:</div><div><br></div><div>$ tail stack.sh.log</div><div><br></div><div>2014-09-25 11:40:27.604 | + die_if_not_set 374 TENANT_ID 'Failure retrieving TENANT_ID for demo'</div><div>2014-09-25 11:40:27.609 | + local exitcode=0</div><div>2014-09-25 11:40:27.614 | + neutron cisco-network-profile-create default_network_profile vlan --segment_range 1-3000 --physical_network test-physnet1</div><div>2014-09-25 11:40:36.596 | Internal Server Error (HTTP 500) (Request-ID: req-23eb2811-cfdc-40c7-b7e0-16a8e53f5068)</div><div>2014-09-25 11:40:36.644 | + exit_trap</div><div>2014-09-25 11:40:36.651 | + local r=1</div><div>2014-09-25 11:40:36.657 | ++ jobs -p</div><div>2014-09-25 11:40:36.662 | + jobs=</div><div>2014-09-25 11:40:36.668 | + [[ -n '' ]]</div><div>2014-09-25 11:40:36.673 | + exit 1</div><div><br></div><div>$ tail -n 200 screen-q-svc.log</div><div><br></div><div>2014-09-25 18:11:19.147 DEBUG neutron.plugins.cisco.db.n1kv_db_v2 [req-9f7ef44c-3cb7-4005-9ce1-d96ade49caae admin 8dce1039369440b9b006f3f9c7247588] get_network_profile() from (pid=2004) get_network_profile /opt/stack/neutron/neutron/plugins/cisco/db/n1kv_db_v2.py:816</div><div>2014-09-25 18:11:19.169 ERROR neutron.api.v2.resource [req-9f7ef44c-3cb7-4005-9ce1-d96ade49caae admin 8dce1039369440b9b006f3f9c7247588] create failed</div><div>2014-09-25 18:11:19.169 TRACE neutron.api.v2.resource Traceback (most recent call last):</div><div>2014-09-25 18:11:19.169 TRACE neutron.api.v2.resource   File "/opt/stack/neutron/neutron/api/v2/resource.py", line 87, in resource</div><div>2014-09-25 18:11:19.169 TRACE neutron.api.v2.resource     result = method(request=request, **args)</div><div>2014-09-25 18:11:19.169 TRACE neutron.api.v2.resource   File "/opt/stack/neutron/neutron/api/v2/base.py", line 448, in create</div><div>2014-09-25 18:11:19.169 TRACE neutron.api.v2.resource     obj = obj_creator(request.context, **kwargs)</div><div>2014-09-25 18:11:19.169 TRACE neutron.api.v2.resource   File "/opt/stack/neutron/neutron/plugins/cisco/n1kv/n1kv_neutron_plugin.py", line 1412, in create_network_profile</div><div>2014-09-25 18:11:19.169 TRACE neutron.api.v2.resource     self).delete_network_profile(context, net_p['id'])</div><div>2014-09-25 18:11:19.169 TRACE neutron.api.v2.resource   File "/opt/stack/neutron/neutron/openstack/common/excutils.py", line 82, in __exit__</div><div>2014-09-25 18:11:19.169 TRACE neutron.api.v2.resource     six.reraise(self.type_, self.value, self.tb)</div><div>2014-09-25 18:11:19.169 TRACE neutron.api.v2.resource   File "/opt/stack/neutron/neutron/plugins/cisco/n1kv/n1kv_neutron_plugin.py", line 1407, in create_network_profile</div><div>2014-09-25 18:11:19.169 TRACE neutron.api.v2.resource     context.tenant_id)</div><div>2014-09-25 18:11:19.169 TRACE neutron.api.v2.resource   File "/opt/stack/neutron/neutron/plugins/cisco/n1kv/n1kv_neutron_plugin.py", line 628, in _send_create_logical_network_request</div><div>2014-09-25 18:11:19.169 TRACE neutron.api.v2.resource     n1kvclient.create_logical_network(network_profile, tenant_id)</div><div>2014-09-25 18:11:19.169 TRACE neutron.api.v2.resource   File "/opt/stack/neutron/neutron/plugins/cisco/n1kv/n1kv_client.py", line 250, in create_logical_network</div><div>2014-09-25 18:11:19.169 TRACE neutron.api.v2.resource     body=body)</div><div>2014-09-25 18:11:19.169 TRACE neutron.api.v2.resource   File "/opt/stack/neutron/neutron/plugins/cisco/n1kv/n1kv_client.py", line 521, in _post</div><div>2014-09-25 18:11:19.169 TRACE neutron.api.v2.resource     headers=headers)</div><div>2014-09-25 18:11:19.169 TRACE neutron.api.v2.resource   File "/opt/stack/neutron/neutron/plugins/cisco/n1kv/n1kv_client.py", line 471, in _do_request</div><div>2014-09-25 18:11:19.169 TRACE neutron.api.v2.resource     raise c_exc.VSMError(reason=replybody)</div><div>2014-09-25 18:11:19.169 TRACE neutron.api.v2.resource VSMError: Internal VSM Error: Resource not found</div><div>2014-09-25 18:11:19.169 TRACE neutron.api.v2.resource .</div><div>2014-09-25 18:11:19.169 TRACE neutron.api.v2.resource</div><div>2014-09-25 18:11:19.173 INFO neutron.wsgi [req-9f7ef44c-3cb7-4005-9ce1-d96ade49caae admin 8dce1039369440b9b006f3f9c7247588] 10.10.2.2 - - [25/Sep/2014 18:11:19] "POST /v2.0/network_profiles.json HTTP/1.1" 500 317 0.849353</div><div><br></div><div>It actually failed while executing "_do_request" method:</div><div><br></div><div>$ vim /opt/stack/neutron/neutron/plugins/cisco/n1kv/n1kv_client.py<br></div><div><br></div><div><snip></div><div><div>        try:</div><div>            resp, replybody = (httplib2.Http(timeout=self.timeout).</div><div>                               request(action,</div><div>                                       method,</div><div>                                       body=body,</div><div>                                       headers=headers))</div><div>        except Exception as e:</div><div>            raise c_exc.VSMConnectionFailed(reason=e)</div><div>        LOG.debug(_("status_code %s"), resp.status)</div><div>        if resp.status == 200:</div><div>            if 'application/xml' in resp['content-type']:</div><div>                return self._deserialize(replybody, resp.status)</div><div>            elif 'text/plain' in resp['content-type']:</div><div>                LOG.debug(_("VSM: %s"), replybody)</div><div>        else:</div><div>          <b>  raise c_exc.VSMError(reason=replybody)</b></div></div><div><br></div><div><snip></div><div><br></div><div>How do I troubleshoot this issue?</div><div><br></div><div>Thanks</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Sep 25, 2014 at 5:18 AM, foss geek <span dir="ltr"><<a href="mailto:thefossgeek@gmail.com" target="_blank">thefossgeek@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><br></div>Hi Pritesh,<div><br></div><div>Thanks.</div><div><br></div><div>I guess the cisco plugin script also not updated one:</div><div><br></div><div><a href="https://github.com/openstack-dev/devstack/blob/stable/icehouse/lib/neutron_plugins/cisco" target="_blank">https://github.com/openstack-dev/devstack/blob/stable/icehouse/lib/neutron_plugins/cisco</a><br></div><div><br></div><div>I have the below two variables in local.conf file but it not used any where in Devstack(devstack/lib/neutron_plugins/cisco).</div><div><br></div><div><div>Q_CISCO_PLUGIN_DEVSTACK_VSM=False</div><div>Q_CISCO_PLUGIN_UVEM_DEB_IMAGE=/var/lib/jenkins/prod/nexus_1000v_vem-12.04-5.2.1.SK1.2.1.29.S0-1.deb</div><div><br></div><div>need your help to get the below script patch:</div><div><br></div><div>$git diff lib/neutron_plugins/cisco</div><div><br></div><div><br></div><div><br></div><div>Thanks</div><div><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Sep 25, 2014 at 4:18 AM, Pritesh Kothari (pritkoth) <span dir="ltr"><<a href="mailto:pritkoth@cisco.com" target="_blank">pritkoth@cisco.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">



<div style="word-wrap:break-word">
Hi ,
<div><br>
</div>
<div>Yep you are right there seems to be a small subset which didn’t make it upstream, here is a patch</div>
<div>which you can apply locally to get it up and running till it goes upstream.</div>
<div><br>
</div>
<div>
<div style="font-family:Calibri,sans-serif;font-size:14px">ubuntu:~/devstack$ git diff</div>
<div style="font-family:Calibri,sans-serif;font-size:14px">diff --git a/lib/neutron b/lib/neutron</div>
<div style="font-family:Calibri,sans-serif;font-size:14px">index 8b883b1..a16909e 100644</div>
<div style="font-family:Calibri,sans-serif;font-size:14px">--- a/lib/neutron</div>
<div style="font-family:Calibri,sans-serif;font-size:14px">+++ b/lib/neutron</div>
<div style="font-family:Calibri,sans-serif;font-size:14px">@@ -382,6 +382,11 @@ function create_neutron_initial_network {</div>
<div style="font-family:Calibri,sans-serif;font-size:14px">     TENANT_ID=$(openstack project list | grep " demo " | get_field 1)</div>
<div style="font-family:Calibri,sans-serif;font-size:14px">     die_if_not_set $LINENO TENANT_ID "Failure retrieving TENANT_ID for demo"</div>
<div style="font-family:Calibri,sans-serif;font-size:14px"> </div>
<div style="font-family:Calibri,sans-serif;font-size:14px">+    # Create the default network profile</div>
<div style="font-family:Calibri,sans-serif;font-size:14px">+    # Create this only for N1KV</div>
<div style="font-family:Calibri,sans-serif;font-size:14px">+    # Use Q_CISCO_PLUGIN_VLAN_RANGES for the segment range values</div>
<div style="font-family:Calibri,sans-serif;font-size:14px">+    neutron cisco-network-profile-create default_network_profile vlan --segment_range 1-3000 --physical_network $PHYSICAL_NETWORK</div>
<div style="font-family:Calibri,sans-serif;font-size:14px">+</div>
<div style="font-family:Calibri,sans-serif;font-size:14px">     # Create a small network</div>
<div style="font-family:Calibri,sans-serif;font-size:14px">     # Since neutron command is executed in admin context at this point,</div>
<div style="font-family:Calibri,sans-serif;font-size:14px">     # ``--tenant-id`` needs to be specified.</div>
<div style="font-family:Calibri,sans-serif;font-size:14px">ubuntu:~/devstack$ </div>
</div>
<div style="font-family:Calibri,sans-serif;font-size:14px"><br>
</div>
<div style="font-family:Calibri,sans-serif;font-size:14px">hope this helps.</div>
<div style="font-family:Calibri,sans-serif;font-size:14px"><br>
</div>
<div style="font-family:Calibri,sans-serif;font-size:14px">Regards,</div>
<div style="font-family:Calibri,sans-serif;font-size:14px">Pritesh</div><div><div>
<div style="font-family:Calibri,sans-serif;font-size:14px"><br>
</div>
<div>
<div>
<div>On Sep 23, 2014, at 10:48 AM, foss geek <<a href="mailto:thefossgeek@gmail.com" target="_blank">thefossgeek@gmail.com</a>> wrote:</div>
<br>
<blockquote type="cite">
<div dir="ltr">
<div class="gmail_extra">
<div class="gmail_quote">Hi Pritesh,</div>
<div class="gmail_quote"><br>
</div>
<div class="gmail_quote">
<div class="gmail_quote">Here is configuration pointed by you.</div>
<div class="gmail_quote"> </div>
<div class="gmail_quote"><a href="http://cisco-neutron-ci.cisco.com/logs/n1kv_neutron/3766/localrc.txt" target="_blank">http://cisco-neutron-ci.cisco.com/logs/n1kv_neutron/3766/localrc.txt</a></div>
<div class="gmail_quote"><br>
</div>
<div class="gmail_quote">I gone through the stack log file of the above configuration and compared with my stack log. In my devstack log there no log of the below command execution but it is there in your log file.<br>
</div>
<div class="gmail_quote"><br>
</div>
<div class="gmail_quote"><b>neutron cisco-network-profile-create default_network_profile vlan --segment_range 1-3000 --physical_network test-physnet1</b><br>
</div>
<div class="gmail_quote"><br>
</div>
<div class="gmail_quote">I also searched devstack icehouse code (taken from, git clone
<a href="https://github.com/openstack-dev/devstack.git" target="_blank">https://github.com/openstack-dev/devstack.git</a> -b stable/icehouse). It seems there no line which executes above command.</div>
<div class="gmail_quote"><br>
</div>
<div class="gmail_quote"> Is there modified version of devstack? or have any additional patch?</div>
<div class="gmail_quote"><br>
</div>
<div class="gmail_quote"><a href="http://cisco-neutron-ci.cisco.com/logs/n1kv_neutron/3766/logs/stack.sh.log.gz" target="_blank">http://cisco-neutron-ci.cisco.com/logs/n1kv_neutron/3766/logs/stack.sh.log.gz</a><br>
</div>
<div class="gmail_quote"><br>
</div>
<div class="gmail_quote"><snip></div>
<div class="gmail_quote"><br>
</div>
<div class="gmail_quote"><b>2014-09-09 15:46:28.847 | ++ echo '| e372231576564c37bad1a234518bb977 | demo               |'</b></div>
<div class="gmail_quote"><b>2014-09-09 15:46:28.861 | ++ read data</b></div>
<div class="gmail_quote"><b>2014-09-09 15:46:28.861 | + TENANT_ID=e372231576564c37bad1a234518bb977</b></div>
<div class="gmail_quote"><b>2014-09-09 15:46:28.862 | + die_if_not_set 383 TENANT_ID 'Failure retrieving TENANT_ID for demo'</b></div>
<div class="gmail_quote"><b>2014-09-09 15:46:28.862 | + local exitcode=0</b></div>
<div class="gmail_quote"><b>2014-09-09 15:46:28.866 | + neutron cisco-network-profile-create default_network_profile vlan --segment_range 1-3000 --physical_network test-physnet1</b></div>
<div class="gmail_quote"><b>2014-09-09 15:46:35.196 | Created a new network_profile:</b></div>
<div class="gmail_quote">2014-09-09 15:46:35.196 | +--------------------+--------------------------------------+</div>
<div class="gmail_quote">2014-09-09 15:46:35.196 | | Field              | Value                                |</div>
<div class="gmail_quote">2014-09-09 15:46:35.196 | +--------------------+--------------------------------------+</div>
<div class="gmail_quote">2014-09-09 15:46:35.196 | | id                 | b9968f2b-295d-499e-af33-8f2e196adec9 |</div>
<div class="gmail_quote">2014-09-09 15:46:35.196 | | multicast_ip_range |                                      |</div>
<div class="gmail_quote">2014-09-09 15:46:35.196 | | name               | default_network_profile              |</div>
<div class="gmail_quote">2014-09-09 15:46:35.196 | | physical_network   | test-physnet1                        |</div>
<div class="gmail_quote">2014-09-09 15:46:35.196 | | segment_range      | 1-3000                               |</div>
<div class="gmail_quote">2014-09-09 15:46:35.196 | | segment_type       | vlan                                 |</div>
<div class="gmail_quote">2014-09-09 15:46:35.196 | | sub_type           |                                      |</div>
<div class="gmail_quote">2014-09-09 15:46:35.196 | +--------------------+--------------------------------------+</div>
<div class="gmail_quote">2014-09-09 15:46:35.220 | + is_baremetal</div>
<div class="gmail_quote">2014-09-09 15:46:35.220 | + [[ g-api,g-reg,key,n-api,n-crt,n-obj,n-cpu,n-cond,cinder,c-sch,c-api,c-vol,n-sch,n-novnc,n-xvnc,n-cauth,rabbit,mysql,q-svc,q-dhcp,q-meta,q-lbaas,tempest =~ baremetal ]]</div>
<div class="gmail_quote">2014-09-09 15:46:35.220 | + return 1</div>
<div class="gmail_quote">2014-09-09 15:46:35.220 | + is_provider_network</div>
<div class="gmail_quote">2014-09-09 15:46:35.220 | + '[' '' == True ']'</div>
<div class="gmail_quote">2014-09-09 15:46:35.220 | + return 1</div>
<div class="gmail_quote">2014-09-09 15:46:35.221 | ++ get_field 2</div>
<div class="gmail_quote">2014-09-09 15:46:35.221 | ++ read data</div>
<div class="gmail_quote">2014-09-09 15:46:35.222 | ++ grep ' id '</div>
<div class="gmail_quote">2014-09-09 15:46:35.223 | ++ neutron net-create --tenant-id e372231576564c37bad1a234518bb977 private</div>
<div class="gmail_quote">2014-09-09 15:46:36.183 | ++ '[' 2 -lt 0 ']'</div>
<div class="gmail_quote">2014-09-09 15:46:36.183 | ++ field='$3'</div>
<div class="gmail_quote">2014-09-09 15:46:36.183 | ++ awk '-F[ \t]*\\|[ \t]*' '{print $3}'</div>
<div class="gmail_quote">2014-09-09 15:46:36.184 | ++ echo '| id                        | 7ec45412-b3c8-4607-8806-acadf01a84af |'</div>
<div class="gmail_quote">2014-09-09 15:46:36.185 | ++ read data</div>
<div class="gmail_quote">2014-09-09 15:46:36.185 | + NET_ID=7ec45412-b3c8-4607-8806-acadf01a84af</div>
<div class="gmail_quote">2014-09-09 15:46:36.185 | + die_if_not_set 419 NET_ID 'Failure creating NET_ID for test-physnet1 e372231576564c37bad1a234518bb977'</div>
<div class="gmail_quote">2014-09-09 15:46:36.185 | + local exitcode=0</div>
<div class="gmail_quote">2014-09-09 15:46:36.188 | ++ get_field 2</div>
<div class="gmail_quote">2014-09-09 15:46:36.188 | ++ read data</div>
<div class="gmail_quote">2014-09-09 15:46:36.188 | ++ grep ' id '</div>
<div class="gmail_quote">2014-09-09 15:46:36.189 | ++ neutron subnet-create --tenant-id e372231576564c37bad1a234518bb977 --ip_version 4 --gateway 10.0.0.1 --name private-subnet 7ec45412-b3c8-4607-8806-acadf01a84af
<a href="http://10.0.0.0/24" target="_blank">10.0.0.0/24</a></div>
<div class="gmail_quote"><br>
</div>
<div class="gmail_quote"><snip></div>
<div class="gmail_quote"><br>
</div>
<div class="gmail_quote">Here is my stack log:</div>
<div class="gmail_quote"><br>
</div>
<div class="gmail_quote">
<div class="gmail_quote"><snip></div>
<div class="gmail_quote"><br>
</div>
<div class="gmail_quote">2014-09-23 16:14:20.967 | + die_if_not_set 474 TENANT_ID 'Failure retrieving TENANT_ID for demo'</div>
<div class="gmail_quote">2014-09-23 16:14:20.967 | + local exitcode=0</div>
<div class="gmail_quote">2014-09-23 16:14:20.973 | + is_baremetal</div>
<div class="gmail_quote">2014-09-23 16:14:20.973 | + [[ g-api,g-reg,key,n-api,n-crt,n-obj,n-cpu,n-cond,cinder,c-sch,c-api,c-vol,n-sch,n-novnc,n-xvnc,n-cauth,rabbit,horizon,mysql,q-svc,q-dhcp,q-meta,q-lbaas,tempest =~ baremetal ]]</div>
<div class="gmail_quote">2014-09-23 16:14:20.973 | + return 1</div>
<div class="gmail_quote">2014-09-23 16:14:20.974 | + is_provider_network</div>
<div class="gmail_quote">2014-09-23 16:14:20.974 | + '[' '' == True ']'</div>
<div class="gmail_quote">2014-09-23 16:14:20.974 | + return 1</div>
<div class="gmail_quote">2014-09-23 16:14:20.975 | ++ neutron net-create --tenant-id dcf1bc1fc11646c69e5b6236b044ced9 private</div>
<div class="gmail_quote">2014-09-23 16:14:20.976 | ++ grep ' id '</div>
<div class="gmail_quote">2014-09-23 16:14:20.979 | ++ get_field 2</div>
<div class="gmail_quote">2014-09-23 16:14:20.980 | ++ local data field</div>
<div class="gmail_quote">2014-09-23 16:14:20.980 | ++ read data</div>
<div class="gmail_quote">2014-09-23 16:14:22.536 | Not Found (HTTP 404) (Request-ID: req-8efb173b-9852-46c0-9cd0-f3a15260ae08)</div>
<div class="gmail_quote">2014-09-23 16:14:22.591 | + NET_ID=</div>
<div class="gmail_quote">2014-09-23 16:14:22.591 | + die_if_not_set 505 NET_ID 'Failure creating NET_ID for  dcf1bc1fc11646c69e5b6236b044ced9'</div>
<div class="gmail_quote">2014-09-23 16:14:22.591 | + local exitcode=0</div>
<div class="gmail_quote">2014-09-23 16:14:22.597 | [Call Trace]</div>
<div class="gmail_quote">2014-09-23 16:14:22.597 | ./stack.sh:1246:create_neutron_initial_network</div>
<div class="gmail_quote">2014-09-23 16:14:22.598 | /home/devadmin/devstack/lib/neutron:505:die_if_not_set</div>
<div class="gmail_quote">2014-09-23 16:14:22.598 | /home/devadmin/devstack/functions-common:251:die</div>
<div class="gmail_quote">2014-09-23 16:14:22.602 | [ERROR] /home/devadmin/devstack/functions-common:505 Failure creating NET_ID for dcf1bc1fc11646c69e5b6236b044ced9</div>
<div class="gmail_quote">2014-09-23 16:14:23.606 | Error on exit</div>
<div class="gmail_quote"><br>
</div>
<div class="gmail_quote"><snip></div>
<div class="gmail_quote"><br>
</div>
<div class="gmail_quote">
<div class="gmail_quote"><br>
</div>
<div class="gmail_quote"><br>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</div></div></div>

</blockquote></div><br></div></div></div></div></div>
</blockquote></div><br></div>