openstack complete failed with ImportError: No module named magclient.osc.v1.quotas

Bug #1762316 reported by Noam Angel
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
python-openstackclient
Invalid
Undecided
Unassigned

Bug Description

running command "openstack complete" result in the following error

openstack complete --debug
START with options: [u'complete', u'--debug']
options: Namespace(access_key='', access_secret='***', access_token='***', access_token_endpoint='', access_token_type='', aodh_endpoint='', application_credential_id='', application_credential_name='', application_credential_secret='***', auth_type='password', auth_url='http://192.168.24.1:5000/', cacert=None, cert='', client_id='', client_secret='***', cloud='', code='', consumer_key='', consumer_secret='***', debug=True, default_domain='default', default_domain_id='', default_domain_name='', deferred_help=False, discovery_endpoint='', domain_id='', domain_name='', endpoint='', glare_url='', identity_provider='', identity_provider_url='', insecure=None, inspector_api_version='1', inspector_url=None, interface='', key='', log_file=None, murano_packages_service='murano', murano_url='', openid_scope='', os_alarming_api_version='2', os_application_catalog_api_version='1', os_artifact_api_version='', os_baremetal_api_version='1.34', os_beta_command=False, os_clustering_api_version='1', os_compute_api_version='', os_container_infra_api_version='1', os_data_processing_api_version='1.1', os_data_processing_url='', os_database_api_version='1', os_dns_api_version='2', os_identity_api_version='3', os_image_api_version='', os_key_manager_api_version='1', os_loadbalancer_api_version='2.0', os_metrics_api_version='1', os_network_api_version='', os_object_api_version='', os_orchestration_api_version='1', os_project_id=None, os_project_name=None, os_queues_api_version='2', os_tacker_api_version='1', os_tripleoclient_api_version='1', os_volume_api_version='', os_workflow_api_version='2', passcode='', password='***', profile='', project_domain_id='', project_domain_name='Default', project_id='', project_name='admin', protocol='', redirect_uri='', region_name='', remote_project_domain_id='', remote_project_domain_name='', remote_project_id='', remote_project_name='', roles='', service_provider='', service_provider_endpoint='', service_provider_entity_id='', system_scope='', timing=False, token='***', trust_id='', url='', user='', user_domain_id='', user_domain_name='Default', user_id='', username='admin', verbose_level=3, verify=None)
Auth plugin password selected
auth_config_hook(): {'auth_type': 'password', 'beta_command': False, 'tripleoclient_api_version': '1', u'compute_api_version': u'2', 'key': None, u'database_api_version': '1', 'metrics_api_version': '1', 'data_processing_api_version': '1.1', 'inspector_api_version': '1', 'auth_url': 'http://192.168.24.1:5000/', u'network_api_version': u'2', u'message': u'', u'image_format': u'qcow2', 'networks': [], u'image_api_version': u'2', 'clustering_api_version': '1', 'verify': True, u'dns_api_version': '2', u'object_store_api_version': u'1', 'username': 'admin', u'container_infra_api_version': '1', 'loadbalancer_api_version': '2.0', 'verbose_level': 3, 'region_name': '', 'api_timeout': None, u'baremetal_api_version': '1.34', 'queues_api_version': '2', 'auth': {'user_domain_name': 'Default', 'project_name': 'admin', 'project_domain_name': 'Default'}, 'default_domain': 'default', u'container_api_version': u'1', u'image_api_use_tasks': False, u'floating_ip_source': u'neutron', u'orchestration_api_version': '1', 'timing': False, 'password': '***', u'application_catalog_api_version': '1', 'murano_packages_service': 'murano', 'cacert': None, u'key_manager_api_version': '1', u'metering_api_version': u'2', 'deferred_help': False, u'identity_api_version': '3', u'workflow_api_version': '2', u'volume_api_version': u'2', 'tacker_api_version': '1', 'cert': None, u'secgroup_source': u'neutron', u'status': u'active', 'alarming_api_version': '2', 'debug': True, u'interface': None, u'disable_vendor_agent': {}}
defaults: {u'auth_type': 'password', u'status': u'active', 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', u'container_infra_api_version': u'1', u'metering_api_version': u'2', u'image_api_use_tasks': False, u'floating_ip_source': u'neutron', u'orchestration_api_version': u'1', 'cacert': None, u'network_api_version': u'2', u'message': u'', u'image_format': u'qcow2', u'application_catalog_api_version': u'1', u'key_manager_api_version': u'v1', u'workflow_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'interface': None, u'disable_vendor_agent': {}}
cloud cfg: {'auth_type': 'password', 'beta_command': False, 'tripleoclient_api_version': '1', u'compute_api_version': u'2', 'key': None, u'database_api_version': '1', 'metrics_api_version': '1', 'data_processing_api_version': '1.1', 'inspector_api_version': '1', 'auth_url': 'http://192.168.24.1:5000/', u'network_api_version': u'2', u'message': u'', u'image_format': u'qcow2', 'networks': [], u'image_api_version': u'2', 'clustering_api_version': '1', 'verify': True, u'dns_api_version': '2', u'object_store_api_version': u'1', 'username': 'admin', u'container_infra_api_version': '1', 'loadbalancer_api_version': '2.0', 'verbose_level': 3, 'region_name': '', 'api_timeout': None, u'baremetal_api_version': '1.34', 'queues_api_version': '2', 'auth': {'user_domain_name': 'Default', 'project_name': 'admin', 'project_domain_name': 'Default'}, 'default_domain': 'default', u'container_api_version': u'1', u'image_api_use_tasks': False, u'floating_ip_source': u'neutron', u'orchestration_api_version': '1', 'timing': False, 'password': '***', u'application_catalog_api_version': '1', 'murano_packages_service': 'murano', 'cacert': None, u'key_manager_api_version': '1', u'metering_api_version': u'2', 'deferred_help': False, u'identity_api_version': '3', u'workflow_api_version': '2', u'volume_api_version': u'2', 'tacker_api_version': '1', 'cert': None, u'secgroup_source': u'neutron', u'status': u'active', 'alarming_api_version': '2', '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 3, cmd group openstack.identity.v3
object_store API version 1, cmd group openstack.object_store.v1
messaging API version 2, cmd group openstack.messaging.v2
baremetal API version 1.34, cmd group openstack.baremetal.v1
container_infra API version 1, cmd group openstack.container_infra.v1
orchestration API version 1, cmd group openstack.orchestration.v1
baremetal_introspection API version 1, cmd group openstack.baremetal_introspection.v1
neutronclient API version 2, cmd group openstack.neutronclient.v2
workflow_engine API version 2, cmd group openstack.workflow_engine.v2
tripleoclient API version 1, cmd group openstack.tripleoclient.v1
dns API version 2, cmd group openstack.dns.v2
key_manager API version 1, cmd group openstack.key_manager.v1
alarming API version 2, cmd group openstack.alarming.v2
data_processing API version 1.1, cmd group openstack.data_processing.v1
database API version 1, cmd group openstack.database.v1
load_balancer API version 2.0, cmd group openstack.load_balancer.v2
clustering API version 1, cmd group openstack.clustering.v1
application_catalog API version 1, cmd group openstack.application_catalog.v1
artifact API version 1, cmd group openstack.artifact.v1
metric API version 1, cmd group openstack.metric.v1
tackerclient API version 1, cmd group openstack.tackerclient.v1
Auth plugin password selected
auth_config_hook(): {'auth_type': 'password', 'beta_command': False, 'tripleoclient_api_version': '1', u'compute_api_version': u'2', 'key': None, u'database_api_version': '1', 'metrics_api_version': '1', 'data_processing_api_version': '1.1', 'inspector_api_version': '1', 'auth_url': 'http://192.168.24.1:5000/', u'network_api_version': u'2', u'message': u'', u'image_format': u'qcow2', 'networks': [], u'image_api_version': u'2', 'clustering_api_version': '1', 'verify': True, u'dns_api_version': '2', u'object_store_api_version': u'1', 'username': 'admin', u'container_infra_api_version': '1', 'loadbalancer_api_version': '2.0', 'verbose_level': 3, 'region_name': '', 'api_timeout': None, u'baremetal_api_version': '1.34', 'queues_api_version': '2', 'auth': {'user_domain_name': 'Default', 'project_name': 'admin', 'project_domain_name': 'Default'}, 'default_domain': 'default', u'container_api_version': u'1', u'image_api_use_tasks': False, u'floating_ip_source': u'neutron', u'orchestration_api_version': '1', 'timing': False, 'password': '***', u'application_catalog_api_version': '1', 'murano_packages_service': 'murano', 'cacert': None, u'key_manager_api_version': '1', u'metering_api_version': u'2', 'deferred_help': False, u'identity_api_version': '3', u'workflow_api_version': '2', u'volume_api_version': u'2', 'tacker_api_version': '1', 'cert': None, u'secgroup_source': u'neutron', u'status': u'active', 'alarming_api_version': '2', 'debug': True, u'interface': None, u'disable_vendor_agent': {}}
Auth plugin password selected
auth_config_hook(): {'auth_type': 'password', 'beta_command': False, 'tripleoclient_api_version': '1', u'compute_api_version': u'2', 'key': None, u'database_api_version': '1', 'metrics_api_version': '1', 'data_processing_api_version': '1.1', 'inspector_api_version': '1', 'auth_url': 'http://192.168.24.1:5000/', u'network_api_version': u'2', u'message': u'', u'image_format': u'qcow2', 'networks': [], u'image_api_version': u'2', 'clustering_api_version': '1', 'verify': True, u'dns_api_version': '2', u'object_store_api_version': u'1', 'username': 'admin', u'container_infra_api_version': '1', 'loadbalancer_api_version': '2.0', 'verbose_level': 3, 'region_name': '', 'api_timeout': None, u'baremetal_api_version': '1.34', 'queues_api_version': '2', 'auth': {'user_domain_name': 'Default', 'project_name': 'admin', 'project_domain_name': 'Default'}, 'default_domain': 'default', u'container_api_version': u'1', u'image_api_use_tasks': False, u'floating_ip_source': u'neutron', u'orchestration_api_version': '1', 'timing': False, 'password': '***', u'application_catalog_api_version': '1', 'murano_packages_service': 'murano', 'cacert': None, u'key_manager_api_version': '1', u'metering_api_version': u'2', 'deferred_help': False, u'identity_api_version': '3', u'workflow_api_version': '2', u'volume_api_version': u'2', 'tacker_api_version': '1', 'cert': None, u'secgroup_source': u'neutron', u'status': u'active', 'alarming_api_version': '2', 'debug': True, u'interface': None, u'disable_vendor_agent': {}}
command: complete -> cliff.complete.CompleteCommand (auth=False)
Auth plugin password selected
auth_config_hook(): {'auth_type': 'password', 'beta_command': False, 'tripleoclient_api_version': '1', u'compute_api_version': u'2', 'key': None, u'database_api_version': '1', 'metrics_api_version': '1', 'data_processing_api_version': '1.1', 'inspector_api_version': '1', 'auth_url': 'http://192.168.24.1:5000/', u'network_api_version': u'2', u'message': u'', u'image_format': u'qcow2', 'networks': [], u'image_api_version': u'2', 'clustering_api_version': '1', 'verify': True, u'dns_api_version': '2', u'object_store_api_version': u'1', 'username': 'admin', u'container_infra_api_version': '1', 'loadbalancer_api_version': '2.0', 'verbose_level': 3, 'region_name': '', 'api_timeout': None, u'baremetal_api_version': '1.34', 'queues_api_version': '2', 'auth': {'user_domain_name': 'Default', 'project_name': 'admin', 'project_domain_name': 'Default'}, 'default_domain': 'default', u'container_api_version': u'1', u'image_api_use_tasks': False, u'floating_ip_source': u'neutron', u'orchestration_api_version': '1', 'timing': False, 'password': '***', u'application_catalog_api_version': '1', 'murano_packages_service': 'murano', 'cacert': None, u'key_manager_api_version': '1', u'metering_api_version': u'2', 'deferred_help': False, u'identity_api_version': '3', u'workflow_api_version': '2', u'volume_api_version': u'2', 'tacker_api_version': '1', 'cert': None, u'secgroup_source': u'neutron', u'status': u'active', 'alarming_api_version': '2', 'debug': True, u'interface': None, u'disable_vendor_agent': {}}
get_parser(openstack ip floating list)
common parser: ArgumentParser(prog='openstack ip floating list', usage=None, description=u'List floating IP(s)', version=None, formatter_class=<class 'cliff.command._SmartHelpFormatter'>, conflict_handler='error', add_help=True)
No service catalog
get_parser(openstack floating ip pool list)
common parser: ArgumentParser(prog='openstack floating ip pool list', usage=None, description=u'List pools of floating IP addresses', version=None, formatter_class=<class 'cliff.command._SmartHelpFormatter'>, conflict_handler='error', add_help=True)
No service catalog
get_parser(openstack security group rule show)
common parser: ArgumentParser(prog='openstack security group rule show', usage=None, description=u'Display security group rule details', version=None, formatter_class=<class 'cliff.command._SmartHelpFormatter'>, conflict_handler='error', add_help=True)
No service catalog
No module named magclient.osc.v1.quotas
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/cliff/app.py", line 400, in run_subcommand
    result = cmd.run(parsed_args)
  File "/usr/lib/python2.7/site-packages/cliff/command.py", line 184, in run
    return_code = self.take_action(parsed_args) or 0
  File "/usr/lib/python2.7/site-packages/cliff/complete.py", line 217, in take_action
    dicto.add_command(command, self.get_actions(command))
  File "/usr/lib/python2.7/site-packages/cliff/complete.py", line 194, in get_actions
    the_cmd = self.app.command_manager.find_command(command)
  File "/usr/lib/python2.7/site-packages/cliff/commandmanager.py", line 102, in find_command
    cmd_factory = cmd_ep.resolve()
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2235, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
ImportError: No module named magclient.osc.v1.quotas
clean_up CompleteCommand: No module named magclient.osc.v1.quotas
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/osc_lib/shell.py", line 134, in run
    ret_val = super(OpenStackShell, self).run(argv)
  File "/usr/lib/python2.7/site-packages/cliff/app.py", line 279, in run
    result = self.run_subcommand(remainder)
  File "/usr/lib/python2.7/site-packages/osc_lib/shell.py", line 169, in run_subcommand
    ret_value = super(OpenStackShell, self).run_subcommand(argv)
  File "/usr/lib/python2.7/site-packages/cliff/app.py", line 400, in run_subcommand
    result = cmd.run(parsed_args)
  File "/usr/lib/python2.7/site-packages/cliff/command.py", line 184, in run
    return_code = self.take_action(parsed_args) or 0
  File "/usr/lib/python2.7/site-packages/cliff/complete.py", line 217, in take_action
    dicto.add_command(command, self.get_actions(command))
  File "/usr/lib/python2.7/site-packages/cliff/complete.py", line 194, in get_actions
    the_cmd = self.app.command_manager.find_command(command)
  File "/usr/lib/python2.7/site-packages/cliff/commandmanager.py", line 102, in find_command
    cmd_factory = cmd_ep.resolve()
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2235, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
ImportError: No module named magclient.osc.v1.quotas

END return value: 1

Noam Angel (noama)
tags: added: queens-backport-potential
Revision history for this message
Julie Pichon (jpichon) wrote :

$ openstack help complete
[...]
This command is provided by the cliff plugin.

It looks like the "complete" command is implemented in cliff, switching component.

affects: tripleo → python-cliff
Revision history for this message
Doug Hellmann (doug-hellmann) wrote :

Although the "complete" command is provided by the framework, it is up to the plugins and users of cliff to set things up properly. If cliff eats the exception developers won't see it.

In this case it sounds like either an environment is misconfigured (a plugin is registered but not installed, or its dependencies are not installed). I don't know what "magclient" is so I don't know what plugin that could be.

Which version of OSC is used? What other packages are installed?

affects: python-cliff → python-openstackclient
Changed in python-openstackclient:
status: New → Incomplete
Revision history for this message
Noam Angel (noama) wrote :

I have reinstalled the undercloud again and that is the version i get with the error.

$ openstack complete
No module named magclient.osc.v1.quotas
$ openstack --version
openstack 3.14.1

I think magclient is magnumclient

Revision history for this message
Noam Angel (noama) wrote :

python2-designateclient-2.9.0-0.20180211221136.65cc292.el7.centos.noarch
python2-magnumclient-2.9.0-0.20180305153838.1385866.el7.centos.noarch
python2-muranoclient-1.0.1-0.20180216002752.2944800.el7.centos.noarch
python2-keystoneclient-3.15.0-0.20180211175653.1e8c930.el7.centos.noarch
python-ironic-inspector-client-3.1.1-0.20180314115502.c65ff94.el7.centos.noarch
python2-ncclient-0.4.7-5.el7.noarch
python2-manilaclient-1.21.0-0.20180211215650.27c189f.el7.centos.noarch
puppet-ipaclient-2.5.2-0.20180216000114.b086731.el7.centos.noarch
dhclient-4.2.5-58.el7.centos.3.x86_64
python2-glareclient-0.5.2-0.20180219215809.6da299f.el7.centos.noarch
python2-tackerclient-0.11.0-0.20180211231620.8509a59.el7.centos.noarch
python-websocket-client-0.34.0-3.el7.noarch
python2-novaclient-9.1.1-0.20180213141814.a1c0074.el7.centos.noarch
python2-openstackclient-3.14.1-0.20180402185834.a3caf7b.el7.centos.noarch
python2-os-client-config-1.29.0-0.20180211214132.ed71a59.el7.centos.noarch
python2-octaviaclient-1.4.0-0.20180219220313.830e49f.el7.centos.noarch
python2-zaqarclient-1.9.0-0.20180211232746.c1689bf.el7.centos.noarch
cups-client-1.6.3-29.el7.x86_64
python-openstackclient-lang-3.14.1-0.20180402185834.a3caf7b.el7.centos.noarch
openssh-clients-7.4p1-13.el7_4.x86_64
glusterfs-client-xlators-3.8.4-18.4.el7.centos.x86_64
python2-ceilometerclient-2.9.0-0.20180210123537.3b4e35a.el7.centos.noarch
python2-troveclient-2.14.0-0.20180216003748.e30e8db.el7.centos.noarch
python-dracclient-1.3.2-0.20180326174322.a8ef5bf.el7.centos.noarch
python2-gnocchiclient-7.0.1-0.20180213170923.e35af68.el7.centos.noarch
python2-heatclient-1.14.0-0.20180213175737.2ce6aa1.el7.centos.noarch
python2-mistralclient-3.3.0-0.20180215125917.1008e4e.el7.centos.noarch
python-tripleoclient-9.2.1-0.20180410161616.1c1af2a.el7.centos.noarch
libvirt-client-3.2.0-14.el7_4.9.x86_64
python2-monascaclient-1.10.0-0.20180213171455.5ea9035.el7.centos.noarch
python2-saharaclient-1.5.0-0.20180213173808.ee5f173.el7.centos.noarch
python2-ironicclient-2.2.0-0.20180211230646.683b7c6.el7.centos.noarch
python2-cinderclient-3.5.0-0.20180211213738.1de605c.el7.centos.noarch
python2-barbicanclient-4.6.0-0.20180211180442.262025b.el7.centos.noarch
python2-senlinclient-1.7.0-0.20180213202846.e6cdf2d.el7.centos.noarch
python2-glanceclient-2.9.1-0.20180211173704.b982516.el7.centos.noarch
dibbler-client-1.0.1-0.RC1.2.el7.x86_64
python2-aodhclient-1.0.0-0.20180211222211.86ac8fd.el7.centos.noarch
python2-scciclient-0.6.1-0.20180213201842.6c3c54f.el7.centos.noarch
python2-swiftclient-3.5.0-0.20180211175153.b91651e.el7.centos.noarch
python2-neutronclient-6.7.0-0.20180211221651.95d64ce.el7.centos.noarch
docker-client-1.13.1-53.git774336d.el7.centos.x86_6

Revision history for this message
Amir Neumann (amirneumann) wrote :

Hi Noam,
Yes, magclient is magnumclient, so as a workaround I've created the following link:
sudo ln -s /usr/lib/python2.7/site-packages/magnumclient /usr/lib/python2.7/site-packages/magclient

Revision history for this message
Noam Angel (noama) wrote :

thanks a lot Amir, this workaround works well!

Revision history for this message
Pavlo Shchelokovskyy (pshchelo) wrote :

magnumclient had wrong entrypoints to its classes for OSC plugin, is being fixed in https://review.openstack.org/#/c/566245/

Also, zunclient / master will break OSC bash completion, is being fixed in https://review.openstack.org/#/c/566250/

Changed in python-openstackclient:
assignee: nobody → Pavlo Shchelokovskyy (pshchelo)
Revision history for this message
Pavlo Shchelokovskyy (pshchelo) wrote :

patches to python-magnumclient (master and Queens) and python-zunclient (master) have been merged.
(https://review.openstack.org/#/q/topic:bug/1762316)

Should we wait for new releases of these libs + bump in OSC requirements to call this bug closed?

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-magnumclient 2.9.1

This issue was fixed in the openstack/python-magnumclient 2.9.1 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-magnumclient 2.10.0

This issue was fixed in the openstack/python-magnumclient 2.10.0 release.

Revision history for this message
Pavlo Shchelokovskyy (pshchelo) wrote :

this can be closed I guess

Changed in python-openstackclient:
assignee: Pavlo Shchelokovskyy (pshchelo) → nobody
Revision history for this message
Artem Goncharov (gtema) wrote :

Not an issue of the OSC itself

Changed in python-openstackclient:
status: Incomplete → Invalid
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.