Octavia tempest plugin causing tempest init command to fail by giving ERROR tempest AttributeError: 'tuple' object has no attribute 'dest'

Bug #1681405 reported by chandan kumar
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
octavia
Fix Released
Undecided
chandan kumar

Bug Description

How to reproduce:
Having a devstack setup with Octavia enabled and do the following operations:
centos@octavia ~]$ tempest list-plugins
+----------------+--------------------------------------------------------------+
| Name | EntryPoint |
+----------------+--------------------------------------------------------------+
| keystone_tests | keystone_tempest_plugin.plugin:KeystoneTempestPlugin |
| cinder_tests | cinder.tests.tempest.plugin:CinderTempestPlugin |
| neutron_tests | neutron.tests.tempest.plugin:NeutronTempestPlugin |
| neutron_lbaas | neutron_lbaas.tests.tempest.plugin:NeutronLbaasTempestPlugin |
| octavia | octavia.tests.tempest.plugin:OctaviaTempestPlugin |
+----------------+--------------------------------------------------------------+
[centos@octavia ~]$ tempest init foobar
2017-04-10 08:35:03.805 9978 INFO tempest [-] Using tempest config file /etc/tempest/tempest.conf
2017-04-10 08:35:03.830 9978 ERROR tempest [-] 'tuple' object has no attribute 'dest'
[centos@octavia ~]$ rm -fr ./foobar/ .tempest/
[centos@octavia ~]$ tempest init foobar --debug
2017-04-10 08:35:30.500 9994 INFO tempest [-] Using tempest config file /etc/tempest/tempest.conf
2017-04-10 08:35:30.525 9994 ERROR tempest [-] 'tuple' object has no attribute 'dest'
2017-04-10 08:35:30.525 9994 ERROR tempest Traceback (most recent call last):
2017-04-10 08:35:30.525 9994 ERROR tempest File "/usr/lib/python2.7/site-packages/cliff/app.py", line 400, in run_subcommand
2017-04-10 08:35:30.525 9994 ERROR tempest result = cmd.run(parsed_args)
2017-04-10 08:35:30.525 9994 ERROR tempest File "/usr/lib/python2.7/site-packages/cliff/command.py", line 90, in run
2017-04-10 08:35:30.525 9994 ERROR tempest return self.take_action(parsed_args) or 0
2017-04-10 08:35:30.525 9994 ERROR tempest File "/opt/stack/tempest/tempest/cmd/init.py", line 181, in take_action
2017-04-10 08:35:30.525 9994 ERROR tempest self.create_working_dir(parsed_args.dir, config_dir)
2017-04-10 08:35:30.525 9994 ERROR tempest File "/opt/stack/tempest/tempest/cmd/init.py", line 163, in create_working_dir
2017-04-10 08:35:30.525 9994 ERROR tempest self.generate_sample_config(local_dir)
2017-04-10 08:35:30.525 9994 ERROR tempest File "/opt/stack/tempest/tempest/cmd/init.py", line 131, in generate_sample_config
2017-04-10 08:35:30.525 9994 ERROR tempest output_file])
2017-04-10 08:35:30.525 9994 ERROR tempest File "/usr/lib/python2.7/site-packages/oslo_config/generator.py", line 530, in main
2017-04-10 08:35:30.525 9994 ERROR tempest generate(conf)
2017-04-10 08:35:30.525 9994 ERROR tempest File "/usr/lib/python2.7/site-packages/oslo_config/generator.py", line 510, in generate
2017-04-10 08:35:30.525 9994 ERROR tempest groups = _get_groups(_list_opts(conf.namespace))
2017-04-10 08:35:30.525 9994 ERROR tempest File "/usr/lib/python2.7/site-packages/oslo_config/generator.py", line 436, in _list_opts
2017-04-10 08:35:30.525 9994 ERROR tempest return _cleanup_opts(opts)
2017-04-10 08:35:30.525 9994 ERROR tempest File "/usr/lib/python2.7/site-packages/oslo_config/generator.py", line 374, in _cleanup_opts
2017-04-10 08:35:30.525 9994 ERROR tempest clean[namespace][group][opt.dest] = opt
2017-04-10 08:35:30.525 9994 ERROR tempest AttributeError: 'tuple' object has no attribute 'dest'
2017-04-10 08:35:30.525 9994 ERROR tempest
2017-04-10 08:35:30.527 9994 CRITICAL tempest [-] AttributeError: 'tuple' object has no attribute 'dest'
2017-04-10 08:35:30.527 9994 ERROR tempest Traceback (most recent call last):
2017-04-10 08:35:30.527 9994 ERROR tempest File "/usr/bin/tempest", line 10, in <module>
2017-04-10 08:35:30.527 9994 ERROR tempest sys.exit(main())
2017-04-10 08:35:30.527 9994 ERROR tempest File "/opt/stack/tempest/tempest/cmd/main.py", line 48, in main
2017-04-10 08:35:30.527 9994 ERROR tempest return the_app.run(argv)
2017-04-10 08:35:30.527 9994 ERROR tempest File "/usr/lib/python2.7/site-packages/cliff/app.py", line 279, in run
2017-04-10 08:35:30.527 9994 ERROR tempest result = self.run_subcommand(remainder)
2017-04-10 08:35:30.527 9994 ERROR tempest File "/usr/lib/python2.7/site-packages/cliff/app.py", line 400, in run_subcommand
2017-04-10 08:35:30.527 9994 ERROR tempest result = cmd.run(parsed_args)
2017-04-10 08:35:30.527 9994 ERROR tempest File "/usr/lib/python2.7/site-packages/cliff/command.py", line 90, in run
2017-04-10 08:35:30.527 9994 ERROR tempest return self.take_action(parsed_args) or 0
2017-04-10 08:35:30.527 9994 ERROR tempest File "/opt/stack/tempest/tempest/cmd/init.py", line 181, in take_action
2017-04-10 08:35:30.527 9994 ERROR tempest self.create_working_dir(parsed_args.dir, config_dir)
2017-04-10 08:35:30.527 9994 ERROR tempest File "/opt/stack/tempest/tempest/cmd/init.py", line 163, in create_working_dir
2017-04-10 08:35:30.527 9994 ERROR tempest self.generate_sample_config(local_dir)
2017-04-10 08:35:30.527 9994 ERROR tempest File "/opt/stack/tempest/tempest/cmd/init.py", line 131, in generate_sample_config
2017-04-10 08:35:30.527 9994 ERROR tempest output_file])
2017-04-10 08:35:30.527 9994 ERROR tempest File "/usr/lib/python2.7/site-packages/oslo_config/generator.py", line 530, in main
2017-04-10 08:35:30.527 9994 ERROR tempest generate(conf)
2017-04-10 08:35:30.527 9994 ERROR tempest File "/usr/lib/python2.7/site-packages/oslo_config/generator.py", line 510, in generate
2017-04-10 08:35:30.527 9994 ERROR tempest groups = _get_groups(_list_opts(conf.namespace))
2017-04-10 08:35:30.527 9994 ERROR tempest File "/usr/lib/python2.7/site-packages/oslo_config/generator.py", line 436, in _list_opts
2017-04-10 08:35:30.527 9994 ERROR tempest return _cleanup_opts(opts)
2017-04-10 08:35:30.527 9994 ERROR tempest File "/usr/lib/python2.7/site-packages/oslo_config/generator.py", line 374, in _cleanup_opts
2017-04-10 08:35:30.527 9994 ERROR tempest clean[namespace][group][opt.dest] = opt
2017-04-10 08:35:30.527 9994 ERROR tempest AttributeError: 'tuple' object has no attribute 'dest'
2017-04-10 08:35:30.527 9994 ERROR tempest
[centos@octavia ~]$

