Public bug reported:

When calling the CloudKitty API using victoria release I get the
following error:

```
(openstack) [stack@cranky ~]$ cloudkitty module list
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>500 Internal Server Error</title>
</head><body>
<h1>Internal Server Error</h1>
<p>The server encountered an internal error or
misconfiguration and was unable to complete
your request.</p>
<p>Please contact the server administrator at
 root@localhost to inform them of the time this error occurred,
 and the actions you performed just before this error.</p>
<p>More information about this error may be available
in the server error log.</p>
</body></html>
 (HTTP 500)
```

In the logs I see:

```                                                                             
                                   
                                                                                
                                                                              
==> cloudkitty-api-error.log <==                                                
                                                                              
[Fri Mar 05 15:47:56.212556 2021] [wsgi:error] [pid 29:tid 139710101341952] 
[remote 10.103.1.12:50752]     return self.object_type.invoke(self)             
  
[Fri Mar 05 15:47:56.212563 2021] [wsgi:error] [pid 29:tid 139710101341952] 
[remote 10.103.1.12:50752]   File 
"/var/lib/kolla/venv/lib/python3.6/site-packages
/paste/deploy/loadwsgi.py", line 152, in invoke                                 
                                                                              
[Fri Mar 05 15:47:56.212572 2021] [wsgi:error] [pid 29:tid 139710101341952] 
[remote 10.103.1.12:50752]     return fix_call(context.object, 
context.global_conf
, **context.local_conf)                                                         
                                                                              
[Fri Mar 05 15:47:56.212581 2021] [wsgi:error] [pid 29:tid 139710101341952] 
[remote 10.103.1.12:50752]   File 
"/var/lib/kolla/venv/lib/python3.6/site-packages
/paste/deploy/util.py", line 55, in fix_call                                    
                                                                              
[Fri Mar 05 15:47:56.212585 2021] [wsgi:error] [pid 29:tid 139710101341952] 
[remote 10.103.1.12:50752]     val = callable(*args, **kw)                      
  
[Fri Mar 05 15:47:56.212595 2021] [wsgi:error] [pid 29:tid 139710101341952] 
[remote 10.103.1.12:50752]   File 
"/var/lib/kolla/venv/lib/python3.6/site-packages
/cloudkitty/api/app.py", line 99, in app_factory                                
                                                                              
[Fri Mar 05 15:47:56.212604 2021] [wsgi:error] [pid 29:tid 139710101341952] 
[remote 10.103.1.12:50752]     return setup_app()                               
  
[Fri Mar 05 15:47:56.212611 2021] [wsgi:error] [pid 29:tid 139710101341952] 
[remote 10.103.1.12:50752]   File 
"/var/lib/kolla/venv/lib/python3.6/site-packages
/cloudkitty/api/app.py", line 72, in setup_app                                  
                                                                              
[Fri Mar 05 15:47:56.212616 2021] [wsgi:error] [pid 29:tid 139710101341952] 
[remote 10.103.1.12:50752]     app = wsgi.DispatcherMiddleware(root_app, 
dispatch_
dict)                                                                           
                                                                              
[Fri Mar 05 15:47:56.212639 2021] [wsgi:error] [pid 29:tid 139710101341952] 
[remote 10.103.1.12:50752] AttributeError: module 'werkzeug.wsgi' has no 
attribute
 'DispatcherMiddleware'                                                         
                                                                              

```

I can fix this by changing the way that DispatcherMiddleware is
imported.

I see that Werkzeug==1.0.1 is installed, according to upper constraints:
https://github.com/openstack/requirements/blob/stable/victoria/upper-constraints.txt

If I downgrade Werkzeug to 0.16.0, the DispatcherMiddleware is loaded:

```
(openstack) [stack@cranky ~]$ cloudkitty module list
+-----------+---------+----------+
| Module    | Enabled | Priority |
+-----------+---------+----------+
| hashmap   | False   |        1 |
| noop      | True    |        1 |
| pyscripts | False   |        1 |

```

The regression appears to have occurred with the 0.16.1 release of
Werkzeug (used in Ussuri onwards).

** Affects: cloudkitty (Ubuntu)
     Importance: Undecided
         Status: Invalid

** Bug watch added: github.com/pallets/werkzeug/issues #1663
   https://github.com/pallets/werkzeug/issues/1663

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1917911

Title:
  module 'werkzeug.wsgi' has no attribute 'DispatcherMiddleware'

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/cloudkitty/+bug/1917911/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to