cinder-manage ignores --sql_connection parameter

Bug #1175530 reported by Martin Mágr
This bug report is a duplicate of:  Bug #1176817: Give priority to CLI args. Edit Remove
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
In Progress
Low
Unassigned
Glance
Confirmed
Undecided
Unassigned

Bug Description

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@192.168.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.

Revision history for this message
Vincent Hou (houshengbo) wrote :

For Glance, it is the same.
--sql_connection is a valid parameter, but it does not work.

Changed in cinder:
status: New → Confirmed
Changed in glance:
status: New → Confirmed
Changed in cinder:
assignee: nobody → Vincent Hou (houshengbo)
Revision history for this message
Eric Harney (eharney) wrote :
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (master)

Fix proposed to branch: master
Review: https://review.openstack.org/29483

Changed in cinder:
status: Confirmed → In Progress
Revision history for this message
Vincent Hou (houshengbo) wrote :

After I double checked, this bug is still effect, even if the oslo bug (https://bugs.launchpad.net/oslo/+bug/1176817) is resolved, because many parts of cinder are still using FLAGS and the sql_connection should be imported from the cinder config.

Revision history for this message
Huang Zhiteng (zhiteng-huang) wrote :

This bug will be fixed once Olso bug is fixed: https://review.openstack.org/#/c/29459/

Changed in cinder:
assignee: Vincent Hou (houshengbo) → nobody
importance: Undecided → Low
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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