Hi Alec,

sorry for late reply but I was OoO.


I pulled the latest version and started it:

[root@dc ~]# sudo docker exec -it b5d7491977d7  nfvbench -c 
/tmp/nfvbench/my_nfvbench.cfg --rate 1% --service-chain EXT --debug
2018-01-25 14:39:37,181 INFO Loading configuration file: 
/tmp/nfvbench/my_nfvbench.cfg
2018-01-25 14:39:37,185 WARNING OS_USERNAME is missing
2018-01-25 14:39:37,186 WARNING OS_AUTH_URL is missing
2018-01-25 14:39:37,186 WARNING OS_TENANT_NAME is missing
2018-01-25 14:39:37,186 INFO -c /tmp/nfvbench/my_nfvbench.cfg --rate 1% 
--service-chain EXT --debug
2018-01-25 14:39:37,189 INFO ServiceChain initialized.
2018-01-25 14:39:37,189 INFO ChainRunner initialized.
2018-01-25 14:39:37,190 INFO Connecting to TRex...
2018-01-25 14:39:37,391 INFO Starting EXT chain...
2018-01-25 14:39:37,392 INFO Dry run: False
2018-01-25 14:39:37,473 INFO Cleaning up...
2018-01-25 14:39:37,652 ERROR {'status': 'ERROR', 'error_message': 'Traceback 
(most recent call last):\n  File "/nfvbench/nfvbench/nfvbench.py", line 560, in 
main\n    raise Exception(result[\'error_message\'])\nException: Traceback 
(most recent call last):\n  File "/nfvbench/nfvbench/nfvbench.py", line 104, in 
run\n    "service_chain": self.chain_runner.run(),\n  File 
"/nfvbench/nfvbench/chain_runner.py", line 54, in run\n    return 
self.chain.run()\n  File "/nfvbench/nfvbench/service_chain.py", line 121, in 
run\n    self.__set_helpers()\n  File "/nfvbench/nfvbench/service_chain.py", 
line 41, in __set_helpers\n    self.stage_manager = StageManager(self.config, 
self.cred, self.factory)\n  File "/nfvbench/nfvbench/chain_managers.py", line 
35, in __init__\n    self.client.setup()\n  File 
"/nfvbench/nfvbench/chain_clients.py", line 448, in setup\n    net = 
self._lookup_network(net_name)\n  File "/nfvbench/nfvbench/chain_clients.py", 
line 85, in _lookup_network\n    networks = 
self.neutron.list_networks(name=network_name)\n  File 
"/usr/local/lib/python2.7/dist-packages/neutronclient/v2_0/client.py", line 
102, in with_params\n    ret = self.function(instance, *args, **kwargs)\n  File 
"/usr/local/lib/python2.7/dist-packages/neutronclient/v2_0/client.py", line 
561, in list_networks\n    **_params)\n  File 
"/usr/local/lib/python2.7/dist-packages/neutronclient/v2_0/client.py", line 
307, in list\n    for r in self._pagination(collection, path, **params):\n  
File "/usr/local/lib/python2.7/dist-packages/neutronclient/v2_0/client.py", 
line 320, in _pagination\n    res = self.get(path, params=params)\n  File 
"/usr/local/lib/python2.7/dist-packages/neutronclient/v2_0/client.py", line 
293, in get\n    headers=headers, params=params)\n  File 
"/usr/local/lib/python2.7/dist-packages/neutronclient/v2_0/client.py", line 
270, in retry_request\n    headers=headers, params=params)\n  File 
"/usr/local/lib/python2.7/dist-packages/neutronclient/v2_0/client.py", line 
200, in do_request\n    content_type=self.content_type())\n  File 
"/usr/local/lib/python2.7/dist-packages/neutronclient/client.py", line 305, in 
do_request\n    self._check_uri_length(url)\n  File 
"/usr/local/lib/python2.7/dist-packages/neutronclient/client.py", line 298, in 
_check_uri_length\n    uri_len = len(self.endpoint_url) + len(url)\n  File 
"/usr/local/lib/python2.7/dist-packages/neutronclient/client.py", line 312, in 
endpoint_url\n    return self.get_endpoint()\n  File 
"/usr/local/lib/python2.7/dist-packages/keystoneclient/adapter.py", line 133, 
in get_endpoint\n    return self.session.get_endpoint(auth or self.auth, 
**kwargs)\n  File 
"/usr/local/lib/python2.7/dist-packages/keystoneauth1/session.py", line 942, in 
get_endpoint\n    return auth.get_endpoint(self, **kwargs)\n  File 
"/usr/local/lib/python2.7/dist-packages/keystoneauth1/identity/base.py", line 
379, in get_endpoint\n    allow_version_hack=allow_version_hack, **kwargs)\n  
File "/usr/local/lib/python2.7/dist-packages/keystoneauth1/identity/base.py", 
line 270, in get_endpoint_data\n    service_catalog = 
self.get_access(session).service_catalog\n  File 
"/usr/local/lib/python2.7/dist-packages/keystoneauth1/identity/base.py", line 
134, in get_access\n    self.auth_ref = self.get_auth_ref(session)\n  File 
"/usr/local/lib/python2.7/dist-packages/keystoneauth1/identity/v2.py", line 51, 
in get_auth_ref\n    url = self.auth_url.rstrip(\'/\') + 
\'/tokens\'\nAttributeError: \'NoneType\' object has no attribute 
\'rstrip\'\n\n'}
Traceback (most recent call last):
  File "/nfvbench/nfvbench/nfvbench.py", line 104, in run
    "service_chain": self.chain_runner.run(),
  File "/nfvbench/nfvbench/chain_runner.py", line 54, in run
    return self.chain.run()
  File "/nfvbench/nfvbench/service_chain.py", line 121, in run
    self.__set_helpers()
  File "/nfvbench/nfvbench/service_chain.py", line 41, in __set_helpers
    self.stage_manager = StageManager(self.config, self.cred, self.factory)
  File "/nfvbench/nfvbench/chain_managers.py", line 35, in __init__
    self.client.setup()
  File "/nfvbench/nfvbench/chain_clients.py", line 448, in setup
    net = self._lookup_network(net_name)
  File "/nfvbench/nfvbench/chain_clients.py", line 85, in _lookup_network
    networks = self.neutron.list_networks(name=network_name)
  File "/usr/local/lib/python2.7/dist-packages/neutronclient/v2_0/client.py", 
