"rally verify" fails with error 'TempestResourcesContext' object has no attribute 'generate_random_name'

Bug #1530770 reported by Viktor Tikkanen
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Rally
Fix Released
Undecided
Bo Chi

Bug Description

Version 0.1.2 generates following error when executing "rally verify start" command:

...
2016-01-04 06:38:05.428 2169 RALLYDEBUG rally.verification.tempest.config [-] Shared networks found. 'fixed_network_name' option should be configured
2016-01-04 06:38:05.428 2169 RALLYDEBUG rally.verification.tempest.config [-] Option 'fixed_network_name' from 'compute' section is not configured
2016-01-04 06:38:05.429 2169 RALLYDEBUG rally.verification.tempest.config [-] Creating network resources: network, subnet, router
Command failed, please check log for more info
2016-01-04 06:38:05.429 2169 CRITICAL rally [-] AttributeError: 'TempestResourcesContext' object has no attribute 'generate_random_name'
2016-01-04 06:38:05.429 2169 ERROR rally Traceback (most recent call last):
2016-01-04 06:38:05.429 2169 ERROR rally File "/usr/local/bin/rally", line 10, in <module>
2016-01-04 06:38:05.429 2169 ERROR rally sys.exit(main())
2016-01-04 06:38:05.429 2169 ERROR rally File "/usr/local/lib/python2.7/dist-packages/rally/cli/main.py", line 42, in main
2016-01-04 06:38:05.429 2169 ERROR rally return cliutils.run(sys.argv, categories)
2016-01-04 06:38:05.429 2169 ERROR rally File "/usr/local/lib/python2.7/dist-packages/rally/cli/cliutils.py", line 547, in run
2016-01-04 06:38:05.429 2169 ERROR rally ret = fn(*fn_args, **fn_kwargs)
2016-01-04 06:38:05.429 2169 ERROR rally File "<decorator-gen-52>", line 2, in start
2016-01-04 06:38:05.429 2169 ERROR rally File "/usr/local/lib/python2.7/dist-packages/rally/cli/envutils.py", line 67, in default_from_global
2016-01-04 06:38:05.429 2169 ERROR rally return f(*args, **kwargs)
2016-01-04 06:38:05.429 2169 ERROR rally File "/usr/local/lib/python2.7/dist-packages/rally/cli/commands/verify.py", line 117, in start
2016-01-04 06:38:05.429 2169 ERROR rally system_wide_install=system_wide_install, concur=concur)
2016-01-04 06:38:05.429 2169 ERROR rally File "/usr/local/lib/python2.7/dist-packages/rally/api.py", line 393, in verify
2016-01-04 06:38:05.429 2169 ERROR rally tests_file=tests_file, concur=concur)
2016-01-04 06:38:05.429 2169 ERROR rally File "/usr/local/lib/python2.7/dist-packages/rally/verification/tempest/tempest.py", line 394, in verify
2016-01-04 06:38:05.429 2169 ERROR rally self._prepare_and_run(set_name, regex, tests_file, concur)
2016-01-04 06:38:05.429 2169 ERROR rally File "/usr/local/lib/python2.7/dist-packages/rally/common/logging.py", line 197, in wrapper
2016-01-04 06:38:05.429 2169 ERROR rally result = f(self, *args, **kwargs)
2016-01-04 06:38:05.429 2169 ERROR rally File "/usr/local/lib/python2.7/dist-packages/rally/verification/tempest/tempest.py", line 320, in _prepare_and_run
2016-01-04 06:38:05.429 2169 ERROR rally self.run(testr_args)
2016-01-04 06:38:05.429 2169 ERROR rally File "/usr/local/lib/python2.7/dist-packages/rally/verification/tempest/tempest.py", line 350, in run
2016-01-04 06:38:05.429 2169 ERROR rally with config.TempestResourcesContext(self.deployment, self.config_file):
2016-01-04 06:38:05.429 2169 ERROR rally File "/usr/local/lib/python2.7/dist-packages/rally/verification/tempest/config.py", line 314, in __enter__
2016-01-04 06:38:05.429 2169 ERROR rally self._create_network_resources)
2016-01-04 06:38:05.429 2169 ERROR rally File "/usr/local/lib/python2.7/dist-packages/rally/verification/tempest/config.py", line 354, in _configure_option
2016-01-04 06:38:05.429 2169 ERROR rally resource = create_method(*args, **kwargs)
2016-01-04 06:38:05.429 2169 ERROR rally File "/usr/local/lib/python2.7/dist-packages/rally/verification/tempest/config.py", line 400, in _create_network_resources
2016-01-04 06:38:05.429 2169 ERROR rally add_router=True, network_create_args={"shared": True})
2016-01-04 06:38:05.429 2169 ERROR rally File "/usr/local/lib/python2.7/dist-packages/rally/plugins/openstack/wrappers/network.py", line 316, in create_network
2016-01-04 06:38:05.429 2169 ERROR rally "name": self.owner.generate_random_name()})
2016-01-04 06:38:05.429 2169 ERROR rally AttributeError: 'TempestResourcesContext' object has no attribute 'generate_random_name'
2016-01-04 06:38:05.429 2169 ERROR rally
...

See complete log: http://pastebin.com/uCJ1i1Xu

Bo Chi (bochi-michael)
Changed in rally:
assignee: nobody → Bo Chi (bochi-michael)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to rally (master)

