Comment 0 for bug 1301374

Revision history for this message
Julie Pichon (jpichon) wrote :

The handle() method for worflows expects a boolean to be returned to indicate if the workflow completed successfully, however returning False results in two error messages being displayed.

https://github.com/openstack/horizon/blob/f4282f73ec/horizon/workflows/base.py#L808

You can reproduce by causing an error somewhere where we use the handle() method and return False. For example:

1. Go to the Access & Security page
2. Click on Allocate IP
3. Turn off the Neutron service (or nova-network if using it for networking)
4. Click on "Allocate IP" in the modal: 2 error messages are displayed ("Error: Connection to neutron failed: Maximum attempts reached" and "Error: Connection to neutron failed: Maximum attempts reached")

 https://github.com/openstack/horizon/blob/f4282f73ec/openstack_dashboard/dashboards/project/access_and_security/floating_ips/workflows.py#L143

I suspect it's because both exceptions.handle() and the workflows call on messages.error():

https://github.com/openstack/horizon/blob/f4282f73ec/horizon/workflows/views.py#L200
https://github.com/openstack/horizon/blob/f4282f73ec/horizon/exceptions.py#L215