line 102, in with_params
    ret = self.function(instance, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/neutronclient/v2_0/client.py", 
line 561, in list_networks
    **_params)
  File "/usr/local/lib/python2.7/dist-packages/neutronclient/v2_0/client.py", 
line 307, in list
    for r in self._pagination(collection, path, **params):
  File "/usr/local/lib/python2.7/dist-packages/neutronclient/v2_0/client.py", 
line 320, in _pagination
    res = self.get(path, params=params)
  File "/usr/local/lib/python2.7/dist-packages/neutronclient/v2_0/client.py", 
line 293, in get
    headers=headers, params=params)
  File "/usr/local/lib/python2.7/dist-packages/neutronclient/v2_0/client.py", 
line 270, in retry_request
    headers=headers, params=params)
  File "/usr/local/lib/python2.7/dist-packages/neutronclient/v2_0/client.py", 
line 200, in do_request
    content_type=self.content_type())
  File "/usr/local/lib/python2.7/dist-packages/neutronclient/client.py", line 
305, in do_request
    self._check_uri_length(url)
  File "/usr/local/lib/python2.7/dist-packages/neutronclient/client.py", line 
298, in _check_uri_length
    uri_len = len(self.endpoint_url) + len(url)
  File "/usr/local/lib/python2.7/dist-packages/neutronclient/client.py", line 
312, in endpoint_url
    return self.get_endpoint()
  File "/usr/local/lib/python2.7/dist-packages/keystoneclient/adapter.py", line 