summary: Octavia tempest plugin causing tempest init command to fail by giving
- 2017-04-10 08:35:30.525 9994 ERROR tempest AttributeError: 'tuple'
- object has no attribute 'dest'
+ ERROR tempest AttributeError: 'tuple' object has no attribute 'dest'
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to octavia (master)

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

Changed in octavia:
assignee: nobody → chandan kumar (chkumar246)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to octavia (master)

Reviewed: https://review.openstack.org/455260
Committed: https://git.openstack.org/cgit/openstack/octavia/commit/?id=3ac2b04f95d4781ae87a54e87f475db94a53e98a
Submitter: Jenkins
Branch: master

commit 3ac2b04f95d4781ae87a54e87f475db94a53e98a
Author: Chandan Kumar <email address hidden>
Date: Mon Apr 10 11:12:13 2017 +0000

    Fixed Octavia tempest plugin

    * tempest init command calls oslo_config to generate sample tempest.conf
      which expects a list of tuples (group, [group_options]) provided by
      octavia plugin's get_opt_lists method. Due to comma at the end of
      service_option, oslo_config excepts one more tuple which was not there
      which causing failure to tempest init. Removing it fix the issue.

    * use register_opt for service_available in config

    Change-Id: I6af2c72dd83e5ef5fd3ae9a66ee774e3cbab8f67
    Closes-bug: #1681405

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

Fix proposed to branch: stable/ocata
Review: https://review.openstack.org/455405

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to octavia (stable/ocata)

Reviewed: https://review.openstack.org/455405
Committed: https://git.openstack.org/cgit/openstack/octavia/commit/?id=1576b5fd29676b7f67f4ec709f314afdcedfe623
Submitter: Jenkins
Branch: stable/ocata

commit 1576b5fd29676b7f67f4ec709f314afdcedfe623
Author: Chandan Kumar <email address hidden>
Date: Mon Apr 10 11:12:13 2017 +0000

    Fixed Octavia tempest plugin

    * tempest init command calls oslo_config to generate sample tempest.conf
      which expects a list of tuples (group, [group_options]) provided by
      octavia plugin's get_opt_lists method. Due to comma at the end of
      service_option, oslo_config excepts one more tuple which was not there
      which causing failure to tempest init. Removing it fix the issue.

    * use register_opt for service_available in config

    Change-Id: I6af2c72dd83e5ef5fd3ae9a66ee774e3cbab8f67
    Closes-bug: #1681405
    (cherry picked from commit 3ac2b04f95d4781ae87a54e87f475db94a53e98a)

tags: added: in-stable-ocata
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/octavia 1.0.0.0b1

This issue was fixed in the openstack/octavia 1.0.0.0b1 development milestone.

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.