Hi Charlie,

This is likely due to the file "/tmp/nfvbench/nfvbench.cfg" missing inside the 
container.
Can you check the following:

  *   Check where you stored the nfvbench.cfg file on the host (the quickstart 
guide suggests to put the file under $HOME/nfvbench)
  *   Check that that directory on host is mapped to /tmp/nfvbench in the 
container

To verify you can also try to cat that file from inside the container (docker 
exec <container name> cat /tmp/nfvbench/nfvbench.cfg)

For further interaction, you can continue on this email thread or you can join 
opnfv.slack.com #nfvbench if you prefer.


Thanks

Alec



From: <opnfv-tech-discuss@lists.opnfv.org> on behalf of "Li, Charlie" 
<charlie...@amd.com>
Date: Monday, August 31, 2020 at 9:59 AM
To: "opnfv-tech-discuss@lists.opnfv.org" <opnfv-tech-discuss@lists.opnfv.org>
Subject: [opnfv-tech-discuss] #nfvbench - Example of run fails


[AMD Public Use]

Hello,

I am new to NFVbench and is following the link below to get started
https://opnfv-nfvbench.readthedocs.io/en/latest/testing/user/userguide/quickstart_docker.html

The NFVbench container is started successfully

$ nfvbench --version
4.3.1.dev4

But when I try the example of run, it fails

$ nfvbench -c /tmp/nfvbench/nfvbench.cfg --rate 10kpps
2020-08-27 20:10:45,424 INFO Loading configuration string: 
/tmp/nfvbench/nfvbench.cfg
2020-08-27 20:10:45,425 ERROR String /tmp/nfvbench/nfvbench.cfg is not well 
formatted. Please verify your yaml/json string. If string is a file path, file 
was not found. Please use correct path and verify it is visible to container if 
you run nfvbench in container.
2020-08-27 20:10:45,425 ERROR {'status': 'ERROR', 'error_message': 'Traceback 
(most recent call last):\n  File "/nfvbench/nfvbench/config.py", line 46, in 
config_loads\n    cfg = AttrDict(yaml.safe_load(cfg_text))\n  File 
"/usr/local/lib/python3.6/dist-packages/attrdict/dictionary.py", line 17, in 
__init__\n    super(AttrDict, self).__init__(*args, **kwargs)\nValueError: 
dictionary update sequence element #0 has length 1; 2 is required\n\nDuring 
handling of the above exception, another exception occurred:\n\nTraceback (most 
recent call last):\n  File "/nfvbench/nfvbench/nfvbench.py", line 611, in 
main\n    config = config_loads(opts.config, config, whitelist_keys)\n  File 
"/nfvbench/nfvbench/config.py", line 55, in config_loads\n    raise 
Exception(e)\nException: dictionary update sequence element #0 has length 1; 2 
is required\n'}
dictionary update sequence element #0 has length 1; 2 is required

The /tmp/nfvbench/nfvbench.cfg is cut and paste (OpenStack is not used and only 
PCIe addresses are modified)
traffic_generator:
    generator_profile:
        - name: trex-local
          tool: TRex
          ip: 127.0.0.1
          cores: 3
          software_mode: false
          interfaces:
            - port: 0
              pci: "04:00.0"
            - port: 1
              pci: "04:00.1"
          intf_speed:

Any help is appreciated.

Regards,
Charlie Li

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#24352): 
https://lists.opnfv.org/g/opnfv-tech-discuss/message/24352
Mute This Topic: https://lists.opnfv.org/mt/76538156/21656
Mute #nfvbench: 
https://lists.opnfv.org/g/OPNFV+opnfv-tech-discuss/mutehashtag/nfvbench
Group Owner: opnfv-tech-discuss+ow...@lists.opnfv.org
Unsubscribe: https://lists.opnfv.org/g/opnfv-tech-discuss/unsub  
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to