Fix proposed to branch: master
Review: https://review.openstack.org/264004

Changed in rally:
status: New → In Progress
Revision history for this message
Jonathan Gonzalez V. (jonathan-abdiel) wrote :
Download full text (3.8 KiB)

Hi!

I got the same issue using these instructions https://hub.docker.com/r/rallyforge/rally/ to setup a rally and then got the same trace

2016-01-06 17:15:35.621 50 RALLYDEBUG rally.verification.tempest.config [-] Creating network resources: network, subnet, router
Command failed, please check log for more info
2016-01-06 17:15:35.623 50 CRITICAL rally [-] AttributeError: 'TempestResourcesContext' object has no attribute 'generate_random_name'
2016-01-06 17:15:35.623 50 ERROR rally Traceback (most recent call last):
2016-01-06 17:15:35.623 50 ERROR rally File "/usr/local/bin/rally", line 10, in <module>
2016-01-06 17:15:35.623 50 ERROR rally sys.exit(main())
2016-01-06 17:15:35.623 50 ERROR rally File "/usr/local/lib/python2.7/dist-packages/rally/cli/main.py", line 42, in main
2016-01-06 17:15:35.623 50 ERROR rally return cliutils.run(sys.argv, categories)
2016-01-06 17:15:35.623 50 ERROR rally File "/usr/local/lib/python2.7/dist-packages/rally/cli/cliutils.py", line 554, in run
2016-01-06 17:15:35.623 50 ERROR rally ret = fn(*fn_args, **fn_kwargs)
2016-01-06 17:15:35.623 50 ERROR rally File "<decorator-gen-52>", line 2, in start
2016-01-06 17:15:35.623 50 ERROR rally File "/usr/local/lib/python2.7/dist-packages/rally/cli/envutils.py", line 67, in default_from_global
2016-01-06 17:15:35.623 50 ERROR rally return f(*args, **kwargs)
2016-01-06 17:15:35.623 50 ERROR rally File "/usr/local/lib/python2.7/dist-packages/rally/cli/commands/verify.py", line 136, in start
2016-01-06 17:15:35.623 50 ERROR rally system_wide=system_wide, concur=concur)
2016-01-06 17:15:35.623 50 ERROR rally File "/usr/local/lib/python2.7/dist-packages/rally/api.py", line 398, in verify
2016-01-06 17:15:35.623 50 ERROR rally expected_failures=expected_failures, concur=concur)
2016-01-06 17:15:35.623 50 ERROR rally File "/usr/local/lib/python2.7/dist-packages/rally/verification/tempest/tempest.py", line 395, in verify
2016-01-06 17:15:35.623 50 ERROR rally self._prepare_and_run(set_name, regex, tests_file, concur)
2016-01-06 17:15:35.623 50 ERROR rally File "/usr/local/lib/python2.7/dist-packages/rally/common/logging.py", line 197, in wrapper
2016-01-06 17:15:35.623 50 ERROR rally result = f(self, *args, **kwargs)
2016-01-06 17:15:35.623 50 ERROR rally File "/usr/local/lib/python2.7/dist-packages/rally/verification/tempest/tempest.py", line 320, in _prepare_and_run
2016-01-06 17:15:35.623 50 ERROR rally self.run(testr_args)
2016-01-06 17:15:35.623 50 ERROR rally File "/usr/local/lib/python2.7/dist-packages/rally/verification/tempest/tempest.py", line 349, in run
2016-01-06 17:15:35.623 50 ERROR rally with config.TempestResourcesContext(self.deployment, self.config_file):
2016-01-06 17:15:35.623 50 ERROR rally File "/usr/local/lib/python2.7/dist-packages/rally/verification/tempest/config.py", line 331, in __enter__
2016-01-06 17:15:35.623 50 ERROR rally self._create_network_resources)
2016-01-06 17:15:35.623 50 ERROR rally File "/usr/local/lib/python2.7/dist-packages/rally/verification/tempest/config.py", line 371, in _configure_option
2016-01-06 17:15:35.623 50 ERROR rally resource = create_method(...

Read more...

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to rally (master)

Reviewed: https://review.openstack.org/264004
Committed: https://git.openstack.org/cgit/openstack/rally/commit/?id=aaa561853bd3e408263b15a194189cebb0df7c72
Submitter: Jenkins
Branch: master

commit aaa561853bd3e408263b15a194189cebb0df7c72
Author: Bo Chi <email address hidden>
Date: Wed Jan 6 06:11:53 2016 -0500

    Let TempestResourcesContext implements utils.RandomNameGeneratorMixin

    TempestResourcesContext calls NeutronWrapper.create_network, and it will
    be called to generate random name, so it needs to implements
    utils.RandomNameGeneratorMixin
    Changed generate_random_name to use self.task["uuid"] or
    self.verification["uuid"] as task_id
    This patch also refactor test__create_network_resources to test the
    logic correctly

    Change-Id: I8c145073386cb7f668461e050fe8de75f4675def
    Closes-Bug: #1530770

Changed in rally:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to rally (0.1)

Fix proposed to branch: 0.1
Review: https://review.openstack.org/264976

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on rally (0.1)

Change abandoned by Boris Pavlovic (<email address hidden>) on branch: 0.1
Review: https://review.openstack.org/264976

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Change abandoned by Andrey Kurilin (<email address hidden>) on branch: 0.1
Review: https://review.openstack.org/264976

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.