133, in get_endpoint
    return self.session.get_endpoint(auth or self.auth, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/keystoneauth1/session.py", line 
942, in get_endpoint
    return auth.get_endpoint(self, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/keystoneauth1/identity/base.py", 
line 379, in get_endpoint
    allow_version_hack=allow_version_hack, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/keystoneauth1/identity/base.py", 
line 270, in get_endpoint_data
    service_catalog = self.get_access(session).service_catalog
  File "/usr/local/lib/python2.7/dist-packages/keystoneauth1/identity/base.py", 
line 134, in get_access
    self.auth_ref = self.get_auth_ref(session)
  File "/usr/local/lib/python2.7/dist-packages/keystoneauth1/identity/v2.py", 
line 51, in get_auth_ref
    url = self.auth_url.rstrip('/') + '/tokens'
AttributeError: 'NoneType' object has no attribute 'rstrip'

[root@dc ~]# docker ps
CONTAINER ID        IMAGE                   COMMAND                  CREATED    
         STATUS              PORTS               NAMES
b5d7491977d7        opnfv/nfvbench:latest   "/nfvbench/docker/nf…"   39 minutes 
ago      Up 39 minutes                           nfvbench
[root@dc ~]# docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             
SIZE
opnfv/nfvbench      latest              0e217d1c959e        36 hours ago        
1.48GB
[root@dc ~]#



I have tried with different config file

root@dc:/tmp/nfvbench# cat  my_nfvbench.cfg
{
    "traffic_generator": {
        "generator_profile": [
            {
                "interfaces": [
                    {
                        "pci": "03:00.0",
                        "port": 0,
                    },
                    {
                        "pci": "03:00.1",
                        "port": 1,
                    }
                ],
                "intf_speed": "10Gbps",
                "ip": "127.0.0.1",
                "name": "trex-local",
                "software_mode": false,
                "tool": "TRex"
            }
        ]
    },
vlans: [0, 0]
root@dc:/tmp/nfvbench# cat  >my_nfvbench.cfg
traffic_generator:
    ip_addrs: ['16.0.0.0/24', '48.0.0.0/24']
    tg_gateway_ip_addrs: ['192.168.0.2', '192.168.2.2']
    gateway_ip_addrs: ['192.168.0.1', '192.168.2.1']
    generator_profile:
        - name: trex-local
          tool: TRex
          ip: 127.0.0.1
          cores: 1
          software_mode: false,
          interfaces:
            - port: 0
              switch_port:
              pci: "03:00.0"
            - port: 1
              switch_port:
              pci: "03:00.1"
          intf_speed: 10Gbps
^C


I do not use VLANs:

ens3f0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 9238
        inet 192.168.0.2  netmask 255.255.255.0  broadcast 192.168.0.255
        inet6 fe80::569c:600e:f308:884a  prefixlen 64  scopeid 0x20<link>
        ether 24:8a:07:8e:d3:14  txqueuelen 1000  (Ethernet)
        RX packets 10  bytes 600 (600.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 20  bytes 1344 (1.3 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

ens3f1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 9238
        inet 192.168.2.2  netmask 255.255.255.0  broadcast 192.168.2.255
        inet6 fe80::2e6d:c529:b5b2:ad5e  prefixlen 64  scopeid 0x20<link>
        ether 24:8a:07:8e:d3:15  txqueuelen 1000  (Ethernet)
        RX packets 11  bytes 660 (660.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 23  bytes 1554 (1.5 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0


Br,

Peter




From: Alec Hothan (ahothan) [mailto:ahot...@cisco.com]
Sent: Wednesday, January 17, 2018 12:23 AM
To: Balint, Peter (Nokia - HU/Budapest) <peter.bal...@nokia.com>; 
opnfv-tech-discuss@lists.opnfv.org
Subject: Re: [opnfv-tech-discuss] [nfvbench] - AttributeError: 'NoneType' 
object has no attribute 'rstrip'

Peter,

I have committed few changes to allow no-openstack runs with NFVbench (not a 
big patch but I prefer to do it as it touches many files and I needed to add 
proper unit testing). I have only unit tested the changes and it should no 
longer access openstack.
To test on your system, please pull the latest Docker container from DockerHub 
(tag “latest”).
The nfvbench configuration to use will need to have an empty openrc_file 
property (or you can just remove it from your file since it defaults to empty) 
and will need EXT chain.

In your example of config, you have to drop the openrc_file and add the vlan ID 
to use for the 2 ends of your chain (e.g. 1000, 1001 – replace with your own 
values)

{
    "traffic_generator": {
        "generator_profile": [
            {
                "interfaces": [
                    {
                        "pci": "00:04.0",
                        "port": 0,
                    },
                    {
                        "pci": "00:03.0",
                        "port": 1,
                    }
                ],
                "intf_speed": "10Gbps",
                "ip": "127.0.0.1",
                "name": "trex-local",
                "software_mode": false,
                "tool": "TRex"
            }
        ]
    },
vlans: [1000, 1001]
}

Running with this config, you need

  *   the interfaces on the 00:04.0 and 00.03.0 to be wired properly (i.e. to 
your TOR normally)
  *   the corresponding TOR interfaces to be configured in trunk mode

Regarding the service chain config, assuming your chain is made of 1 VM 
configured as a virtual router (most common case):

  *   1.1.0.2 and 2.2.0.2 to be configured public IP addresses for the 2 
interfaces of your virtual router  (with ARP enabled)
  *   static routing to be configured in your virtual router to route
     *   10.0.0.0/8 through 1.1.0.100 and
     *   20.0.0.0/8 through 2.2.0.100
These are the default IP addresses in the nfvbench default config that you can 
also override if needed (you can also check the IP addressing diagram in the 
nfvbench doc 
http://docs.opnfv.org/en/latest/submodules/nfvbench/docs/testing/user/userguide/advanced.html#external-chain)

Hopefully all this makes sense, if you see any issue, send the config file 
used, a description of what your chain does and how it is configured, run your 
cli with –debug and send the full output.

Thanks

  Alec


From: "Balint, Peter (Nokia - HU/Budapest)" 
<peter.bal...@nokia.com<mailto:peter.bal...@nokia.com>>
Date: Sunday, January 14, 2018 at 10:59 PM
To: "Alec Hothan (ahothan)" <ahot...@cisco.com<mailto:ahot...@cisco.com>>, 
"opnfv-tech-discuss@lists.opnfv.org<mailto:opnfv-tech-discuss@lists.opnfv.org>" 
<opnfv-tech-discuss@lists.opnfv.org<mailto:opnfv-tech-discuss@lists.opnfv.org>>
Subject: RE: [opnfv-tech-discuss] [nfvbench] - AttributeError: 'NoneType' 
object has no attribute 'rstrip'

Hi Alec,

Thanks for infos, the contribution looks interesting. My python knowledge is 
about basic/intermediate level. I you could share more infos maybe I can 
investigate my the effort needs.

Br,
Peter



From: Alec Hothan (ahothan) [mailto:ahot...@cisco.com]
Sent: Saturday, January 13, 2018 1:45 AM
To: Balint, Peter (Nokia - HU/Budapest) 
<peter.bal...@nokia.com<mailto:peter.bal...@nokia.com>>; 
opnfv-tech-discuss@lists.opnfv.org<mailto:opnfv-tech-discuss@lists.opnfv.org>
Subject: Re: [opnfv-tech-discuss] [nfvbench] - AttributeError: 'NoneType' 
object has no attribute 'rstrip'

Hi Balint,

We have had multiple requests in the past to support a no-OpenStack mode but we 
have not officially added support for that mode for lack of resources.
Having said that, I do not think it would be a lot of work because all the main 
SW pieces to support this mode are already in place and working (EXT chain mode 
is definitely the right starting point).

Michael is currently adding a feature for EXT chain that allows to specify the 
chain MAC addresses in the config (otherwise the current code expects your 
chain end points to reply to ARP). This will allow to test with external chains 
that do not support ARP.

Other than that, it would be just a matter of disabling a few functions related 
to OpenStack (mainly the OpenStack credentials code and Neutron network 
discovery), probably a couple of days of work for somebody familiar with python 
coding.

If you have cycles to contribute there, I’d be happy to guide you and point you 
to what needs to change.

Regards,

   Alec

From: "Balint, Peter (Nokia - HU/Budapest)" 
<peter.bal...@nokia.com<mailto:peter.bal...@nokia.com>>
Date: Friday, January 12, 2018 at 12:11 AM
To: "Alec Hothan (ahothan)" <ahot...@cisco.com<mailto:ahot...@cisco.com>>, 
"opnfv-tech-discuss@lists.opnfv.org<mailto:opnfv-tech-discuss@lists.opnfv.org>" 
<opnfv-tech-discuss@lists.opnfv.org<mailto:opnfv-tech-discuss@lists.opnfv.org>>
Subject: RE: [opnfv-tech-discuss] [nfvbench] - AttributeError: 'NoneType' 
object has no attribute 'rstrip'


Hi,

Thanks for infos.

My NFVBench installed on a bare metal server, I would like to benchmark 
different network elements, VNFs with it. So I only need to generate test with 
NFVBench and  I do not want to manage Openstack or any other network element 
with it. Is this possible?

openrc config is the default one with some port info:

{
    "openrc_file": "/tmp/nfvbench/openrc",

    "traffic_generator": {
        "generator_profile": [
            {
                "interfaces": [
                    {
                        "pci": "00:04.0",
                        "port": 0,
                    },
                    {
                        "pci": "00:03.0",
                        "port": 1,
                    }
                ],
                "intf_speed": "10Gbps",
                "ip": "127.0.0.1",
                "name": "trex-local",
                "software_mode": false,
                "tool": "TRex"
            }
        ]
    }
}


Br,

Peter




From: Alec Hothan (ahothan) [mailto:ahot...@cisco.com]
Sent: Wednesday, January 10, 2018 6:37 PM
To: Balint, Peter (Nokia - HU/Budapest) 
<peter.bal...@nokia.com<mailto:peter.bal...@nokia.com>>; 
opnfv-tech-discuss@lists.opnfv.org<mailto:opnfv-tech-discuss@lists.opnfv.org>
Subject: Re: [opnfv-tech-discuss] [nfvbench] - AttributeError: 'NoneType' 
object has no attribute 'rstrip'

Hi Peter,

This looks to be a problem with the openstack authentication (openrc file) 
while trying to list a neutron network:

    networks = self.neutron.list_networks(name=network_name)

In EXT chain mode, the code will attempt to retrieve the characteristics of the 
right and left external networks (configured in your config file as 
“nfvbench-net0” and “nfvbench-net1”) to get their VLAN ids

Could you share the content of the openrc file used and what version of 
openstack are your running?
Something you can try real quick is to source the openrc file in the container 
(source /tmp/nfvbench/openrc) and try to show the 2 networks using neutron cli 
and see if you hit the same exception (neutron router-list, or neutron 
network-show nfvbench-net0)


  Alec


From: 
<opnfv-tech-discuss-boun...@lists.opnfv.org<mailto:opnfv-tech-discuss-boun...@lists.opnfv.org>>
 on behalf of "Balint, Peter (Nokia - HU/Budapest)" 
<peter.bal...@nokia.com<mailto:peter.bal...@nokia.com>>
Date: Wednesday, January 10, 2018 at 8:37 AM
To: 
"opnfv-tech-discuss@lists.opnfv.org<mailto:opnfv-tech-discuss@lists.opnfv.org>" 
<opnfv-tech-discuss@lists.opnfv.org<mailto:opnfv-tech-discuss@lists.opnfv.org>>
Subject: [opnfv-tech-discuss] [nfvbench] - AttributeError: 'NoneType' object 
has no attribute 'rstrip'

Hi,

I started to investigate NFVBench for use as benchmarking software, and I got 
some errors.

I attached the output and config file.

I tried to use it in External Chain mode.


Could you please give some recommended settings or could you provide me any 
information which help to fix.


Br,




Peter Balint
Test Architect
MN Cloud Core
NOKIA

Nokia Solutions and Networks Kft.
H-1082 Budapest, Hungary, Bókay János u. 36-42.
Mobile: +36 70 501 89 01
peter.bal...@nokia.com<mailto:peter.bal...@nokia.com>
https://networks.nokia.com/

_______________________________________________
opnfv-tech-discuss mailing list
opnfv-tech-discuss@lists.opnfv.org
https://lists.opnfv.org/mailman/listinfo/opnfv-tech-discuss

Reply via email to