interactive openstack console: run_subcommand() takes exactly 2 arguments (1 given)

Bug #1551160 reported by Pavlo Shchelokovskyy
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
python-openstackclient
Fix Released
Undecided
Dina Belova

Bug Description

Latest as of now commit in master (16f00833a70893979ccdf7ffb7f6e1e7653cdc24, "Add shell --profile option to trigger osprofiler from CLI") has broken the interactive openstack shell

openstack --debug
START with options: ['--debug']
options: Namespace(access_token_endpoint='', auth_type='', auth_url='http://192.168.100.12:5000/v2.0', cacert='', client_id='', client_secret='***', cloud='', debug=True, default_domain='default', deferred_help=False, domain_id='', domain_name='', endpoint='', identity_provider='', identity_provider_url='', insecure=None, inspector_api_version='1', inspector_url=None, interface='', log_file=None, os_baremetal_api_version='1.6', os_compute_api_version='', os_data_processing_api_version='1.1', os_data_processing_url='', os_dns_api_version='2', os_identity_api_version='2.0', os_image_api_version='', os_network_api_version='', os_object_api_version='', os_policy_api_version='1', os_project_id=None, os_project_name=None, os_queues_api_version='1.1', os_volume_api_version='2', os_workflow_api_version='2', password='***', profile=None, project_domain_id='', project_domain_name='', project_id='', project_name='demo', protocol='', region_name='RegionOne', scope='', service_provider_endpoint='', timing=False, token='***', trust_id='', url='', user_domain_id='', user_domain_name='', user_id='', username='demo', verbose_level=3, verify=None)
defaults: {u'auth_type': 'password', u'compute_api_version': u'2', 'key': None, u'database_api_version': u'1.0', 'api_timeout': None, u'baremetal_api_version': u'1', u'image_api_version': u'2', 'cacert': None, u'image_api_use_tasks': False, u'floating_ip_source': u'neutron', u'orchestration_api_version': u'1', u'interface': None, u'network_api_version': u'2', u'image_format': u'qcow2', u'key_manager_api_version': u'v1', u'metering_api_version': u'2', 'verify': True, u'identity_api_version': u'2.0', u'volume_api_version': u'2', 'cert': None, u'secgroup_source': u'neutron', u'container_api_version': u'1', u'dns_api_version': u'2', u'object_store_api_version': u'1', u'disable_vendor_agent': {}}
cloud cfg: {'auth_type': 'password', u'compute_api_version': u'2', u'orchestration_api_version': u'1', u'database_api_version': u'1.0', 'data_processing_api_version': '1.1', 'inspector_api_version': '1', 'policy_api_version': '1', u'network_api_version': u'2', u'image_format': u'qcow2', u'image_api_version': u'2', 'verify': True, u'dns_api_version': '2', u'object_store_api_version': u'1', 'verbose_level': 3, 'region_name': 'RegionOne', 'api_timeout': None, u'baremetal_api_version': '1.6', 'queues_api_version': '1.1', 'auth': {'username': 'demo', 'project_name': 'demo', 'password': '***', 'auth_url': 'http://192.168.100.12:5000/v2.0'}, 'default_domain': 'default', u'container_api_version': u'1', u'image_api_use_tasks': False, u'floating_ip_source': u'neutron', 'key': None, 'timing': False, 'cacert': None, u'key_manager_api_version': u'v1', u'metering_api_version': u'2', 'deferred_help': False, u'identity_api_version': '2.0', 'workflow_api_version': '2', u'volume_api_version': '2', 'cert': None, u'secgroup_source': u'neutron', 'debug': True, u'interface': None, u'disable_vendor_agent': {}}
compute API version 2, cmd group openstack.compute.v2
network API version 2, cmd group openstack.network.v2
image API version 2, cmd group openstack.image.v2
volume API version 2, cmd group openstack.volume.v2
identity API version 2.0, cmd group openstack.identity.v2
object_store API version 1, cmd group openstack.object_store.v1
baremetal API version 1.6, cmd group openstack.baremetal.v1
congressclient API version 1, cmd group openstack.congressclient.v1
baremetal_introspection API version 1, cmd group openstack.baremetal_introspection.v1
workflow_engine API version 2, cmd group openstack.workflow_engine.v2
messaging API version 1.1, cmd group openstack.messaging.v1
dns API version 2, cmd group openstack.dns.v2
data_processing API version 1.1, cmd group openstack.data_processing.v1
Traceback (most recent call last):
  File "/opt/stack/python-openstackclient/openstackclient/shell.py", line 118, in run
    ret_val = super(OpenStackShell, self).run(argv)
  File "/usr/local/lib/python2.7/dist-packages/cliff/app.py", line 224, in run
    result = self.interact()
  File "/opt/stack/python-openstackclient/openstackclient/shell.py", line 161, in interact
    ret_value = super(OpenStackShell, self).run_subcommand()
TypeError: run_subcommand() takes exactly 2 arguments (1 given)

END return value: 1

Without this commit (git checkout master && git checkout HEAD^^) everything works fine.

Non-interactive command mode is not affected.

Revision history for this message
Richard Theis (rtheis) wrote :

Dina Belova, can you please take a look at this issue?

Revision history for this message
Dina Belova (dbelova) wrote :

Ok, will take a look. Looks like that's the interactive mode was affected, and not tested in any automated cases.

Changed in python-openstackclient:
assignee: nobody → Dina Belova (dbelova)
Rui Chen (kiwik-chenrui)
Changed in python-openstackclient:
status: New → Confirmed
Dina Belova (dbelova)
Changed in python-openstackclient:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-openstackclient (master)

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

Revision history for this message
Dina Belova (dbelova) wrote :

Please review. Now it should work ok. The reason was in typo accidentally introduced in the commit Pavlo mentioned. I did not check interactive mode and this was not noticed during the review as well. Really sorry for making a mess.

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

Reviewed: https://review.openstack.org/286490
Committed: https://git.openstack.org/cgit/openstack/python-openstackclient/commit/?id=8a839ad8b82599cccf9d34e83ce3f0735334d817
Submitter: Jenkins
Branch: master

commit 8a839ad8b82599cccf9d34e83ce3f0735334d817
Author: Dina Belova <email address hidden>
Date: Tue Mar 1 13:45:19 2016 +0300

    Fix regression in interactive client mode

    Fix typo introduced in OSprofiler intergation commit, that
    leaded to non-working interactive mode of the CLI client.

    Change-Id: If5dfc90dbbe64d4665c3e33e936f0cc674738351
    Closes-Bug: 1551160

Changed in python-openstackclient:
status: In Progress → Fix Released
Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/python-openstackclient 2.2.0

This issue was fixed in the openstack/python-openstackclient 2.2.0 release.

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.