better exception handling for entrypoints

Bug #1503512 reported by Steve Martinelli
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
python-openstackclient
Invalid
Medium
Unassigned

Bug Description

this is adapted from a mailing list post:
http://lists.openstack.org/pipermail/openstack-dev/2015-October/076272.html

This is just a suggestion for contributors to python-openstackclient.

I saw a few packages that had conflicts with the namespace of others
within openstackclient. To the point that typing "openstack help" just
fails. Here's an example:

# openstack help
[ ...]
  project create Create new project
  project delete Delete project(s)
  project list List projects
  project set Set project properties
  project show Display project details
Could not load EntryPoint.parse('ptr_record_list =
designateclient.v2.cli.reverse:ListFloatingIPCommand')
'ArgumentParser' object has no attribute 'debug'

This first happened to me with saharaclient. Lucky, upgrading to latest
version fixed it. Then I had the problem with zaqarclient, which I fixed
with a few patches to its setup.cfg. Then now designate, but this time,
patching setup.cfg doesn't seem to cut it (ie: after changing the name
of the command, "openstack help" just fails).

Note: I don't care which project is at fault, this isn't the point here.
The point is that command name conflicts aren't handled (see below)
which is the problem.

With Horizon being a large consumer of nearly all python-*client
packages, removing one of them also removes Horizon in my CI which is
not what I want to (or can) do to debug a tempest problem. End of the
story: since Liberty b3, I never could have "openstack help" to work
correctly in my CI... :(

Which leads me to write this:

Since we have a very large amount of projects, with each and everyone of
them adding new commands to openstackclient, I would really nice if we
could have some kind of checks to make sure that conflicts are either 1/
not possible or 2/ handled gracefully.

Changed in python-openstackclient:
importance: Undecided → Medium
Changed in python-openstackclient:
status: New → Triaged
Revision history for this message
Kyrylo Romanenko (kromanenko) wrote :

This bug still actual on openstack client version 2.2.0.

Simplest test fails:
raw_output = self.openstack('help')

Error output:
http://paste.openstack.org/show/490519/

Failure occurs right after output of string:
configuration show Display configuration details

Next strings are:
  console log show Show server's console output
  console url show Show server's remote console URL

Those strings are only strings containing single quotes. Possibly parser fails on strings with single quotes.

Revision history for this message
Steve Martinelli (stevemar) wrote :

Looks like the congressclient version is out of whack, how is the test being performed? what version of congressclient is this running?

Revision history for this message
Kyrylo Romanenko (kromanenko) wrote :

Test is performed via "tox -e functional" from cloned openstackclient repo.
python-congressclient has a version 2015.1.0

Revision history for this message
Kyrylo Romanenko (kromanenko) wrote :

When i updated env according to test-requirements.txt, then "openstack help" became to fail even just in terminal with error:
Could not load EntryPoint.parse('acl_delete = barbicanclient.barbican_cli.acls:DeleteACLs')
'ArgumentParser' object has no attribute 'debug'

Revision history for this message
Steve Martinelli (stevemar) wrote :

I am going to close this bug as invalid now. We've done some good work in improving stevedore to not fall apart if it can't load an entrypoint, and we've added check jobs to each OSC plugin to check for overlapping entry points.

Changed in python-openstackclient:
status: Triaged → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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