Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1154592

Summary: Cinder list -> ERROR: The server has either erred or is incapable of performing the requested operation.
Product: Red Hat OpenStack Reporter: Tzach Shefi <tshefi>
Component: openstack-cinderAssignee: Eric Harney <eharney>
Status: CLOSED WONTFIX QA Contact: nlevinki <nlevinki>
Severity: unspecified Docs Contact:
Priority: high    
Version: 5.0 (RHEL 6)CC: eharney, scohen, sgotliv, tshefi, yeylon
Target Milestone: ---   
Target Release: 6.0 (Juno)   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-12-14 13:34:04 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Compressed Cinder logs
none
Recent cinder api.log
none
Cinder --debug list error none

Description Tzach Shefi 2014-10-20 09:17:15 UTC
Created attachment 948480 [details]
Compressed Cinder logs

Description of problem: Running on Blue QE test deployment getting this error:

[root@puma52 cinder(keystone_admin)]# cinder list
ERROR: The server has either erred or is incapable of performing the requested operation. (HTTP 500) (Request-ID: req-ed2e4c20-e859-4080-8a3c-fc1fa7a0889a)

It's a shared deployment, I'm not the sole admin.  
Cinder is configured with LVM. 

FYI system was upgraded (service by service) a few weeks back RHOS4 -> RHOS5, after the upgrade system worked fine. 

Version-Release number of selected component (if applicable):
RHEL6.5
python-cinderclient-1.0.9-1.el6ost.noarch
openstack-cinder-2014.1.2-3.el6ost.noarch
python-cinder-2014.1.2-3.el6ost.noarch

How reproducible:
Not sure, what caused or how to reproduce it. 

Steps to Reproduce:
1. Unsure what was done to cause this.  
2. I just tired to run Cinder list


Actual results:
[root@puma52 cinder(keystone_admin)]# cinder list
ERROR: The server has either erred or is incapable of performing the requested operation. (HTTP 500) (Request-ID: req-ed2e4c20-e859-4080-8a3c-fc1fa7a0889a)

Expected results:
Cinder list should return a list of volumes. 

Additional info:
Attaching Cinder logs.

Comment 2 Tzach Shefi 2014-10-20 11:00:07 UTC
Restarting qpidd didn't help , then restarted Cinder service - fixed issue.
FYI during Cinder restart these warnings came up on api.log:  

2014-10-20 13:53:21.619 8181 TRACE cinder.api.middleware.fault 
2014-10-20 13:53:31.680 122539 WARNING keystoneclient.middleware.auth_token [-] Configuring admin URI using auth fragments. This is deprecated, use 'identity_uri' instead.
2014-10-20 13:53:31.736 122539 WARNING keystoneclient.middleware.auth_token [-] Configuring admin URI using auth fragments. This is deprecated, use 'identity_uri' instead.
2014-10-20 13:53:31.738 122539 WARNING cinder.service [-] Value of config option osapi_volume_workers must be integer greater than 1.  Input value ignored.

Cinder list now works fine, Horizon volumes errors also gone.

Comment 3 Eric Harney 2014-10-20 13:15:30 UTC
It looks like the biggest problem is that Cinder API is having trouble talking to the SQL database:

"OperationalError: (OperationalError) (1040, 'Too many connections')" is repeatedly in the logs.

Cinder-volume also showed some problems talking to the AMQP server, but those are further in the past so I assume not relevant now.

How big is this deployment and how many database connections will the SQL server allow?  I assume this is a configuration/deployment issue in that area without more info to go on at this point.

Is this reproducable in that environment?

Comment 4 Tzach Shefi 2014-10-21 11:50:41 UTC
Deployment includes 6 hosts, fully distributed each node also runs nova compute services. At the moment running only 6 instances, it's also used for automation testing maybe that's what caused the spike. 

Can't reproduce issue, I have no idea what was done to cause this. 
I'll keep an eye open for it and try to figure out what caused this. 

How does one know\calculate a valid connection limit to set for a deployment? 

mysql> show status like 'Conn%';
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| Connections   | 69684 |
+---------------+-------+
1 row in set (0.03 sec)

mysql> select @@max_connections;
+-------------------+
| @@max_connections |
+-------------------+
|               151 |
+-------------------+
1 row in set (0.01 sec)

Comment 5 Tzach Shefi 2014-11-02 13:18:13 UTC
So this just happened again on Blue, attaching latest cinder.api logs. 

[root@puma51 ~(keystone_admin)]# cinder list
ERROR: The server has either erred or is incapable of performing the requested operation. (HTTP 500) (Request-ID: req-bd80f6ed-7475-439e-9eab-8374678150af)

Checking connection on MYSQL

mysql> select @@max_connections;
+-------------------+           
| @@max_connections |           
+-------------------+           
|               151 |           
+-------------------+           
1 row in set (0.00 sec)         

mysql> show status like 'Conn%';
+---------------+--------+      
| Variable_name | Value  |      
+---------------+--------+      
| Connections   | 125571 |      
+---------------+--------+      
1 row in set (0.00 sec)         

List of process 
http://pastebin.test.redhat.com/243685


Now all of a sudden without doing anything #Cinder list works OK.

If there is anything else I should check/do/report if this happens again please let me know.

Comment 6 Tzach Shefi 2014-11-02 13:19:50 UTC
Created attachment 952904 [details]
Recent cinder api.log

Comment 7 Tzach Shefi 2014-11-02 13:29:32 UTC
So I had run #cinder --debug list 
It does work but I noticed at the end of the output 

+--------------------------------------+-----------+--------------+------+-------------+----------+-------------+
|                  ID                  |   Status  | Display Name | Size | Volume Type | Bootable | Attached to |
+--------------------------------------+-----------+--------------+------+-------------+----------+-------------+
| 7b04d6a7-f26b-4ca8-bb75-a1ac4baecaa6 | available |              |  1   |     None    |  false   |             |
+--------------------------------------+-----------+--------------+------+-------------+----------+-------------+
[root@puma51 ~(keystone_admin)]# [root@puma51 ~(keystone_admin)]# cinder list
-bash: syntax error near unexpected token `('
[root@puma51 ~(keystone_admin)]# ERROR: The server has either erred or is incapable of performing the requested operation. (HTTP 500) (Request-ID: req-bd80f6ed-7475-439e-9eab-8374678150af)
-bash: syntax error near unexpected token `('
[root@puma51 ~(keystone_admin)]# [root@puma51 ~(keystone_admin)]# cinder list
-bash: syntax error near unexpected token `('
[root@puma51 ~(keystone_admin)]# ERROR: The server has either erred or is incapable of performing the requested operation. (HTTP 500) (Request-ID: req-bd80f6ed-7475-439e-9eab-8374678150af)


So my problem isn't gone, cinder manages to return an output despite still having some sort of http500 error.  Attaching full --debug output.

Comment 8 Tzach Shefi 2014-11-02 13:29:58 UTC
Created attachment 952905 [details]
Cinder --debug list error

Comment 9 Sergey Gotliv 2014-12-14 13:34:04 UTC
Tzahi, please, reopen if it still happens.