Hello, Could someone help please...
Thanks, Nagraj On Tue, Jul 24, 2018 at 11:04 AM, Nagraj <nagraj.cl...@gmail.com> wrote: > Thank you Emma and Rex..I dont have yardstick flavor and replaced the yaml > files with medium flavor which is available in my cloud. > > I ran the dummy below with debug. There is a context error , not sure what > is it.. > > root@c20b31e23c94:/home/opnfv/repos/yardstick# yardstick --debug task > start samples/dummy.yaml > No handlers could be found for logger "yardstick.common.utils" > /usr/local/lib/python2.7/dist-packages/flask/exthook.py:71: > ExtDeprecationWarning: Importing flask.ext.restful is deprecated, use > flask_restful instead. > .format(x=modname), ExtDeprecationWarning > 2018-07-24 05:13:25,493 [INFO] yardstick.cmd.commands.task task.py:52 Task > START > 2018-07-24 05:13:25,494 [DEBUG] yardstick.benchmark.core.task task.py:75 > Output configuration is: {'DEFAULT': {'dispatcher': 'file'}, 'nsb': {}, > 'dispatcher_influxdb': {}, 'dispatcher_http': {}, 'dispatcher_file': > {'file_path': '/tmp/yardstick.out'}} > 2018-07-24 05:13:25,495 [DEBUG] yardstick.benchmark.core.task task.py:96 > task_files:['samples/dummy.yaml'], task_args:[None], > task_args_fnames:[None] > 2018-07-24 05:13:25,495 [INFO] yardstick.benchmark.core.task task.py:543 > Parsing task config: samples/dummy.yaml > 2018-07-24 05:13:25,500 [DEBUG] yardstick.benchmark.core.task task.py:532 > Input task is: > ############################################################ > ################## > # Copyright (c) 2017 Huawei Technologies Co.,Ltd and others. > # > # All rights reserved. This program and the accompanying materials > # are made available under the terms of the Apache License, Version 2.0 > # which accompanies this distribution, and is available at > # http://www.apache.org/licenses/LICENSE-2.0 > ############################################################ > ################## > --- > # Sample benchmark task config file > > schema: "yardstick:task:0.1" > > scenarios: > - > type: Dummy > > runner: > type: Duration > duration: 5 > interval: 1 > > context: > type: Dummy > name: Dummy > > 2018-07-24 05:13:25,504 [DEBUG] yardstick.benchmark.core.task task.py:376 > Got a KeyError in config_context_target({}) > 2018-07-24 05:13:25,504 [DEBUG] yardstick.benchmark.core.task task.py:376 > Got a KeyError in config_context_target({'task_id': > '50403d00-7a63-49c9-b4ce-d09f967e5c8c', u'runner': {u'duration': 5, > u'interval': 1, u'type': u'Duration', 'output_config': {'DEFAULT': > {'dispatcher': ['file']}, 'nsb': {}, 'dispatcher_influxdb': {}, > 'dispatcher_http': {}, 'dispatcher_file': {'file_path': > '/tmp/yardstick.out'}}}, 'options': {}, u'type': u'Dummy', 'tc': 'dummy', > 'task_path': 'samples'}) > 2018-07-24 05:13:25,507 [INFO] yardstick.benchmark.core.task task.py:402 > Starting runner of type 'Duration' > 2018-07-24 05:13:26,161 [INFO] yardstick.benchmark.runners.duration > duration.py:47 Worker START, duration is 5s > 2018-07-24 05:13:26,163 [DEBUG] yardstick.benchmark.runners.duration > duration.py:48 class is <class 'yardstick.benchmark. > scenarios.dummy.dummy.Dummy'> > 2018-07-24 05:13:26,163 [DEBUG] yardstick.benchmark.runners.duration > duration.py:65 runner=16179 seq=1 START > 2018-07-24 05:13:26,163 [INFO] yardstick.benchmark.scenarios.dummy.dummy > dummy.py:37 Dummy echo hello yardstick! > 2018-07-24 05:13:27,165 [DEBUG] yardstick.benchmark.runners.duration > duration.py:105 runner=16179 seq=1 END > 2018-07-24 05:13:27,166 [DEBUG] yardstick.benchmark.runners.duration > duration.py:65 runner=16179 seq=2 START > 2018-07-24 05:13:27,166 [INFO] yardstick.benchmark.scenarios.dummy.dummy > dummy.py:37 Dummy echo hello yardstick! > 2018-07-24 05:13:28,167 [DEBUG] yardstick.benchmark.runners.duration > duration.py:105 runner=16179 seq=2 END > 2018-07-24 05:13:28,168 [DEBUG] yardstick.benchmark.runners.duration > duration.py:65 runner=16179 seq=3 START > 2018-07-24 05:13:28,168 [INFO] yardstick.benchmark.scenarios.dummy.dummy > dummy.py:37 Dummy echo hello yardstick! > 2018-07-24 05:13:29,169 [DEBUG] yardstick.benchmark.runners.duration > duration.py:105 runner=16179 seq=3 END > 2018-07-24 05:13:29,170 [DEBUG] yardstick.benchmark.runners.duration > duration.py:65 runner=16179 seq=4 START > 2018-07-24 05:13:29,170 [INFO] yardstick.benchmark.scenarios.dummy.dummy > dummy.py:37 Dummy echo hello yardstick! > 2018-07-24 05:13:30,171 [DEBUG] yardstick.benchmark.runners.duration > duration.py:105 runner=16179 seq=4 END > 2018-07-24 05:13:30,172 [DEBUG] yardstick.benchmark.runners.duration > duration.py:65 runner=16179 seq=5 START > 2018-07-24 05:13:30,172 [INFO] yardstick.benchmark.scenarios.dummy.dummy > dummy.py:37 Dummy echo hello yardstick! > 2018-07-24 05:13:31,159 [DEBUG] yardstick.benchmark.runners.base > base.py:259 result_queue size 4 > 2018-07-24 05:13:31,160 [DEBUG] yardstick.benchmark.runners.base > base.py:259 result_queue size 3 > 2018-07-24 05:13:31,161 [DEBUG] yardstick.benchmark.runners.base > base.py:259 result_queue size 2 > 2018-07-24 05:13:31,161 [DEBUG] yardstick.benchmark.runners.base > base.py:259 result_queue size 1 > 2018-07-24 05:13:31,173 [DEBUG] yardstick.benchmark.runners.duration > duration.py:105 runner=16179 seq=5 END > 2018-07-24 05:13:31,174 [INFO] yardstick.benchmark.runners.duration > duration.py:110 Worker END > 2018-07-24 05:13:31,174 [DEBUG] yardstick.benchmark.runners.duration > duration.py:123 queue.qsize() = 1 > 2018-07-24 05:13:31,174 [DEBUG] yardstick.benchmark.runners.duration > duration.py:124 output_queue.qsize() = 0 > 2018-07-24 05:13:31,193 [DEBUG] yardstick.benchmark.runners.base > base.py:259 result_queue size 1 > 2018-07-24 05:13:31,193 [INFO] yardstick.benchmark.core.task task.py:283 > Runner ended > 2018-07-24 05:13:31,194 [INFO] yardstick.benchmark.core.task task.py:127 > Testcase: "dummy" SUCCESS!!! > 2018-07-24 05:13:31,194 [INFO] yardstick.benchmark.core.task task.py:146 > Task samples/dummy.yaml finished in 5 secs > 2018-07-24 05:13:31,202 [INFO] yardstick.benchmark.core.task task.py:167 > Report can be found in '/tmp/report.html' > 2018-07-24 05:13:31,202 [INFO] yardstick.benchmark.core.task task.py:155 > Total finished in 5 secs > 2018-07-24 05:13:31,202 [INFO] yardstick.benchmark.core.task task.py:158 > To generate report, execute command "yardstick report generate > 50403d00-7a63-49c9-b4ce-d09f967e5c8c <YAML_NAME>" > 2018-07-24 05:13:31,203 [INFO] yardstick.benchmark.core.task task.py:159 > Task ALL DONE, exiting > 2018-07-24 05:13:31,203 [INFO] yardstick.cmd.commands.task task.py:61 Task > SUCCESS > 2018-07-24 05:13:31,203 [DEBUG] yardstick.benchmark.runners.base > base.py:124 Terminating all runners > root@c20b31e23c94:/home/opnfv/repos/yardstick# > > > > > > samples/ping.yaml > ===================== > > root@c20b31e23c94:/home/opnfv/repos/yardstick# yardstick --debug task > start samples/ping.yaml > No handlers could be found for logger "yardstick.common.utils" > /usr/local/lib/python2.7/dist-packages/flask/exthook.py:71: > ExtDeprecationWarning: Importing flask.ext.restful is deprecated, use > flask_restful instead. > .format(x=modname), ExtDeprecationWarning > 2018-07-24 05:18:12,852 [INFO] yardstick.cmd.commands.task task.py:52 Task > START > 2018-07-24 05:18:12,852 [DEBUG] yardstick.benchmark.core.task task.py:75 > Output configuration is: {'DEFAULT': {'dispatcher': 'file'}, 'nsb': {}, > 'dispatcher_influxdb': {}, 'dispatcher_http': {}, 'dispatcher_file': > {'file_path': '/tmp/yardstick.out'}} > 2018-07-24 05:18:12,853 [DEBUG] yardstick.benchmark.core.task task.py:96 > task_files:['samples/ping.yaml'], task_args:[None], > task_args_fnames:[None] > 2018-07-24 05:18:12,853 [INFO] yardstick.benchmark.core.task task.py:543 > Parsing task config: samples/ping.yaml > 2018-07-24 05:18:12,866 [DEBUG] yardstick.benchmark.core.task task.py:532 > Input task is: > ############################################################ > ################## > # Copyright (c) 2017 Ericsson AB and others. > # > # All rights reserved. This program and the accompanying materials > # are made available under the terms of the Apache License, Version 2.0 > # which accompanies this distribution, and is available at > # http://www.apache.org/licenses/LICENSE-2.0 > ############################################################ > ################## > --- > # Sample benchmark task config file > # measure network latency using ping > > schema: "yardstick:task:0.1" > > > > > scenarios: > - > type: Ping > options: > packetsize: 200 > host: athena.demo > target: ares.demo > > runner: > type: Duration > duration: 60 > interval: 1 > > sla: > max_rtt: 10 > action: monitor > > context: > name: demo > image: yardstick-image > flavor: medium.shared > user: ubuntu > > placement_groups: > pgrp1: > policy: "availability" > > servers: > athena: > floating_ip: true > placement: "pgrp1" > ares: > placement: "pgrp1" > > networks: > test: > cidr: '10.0.1.0/24' > > */usr/local/lib/python2.7/dist-packages/os_client_config/config.py:567: > UserWarning: external_network is deprecated. Please replace with an entry > in a dict inside of the networks list with name: public and > routes_externally: True* > * key=key, name=cloud[key], external=external))* > 2018-07-24 05:18:13,525 [INFO] yardstick.cmd.commands.task task.py:57 Task > FAILED > Traceback (most recent call last): > File "/usr/local/bin/yardstick", line 11, in <module> > load_entry_point('yardstick', 'console_scripts', 'yardstick')() > File "/home/opnfv/repos/yardstick/yardstick/main.py", line 49, in main > YardstickCLI().main(sys.argv[1:]) > File "/home/opnfv/repos/yardstick/yardstick/cmd/cli.py", line 165, in > main > self._dispatch_func_notask() > File "/home/opnfv/repos/yardstick/yardstick/cmd/cli.py", line 143, in > _dispatch_func_notask > func(CONF.category) > File "/home/opnfv/repos/yardstick/yardstick/cmd/commands/task.py", line > 54, in do_start > result = Task().start(param, **kwargs) > File "/home/opnfv/repos/yardstick/yardstick/benchmark/core/task.py", > line 103, in start > task_args_fnames) > File "/home/opnfv/repos/yardstick/yardstick/benchmark/core/task.py", > line 328, in _parse_tasks > task_args_fnames[i])) > File "/home/opnfv/repos/yardstick/yardstick/benchmark/core/task.py", > line 565, in parse_task > context.init(cfg_attrs) > File "/home/opnfv/repos/yardstick/yardstick/benchmark/contexts/heat.py", > line 106, in init > self.shade_client = openstack_utils.get_shade_client() > File "/home/opnfv/repos/yardstick/yardstick/common/openstack_utils.py", > line 173, in get_shade_client > return shade.openstack_cloud(**params) > File "/usr/local/lib/python2.7/dist-packages/shade/__init__.py", line > 113, in openstack_cloud > return OpenStackCloud(cloud_config=cloud_config, strict=strict) > File "/usr/local/lib/python2.7/dist-packages/shade/openstackcloud.py", > line 176, in __init__ > self._external_ipv4_names = cloud_config.get_external_ipv4_networks() > File > "/usr/local/lib/python2.7/dist-packages/os_client_config/cloud_config.py", > line 520, in get_external_ipv4_networks > if net['routes_ipv4_externally']] > KeyError: 'routes_ipv4_externally' > 2018-07-24 05:18:13,528 [DEBUG] yardstick.benchmark.runners.base > base.py:124 Terminating all runners > root@c20b31e23c94:/home/opnfv/repos/yardstick# > > > Other info you suggested to check > ============================ > > Without knowing anything about your deployment, I can suggest the > following actions. > > - Make sure the OpenStack credentials are available in your environment > > $ source /etc/yardstick/openstack.creds =>> yes > > $ env | grep OS_ > > > root@c20b31e23c94:/home/opnfv/repos/yardstick# env | grep OS_ > > OS_PROJECT_DOMAIN_ID=default > > OS_PROJECT_ID=3a8ff0bd5e364fccbd11199ff3b6ab6e > > OS_REGION_NAME=RegionOne > > OS_EXTERNAL_NETWORK=public > > OS_USER_DOMAIN_NAME=Default > > REPOS_DIR=/home/opnfv/repos > > OS_PROJECT_NAME=abc > > OS_IDENTITY_API_VERSION=3 > > OS_PASSWORD=testing > > OS_AUTH_URL=http://10.109.180.2:5000/v3 > > OS_USERNAME=abc > > OS_INTERFACE=public > EXTERNAL_NETWORK="public" > > > - Does EXTERNAL_NET exist in OpenStack? ==> external network is > public. Are you asking if i have a network by name EXTERNAL_NET ? then no. > > - Does the required image exist in OpenStack > > $ openstack image list | grep yardstick-image > > root@c20b31e23c94:/home/opnfv/repos/yardstick# openstack image list | > grep yardstick-image > > | 7d2880dd-9b39-4c88-96cb-0154626a7643 | yardstick-image | > active | > > - Do you have enough resources to launch your VMs? YES > > > On Tue, Jul 24, 2018 at 7:25 AM, limingjiang <limingji...@huawei.com> > wrote: > >> Hi Nagraj, >> >> >> >> As Emma said, one thing you need to check is that you need to add >> EXTERNET_NETWORK variable in the openstack.creds. >> >> Also you can follow her mail to have more details with “—debug” parameter >> when run the test case, it’s useful sometimes. >> >> >> >> As for the error when you run “samples/ping.yaml”, it looks like you >> just need to first “cd /home/opnfv/repos/yardstick” >> since “samples/ping.yaml” locates in “/home/opnfv/repos/yardstick”. >> >> >> >> BRs, >> >> Rex >> >> >> >> +----------------------------------------------------------- >> --------------------------------+ >> >> [image: cid:image001.png@01D0A50A.DD5A8F20] >> >> + *Mingjiang Li (Rex)* Mobile: +86 13761275017 >> >> + Shanghai Institute, Huawei >> >> + No. 2222, Xinjinqiao Road, Pudong, Shanghai, 201206, P.R.China >> <https://maps.google.com/?q=No.+2222,+Xinjinqiao+Road,+Pudong,+Shanghai,+201206,+P.R.China&entry=gmail&source=g> >> >> +----------------------------------------------------------- >> --------------------------------+ >> >> >> >> *From:* opnfv-tech-discuss@lists.opnfv.org [mailto:opnfv-tech-discuss@lis >> ts.opnfv.org] *On Behalf Of *Emma Foley >> *Sent:* Tuesday, July 24, 2018 12:32 AM >> *To:* Nagraj <nagraj.cl...@gmail.com>; opnfv-tech-discuss@lists.opnfv.org >> *Subject:* Re: [opnfv-tech-discuss][Yardstick] TaskReadError: Failed to >> read task samples/ping.yaml >> >> >> >> Hi, >> >> >> >> That output looks okay for the verification. >> >> >> >> Can you run the testcase again with the debug flag? >> >> yardstick --debug task start samples/ping.yaml >> >> >> >> This will give some additional information about the errors you are >> facing. >> >> >> >> You can also try running a very basic no-op scenario to make sure that >> yardstick is actually running. >> >> $ yardstick --debug task start samples/dummy.yaml >> >> This will run the dummy scenario and the dummy context to make sure that >> yardstick can interact with these objects >> >> >> >> To check whether it’s an issue with the heat context, you can run: >> >> $ yardstick --debug task start yardstick/tests/integration/du >> mmy-scenario-heat-context.yaml >> >> This one will run the same dummy scenario, but will also set up an >> environment using heat, which can help you quickly verify that your >> credentials and resource are set up correctly. >> >> >> >> >> >> Without knowing anything about your deployment, I can suggest the >> following actions. >> >> - Make sure the OpenStack credentials are available in your >> environment >> >> $ source /etc/yardstick/openstack.creds >> >> $ env | grep OS_ >> >> - Does EXTERNAL_NET exist in OpenStack? >> >> - Does the required image exist in OpenStack >> >> $ openstack image list | grep yardstick-image >> >> - Do you have enough resources to launch your VMs? >> >> The yardstick image is pretty big, you can try a smaller image instead >> e.g. cirros >> >> >> >> Unfortunately, without seeing the more detailed output, I can’t say for >> sure what’s wrong, and whether the suggested actions will help. >> >> >> >> Let me know how you get on, and if there’s any more help you need. >> >> >> >> Best regards, >> >> Emma >> >> >> >> >> >> >> >> >> >> *From:* opnfv-tech-discuss@lists.opnfv.org [mailto:opnfv-tech-discuss@lis >> ts.opnfv.org <opnfv-tech-discuss@lists.opnfv.org>] *On Behalf Of *Nagraj >> *Sent:* Monday, July 23, 2018 4:03 PM >> *To:* opnfv-tech-discuss@lists.opnfv.org >> *Subject:* [opnfv-tech-discuss][Yardstick] TaskReadError: Failed to read >> task samples/ping.yaml >> >> >> >> Hello, >> >> >> >> I am trying to run yardstick and followed the steps mentioned in section >> 4.3, using docker >> >> >> >> https://docs.opnfv.org/en/stable-danube/submodules/yardstick >> /docs/testing/user/userguide/04-installation.html#install- >> yardstick-using-docker-recommended >> >> >> >> >> >> My openstack is opensource so i edited /etc/yardstick/openstack.creds >> file with the contents on opnrc file and ran >> >> yardstick env prepare >> >> I am getting below error when i try to verify installation.. >> >> >> >> root@bbbca144e0cd:/home/opnfv/repos# yardstick -h >> >> >> >> No handlers could be found for logger "yardstick.common.utils" >> >> /usr/local/lib/python2.7/dist-packages/flask/exthook.py:71: >> ExtDeprecationWarning: Importing flask.ext.restful is deprecated, use >> flask_restful instead. >> >> .format(x=modname), ExtDeprecationWarning >> >> usage: yardstick [-h] [--config-dir DIR] [--config-file PATH] [--debug] >> >> [--nodebug] [--version] >> >> {task,scenario,plugin,runner,testcase,env,report} ... >> >> >> >> optional arguments: >> >> -h, --help show this help message and exit >> >> --config-dir DIR Path to a config directory to pull `*.conf` files >> >> from. This file set is sorted, so as to provide a >> >> predictable parse order if individual options are >> >> over-ridden. The set is parsed after the file(s) >> >> specified via previous --config-file, arguments >> hence >> >> over-ridden options in the directory take >> precedence. >> >> --config-file PATH Path to a config file to use. Multiple config >> files >> >> can be specified, with values in later files >> taking >> >> precedence. Defaults to None. >> >> --debug, -d increase output verbosity to debug >> >> --nodebug The inverse of --debug >> >> --version show program's version number and exit >> >> >> >> Command categories: >> >> {task,scenario,plugin,runner,testcase,env,report} >> >> Available categories >> >> root@bbbca144e0cd:/home/opnfv/repos# >> >> >> >> >> >> >> >> root@bbbca144e0cd:/home/opnfv/repos# yardstick task start >> samples/ping.yaml >> >> No handlers could be found for logger "yardstick.common.utils" >> >> /usr/local/lib/python2.7/dist-packages/flask/exthook.py:71: >> ExtDeprecationWarning: Importing flask.ext.restful is deprecated, use >> flask_restful instead. >> >> .format(x=modname), ExtDeprecationWarning >> >> 2018-07-23 14:53:30,383 [INFO] yardstick.cmd.commands.task task.py:52 >> Task START >> >> 2018-07-23 14:53:30,384 [INFO] yardstick.benchmark.core.task task.py:543 >> Parsing task config: samples/ping.yaml >> >> 2018-07-23 14:53:30,385 [INFO] yardstick.cmd.commands.task task.py:57 >> Task FAILED >> >> Traceback (most recent call last): >> >> File "/usr/local/bin/yardstick", line 11, in <module> >> >> load_entry_point('yardstick', 'console_scripts', 'yardstick')() >> >> File "/home/opnfv/repos/yardstick/yardstick/main.py", line 49, in main >> >> YardstickCLI().main(sys.argv[1:]) >> >> File "/home/opnfv/repos/yardstick/yardstick/cmd/cli.py", line 165, in >> main >> >> self._dispatch_func_notask() >> >> File "/home/opnfv/repos/yardstick/yardstick/cmd/cli.py", line 143, in >> _dispatch_func_notask >> >> func(CONF.category) >> >> File "/home/opnfv/repos/yardstick/yardstick/cmd/commands/task.py", >> line 54, in do_start >> >> result = Task().start(param, **kwargs) >> >> File "/home/opnfv/repos/yardstick/yardstick/benchmark/core/task.py", >> line 103, in start >> >> task_args_fnames) >> >> File "/home/opnfv/repos/yardstick/yardstick/benchmark/core/task.py", >> line 328, in _parse_tasks >> >> task_args_fnames[i])) >> >> File "/home/opnfv/repos/yardstick/yardstick/benchmark/core/task.py", >> line 545, in parse_task >> >> cfg, rendered = self._render_task(task_args, task_args_file) >> >> File "/home/opnfv/repos/yardstick/yardstick/benchmark/core/task.py", >> line 535, in _render_task >> >> raise y_exc.TaskReadError(task_file=self.path) >> >> TaskReadError: Failed to read task samples/ping.yaml >> >> root@bbbca144e0cd:/home/opnfv/repos# >> >> >> >> root@bbbca144e0cd:/home/opnfv/repos# yardstick --version >> >> No handlers could be found for logger "yardstick.common.utils" >> >> /usr/local/lib/python2.7/dist-packages/flask/exthook.py:71: >> ExtDeprecationWarning: Importing flask.ext.restful is deprecated, use >> flask_restful instead. >> >> .format(x=modname), ExtDeprecationWarning >> >> yardstick version 0.1.dev0 >> >> root@bbbca144e0cd:/home/opnfv/repos# >> >> >> >> >> >> Appreciate any help.. >> >> >> >> Thanks, >> >> Nagraj >> >> >> >> >> >> > > > -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#21612): https://lists.opnfv.org/g/opnfv-tech-discuss/message/21612 Mute This Topic: https://lists.opnfv.org/mt/23793705/21656 Group Owner: opnfv-tech-discuss+ow...@lists.opnfv.org Unsubscribe: https://lists.opnfv.org/g/opnfv-tech-discuss/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-