[Openstack] [Devstack][Neutron][Neutron N1KV Plugin] How to enable in local.conf?
foss geek
thefossgeek at gmail.com
Thu Sep 25 12:52:14 UTC 2014
taken cisco plugin file from below url:
https://github.com/CiscoSystems/devstack/blob/bobmel/csr1kv_for_routing_icehouse/lib/neutron_plugins/cisco
Downloaded vem and vem-dkms from the below url:
https://launchpad.net/~cisco-n1kv/+archive/ubuntu/n1kv-updates/+packages
nexus-1000v-vem-dkms_14.04.5.2.1.sk3.1.0.s0.187-1_all.deb
nexus-1000v-vem_14.04.5.2.1.sk3.1.0.s0.187.orig.tar.gz
manually installed vem-dkms using:
sudo dpkg -i nexus-1000v-vem-dkms_14.04.5.2.1.sk3.1.0.s0.187-1_all.deb
configured VEM.deb in local.conf:
Q_CISCO_PLUGIN_UVEM_DEB_IMAGE=/var/lib/nexus-1000v-vem_14.04.5.2.1.sk3.1.0.s0.187-1_amd64.deb
Now I am getting different error:
$ tail stack.sh.log
2014-09-25 11:40:27.604 | + die_if_not_set 374 TENANT_ID 'Failure
retrieving TENANT_ID for demo'
2014-09-25 11:40:27.609 | + local exitcode=0
2014-09-25 11:40:27.614 | + neutron cisco-network-profile-create
default_network_profile vlan --segment_range 1-3000 --physical_network
test-physnet1
2014-09-25 11:40:36.596 | Internal Server Error (HTTP 500) (Request-ID:
req-23eb2811-cfdc-40c7-b7e0-16a8e53f5068)
2014-09-25 11:40:36.644 | + exit_trap
2014-09-25 11:40:36.651 | + local r=1
2014-09-25 11:40:36.657 | ++ jobs -p
2014-09-25 11:40:36.662 | + jobs=
2014-09-25 11:40:36.668 | + [[ -n '' ]]
2014-09-25 11:40:36.673 | + exit 1
$ tail -n 200 screen-q-svc.log
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
2014-09-25 18:11:19.169 ERROR neutron.api.v2.resource
[req-9f7ef44c-3cb7-4005-9ce1-d96ade49caae admin
8dce1039369440b9b006f3f9c7247588] create failed
2014-09-25 18:11:19.169 TRACE neutron.api.v2.resource Traceback (most
recent call last):
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
2014-09-25 18:11:19.169 TRACE neutron.api.v2.resource result =
method(request=request, **args)
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
2014-09-25 18:11:19.169 TRACE neutron.api.v2.resource obj =
obj_creator(request.context, **kwargs)
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
2014-09-25 18:11:19.169 TRACE neutron.api.v2.resource
self).delete_network_profile(context, net_p['id'])
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__
2014-09-25 18:11:19.169 TRACE neutron.api.v2.resource
six.reraise(self.type_, self.value, self.tb)
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
2014-09-25 18:11:19.169 TRACE neutron.api.v2.resource context.tenant_id)
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
2014-09-25 18:11:19.169 TRACE neutron.api.v2.resource
n1kvclient.create_logical_network(network_profile, tenant_id)
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
2014-09-25 18:11:19.169 TRACE neutron.api.v2.resource body=body)
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
2014-09-25 18:11:19.169 TRACE neutron.api.v2.resource headers=headers)
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
2014-09-25 18:11:19.169 TRACE neutron.api.v2.resource raise
c_exc.VSMError(reason=replybody)
2014-09-25 18:11:19.169 TRACE neutron.api.v2.resource VSMError: Internal
VSM Error: Resource not found
2014-09-25 18:11:19.169 TRACE neutron.api.v2.resource .
2014-09-25 18:11:19.169 TRACE neutron.api.v2.resource
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
It actually failed while executing "_do_request" method:
$ vim /opt/stack/neutron/neutron/plugins/cisco/n1kv/n1kv_client.py
<snip>
try:
resp, replybody = (httplib2.Http(timeout=self.timeout).
request(action,
method,
body=body,
headers=headers))
except Exception as e:
raise c_exc.VSMConnectionFailed(reason=e)
LOG.debug(_("status_code %s"), resp.status)
if resp.status == 200:
if 'application/xml' in resp['content-type']:
return self._deserialize(replybody, resp.status)
elif 'text/plain' in resp['content-type']:
LOG.debug(_("VSM: %s"), replybody)
else:
* raise c_exc.VSMError(reason=replybody)*
<snip>
How do I troubleshoot this issue?
Thanks
On Thu, Sep 25, 2014 at 5:18 AM, foss geek <thefossgeek at gmail.com> wrote:
>
> Hi Pritesh,
>
> Thanks.
>
> I guess the cisco plugin script also not updated one:
>
>
> https://github.com/openstack-dev/devstack/blob/stable/icehouse/lib/neutron_plugins/cisco
>
> I have the below two variables in local.conf file but it not used any
> where in Devstack(devstack/lib/neutron_plugins/cisco).
>
> Q_CISCO_PLUGIN_DEVSTACK_VSM=False
>
> 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
>
> need your help to get the below script patch:
>
> $git diff lib/neutron_plugins/cisco
>
>
>
> Thanks
>
> On Thu, Sep 25, 2014 at 4:18 AM, Pritesh Kothari (pritkoth) <
> pritkoth at cisco.com> wrote:
>
>> Hi ,
>>
>> Yep you are right there seems to be a small subset which didn’t make it
>> upstream, here is a patch
>> which you can apply locally to get it up and running till it goes
>> upstream.
>>
>> ubuntu:~/devstack$ git diff
>> diff --git a/lib/neutron b/lib/neutron
>> index 8b883b1..a16909e 100644
>> --- a/lib/neutron
>> +++ b/lib/neutron
>> @@ -382,6 +382,11 @@ function create_neutron_initial_network {
>> TENANT_ID=$(openstack project list | grep " demo " | get_field 1)
>> die_if_not_set $LINENO TENANT_ID "Failure retrieving TENANT_ID for
>> demo"
>>
>> + # Create the default network profile
>> + # Create this only for N1KV
>> + # Use Q_CISCO_PLUGIN_VLAN_RANGES for the segment range values
>> + neutron cisco-network-profile-create default_network_profile vlan
>> --segment_range 1-3000 --physical_network $PHYSICAL_NETWORK
>> +
>> # Create a small network
>> # Since neutron command is executed in admin context at this point,
>> # ``--tenant-id`` needs to be specified.
>> ubuntu:~/devstack$
>>
>> hope this helps.
>>
>> Regards,
>> Pritesh
>>
>> On Sep 23, 2014, at 10:48 AM, foss geek <thefossgeek at gmail.com> wrote:
>>
>> Hi Pritesh,
>>
>> Here is configuration pointed by you.
>>
>> http://cisco-neutron-ci.cisco.com/logs/n1kv_neutron/3766/localrc.txt
>>
>> 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.
>>
>> *neutron cisco-network-profile-create default_network_profile vlan
>> --segment_range 1-3000 --physical_network test-physnet1*
>>
>> I also searched devstack icehouse code (taken from, git clone
>> https://github.com/openstack-dev/devstack.git -b stable/icehouse). It
>> seems there no line which executes above command.
>>
>> Is there modified version of devstack? or have any additional patch?
>>
>>
>> http://cisco-neutron-ci.cisco.com/logs/n1kv_neutron/3766/logs/stack.sh.log.gz
>>
>> <snip>
>>
>> *2014-09-09 15:46:28.847 | ++ echo '| e372231576564c37bad1a234518bb977
>> | demo |'*
>> *2014-09-09 15:46:28.861 | ++ read data*
>> *2014-09-09 15:46:28.861 | + TENANT_ID=e372231576564c37bad1a234518bb977*
>> *2014-09-09 15:46:28.862 | + die_if_not_set 383 TENANT_ID 'Failure
>> retrieving TENANT_ID for demo'*
>> *2014-09-09 15:46:28.862 | + local exitcode=0*
>> *2014-09-09 15:46:28.866 | + neutron cisco-network-profile-create
>> default_network_profile vlan --segment_range 1-3000 --physical_network
>> test-physnet1*
>> *2014-09-09 15:46:35.196 | Created a new network_profile:*
>> 2014-09-09 15:46:35.196 |
>> +--------------------+--------------------------------------+
>> 2014-09-09 15:46:35.196 | | Field | Value
>> |
>> 2014-09-09 15:46:35.196 |
>> +--------------------+--------------------------------------+
>> 2014-09-09 15:46:35.196 | | id |
>> b9968f2b-295d-499e-af33-8f2e196adec9 |
>> 2014-09-09 15:46:35.196 | | multicast_ip_range |
>> |
>> 2014-09-09 15:46:35.196 | | name | default_network_profile
>> |
>> 2014-09-09 15:46:35.196 | | physical_network | test-physnet1
>> |
>> 2014-09-09 15:46:35.196 | | segment_range | 1-3000
>> |
>> 2014-09-09 15:46:35.196 | | segment_type | vlan
>> |
>> 2014-09-09 15:46:35.196 | | sub_type |
>> |
>> 2014-09-09 15:46:35.196 |
>> +--------------------+--------------------------------------+
>> 2014-09-09 15:46:35.220 | + is_baremetal
>> 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 ]]
>> 2014-09-09 15:46:35.220 | + return 1
>> 2014-09-09 15:46:35.220 | + is_provider_network
>> 2014-09-09 15:46:35.220 | + '[' '' == True ']'
>> 2014-09-09 15:46:35.220 | + return 1
>> 2014-09-09 15:46:35.221 | ++ get_field 2
>> 2014-09-09 15:46:35.221 | ++ read data
>> 2014-09-09 15:46:35.222 | ++ grep ' id '
>> 2014-09-09 15:46:35.223 | ++ neutron net-create --tenant-id
>> e372231576564c37bad1a234518bb977 private
>> 2014-09-09 15:46:36.183 | ++ '[' 2 -lt 0 ']'
>> 2014-09-09 15:46:36.183 | ++ field='$3'
>> 2014-09-09 15:46:36.183 | ++ awk '-F[ \t]*\\|[ \t]*' '{print $3}'
>> 2014-09-09 15:46:36.184 | ++ echo '| id |
>> 7ec45412-b3c8-4607-8806-acadf01a84af |'
>> 2014-09-09 15:46:36.185 | ++ read data
>> 2014-09-09 15:46:36.185 | + NET_ID=7ec45412-b3c8-4607-8806-acadf01a84af
>> 2014-09-09 15:46:36.185 | + die_if_not_set 419 NET_ID 'Failure creating
>> NET_ID for test-physnet1 e372231576564c37bad1a234518bb977'
>> 2014-09-09 15:46:36.185 | + local exitcode=0
>> 2014-09-09 15:46:36.188 | ++ get_field 2
>> 2014-09-09 15:46:36.188 | ++ read data
>> 2014-09-09 15:46:36.188 | ++ grep ' id '
>> 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 10.0.0.0/24
>>
>> <snip>
>>
>> Here is my stack log:
>>
>> <snip>
>>
>> 2014-09-23 16:14:20.967 | + die_if_not_set 474 TENANT_ID 'Failure
>> retrieving TENANT_ID for demo'
>> 2014-09-23 16:14:20.967 | + local exitcode=0
>> 2014-09-23 16:14:20.973 | + is_baremetal
>> 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 ]]
>> 2014-09-23 16:14:20.973 | + return 1
>> 2014-09-23 16:14:20.974 | + is_provider_network
>> 2014-09-23 16:14:20.974 | + '[' '' == True ']'
>> 2014-09-23 16:14:20.974 | + return 1
>> 2014-09-23 16:14:20.975 | ++ neutron net-create --tenant-id
>> dcf1bc1fc11646c69e5b6236b044ced9 private
>> 2014-09-23 16:14:20.976 | ++ grep ' id '
>> 2014-09-23 16:14:20.979 | ++ get_field 2
>> 2014-09-23 16:14:20.980 | ++ local data field
>> 2014-09-23 16:14:20.980 | ++ read data
>> 2014-09-23 16:14:22.536 | Not Found (HTTP 404) (Request-ID:
>> req-8efb173b-9852-46c0-9cd0-f3a15260ae08)
>> 2014-09-23 16:14:22.591 | + NET_ID=
>> 2014-09-23 16:14:22.591 | + die_if_not_set 505 NET_ID 'Failure creating
>> NET_ID for dcf1bc1fc11646c69e5b6236b044ced9'
>> 2014-09-23 16:14:22.591 | + local exitcode=0
>> 2014-09-23 16:14:22.597 | [Call Trace]
>> 2014-09-23 16:14:22.597 | ./stack.sh:1246:create_neutron_initial_network
>> 2014-09-23 16:14:22.598 |
>> /home/devadmin/devstack/lib/neutron:505:die_if_not_set
>> 2014-09-23 16:14:22.598 | /home/devadmin/devstack/functions-common:251:die
>> 2014-09-23 16:14:22.602 | [ERROR]
>> /home/devadmin/devstack/functions-common:505 Failure creating NET_ID for
>> dcf1bc1fc11646c69e5b6236b044ced9
>> 2014-09-23 16:14:23.606 | Error on exit
>>
>> <snip>
>>
>>
>>
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20140925/f64bde95/attachment.html>
More information about the Openstack
mailing list