Bug 958725

Summary: cinder-manage ignores --sql_connection parameter
Product: Red Hat OpenStack Reporter: Martin Magr <mmagr>
Component: openstack-cinderAssignee: Flavio Percoco <fpercoco>
Status: CLOSED NOTABUG QA Contact: Giulio Fidente <gfidente>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 3.0CC: abaron, eharney, ykaul
Target Milestone: ---   
Target Release: 3.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-05-14 09:20:30 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:

Description Martin Magr 2013-05-02 10:04:29 UTC
Description of problem:
cinder-manage ignores --sql_connection parameter and uses some default. Not sure from where, because this option is commented in cinder.conf:
[para@virtual-rhel packstack]$ sudo cat /etc/cinder/cinder.conf | grep connection
#connection_type=<None>
#sql_connection=mysql://cinder:cinder@localhost/cinder
#sql_connection_debug=0

I've added "print 'used connection: %s' % FLAGS.sql_connection" to cinder/db/sqlalchemy/session.py:113 and output is following:
[para@virtual-rhel packstack]$ sudo cinder-manage --sql_connection=mysql://cinder:66ff39612f704b01.122.71/cinder db sync
used connection: mysql://cinder:cinder@localhost/cinder
2013-05-02 11:57:48 10457 WARNING cinder.db.sqlalchemy.session [-] SQL connection failed. 10 attempts left.

Version-Release number of selected component (if applicable):
[para@virtual-rhel packstack]$ rpm -qa openstack-cinder
openstack-cinder-2012.2.4-3.el6ost.noarch