glance-manage ignores --sql_connection parameter

Bug #1175570 reported by Martin Mágr
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance
Fix Released
Medium
Flavio Percoco

Bug Description

glance-manage ignores --sql_connection parameter and uses connection from config file /etc/glance/glance-registry.conf . CLI parameter should override setting from config file.

[para@virtual-rhel packstack]$ sudo glance-manage --sql_connection="mysql://glance:4437d490c3cf4c50@192.168.122.71/glance" db_sync
2013-05-02 13:52:52.543 13954 CRITICAL glance [-] (OperationalError) (2002, "Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)") None None
[para@virtual-rhel packstack]$ mysql -h 192.168.122.71 -u'glance' -p'4437d490c3cf4c50' glance
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 165
Server version: 5.1.66 Source distribution

Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql>

Changed in glance:
assignee: nobody → Flavio Percoco (flaper87)
importance: Undecided → Medium
Changed in glance:
status: New → Triaged
Revision history for this message
Flavio Percoco (flaper87) wrote :

Unfortunately, this is not a bug. Oslo currently gives priority to config files instead of cli arguments, which is the expected behavior. I started a discussion on the m-l proposing to invert this behavior.

http://lists.openstack.org/pipermail/openstack-dev/2013-May/008551.html

Revision history for this message
Zhongyue Luo (zyluo) wrote :

The patch to fix this is at:

https://review.openstack.org/#/c/29459/

Revision history for this message
Justin Shepherd (jshepher) wrote :

Should this be marked as "won't fix" per Flavio's comment above?

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to glance (master)

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

Changed in glance:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to glance (master)

Reviewed: https://review.openstack.org/41678
Committed: http://github.com/openstack/glance/commit/e7054811273aec89e6e40a5dd889c0df1f9576a7
Submitter: Jenkins
Branch: master

commit e7054811273aec89e6e40a5dd889c0df1f9576a7
Author: Flaper Fesp <email address hidden>
Date: Tue Aug 13 15:11:49 2013 +0200

    Use latest Oslo's version

    The patch replaces current Oslo version with 1.2. The change is needed
    to pull in a fix released in that specific version, which fixes the
    issue #1175570. The fix we're interested in is giving priority to CLI
    arguments instead of config files. Without this, commands like the one
    below won't work.

        $ glance-manage --sql_connection=.... db_sync

    Oslo's release notes:
    http://docs.openstack.org/developer/oslo.config/#a3

    Closes-Bug: #1175570
    Change-Id: I4ea749cfaae0e18e035abe7b5d7e345dda7d476d

Changed in glance:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in glance:
milestone: none → havana-3
status: Fix Committed → Fix Released
Revision history for this message
Yang Yu (yuyangbj) wrote : I will be on vacation from 9/5 to 9/15, urgent call: 13811509950

I will be out of the office starting 2013-09-05 and will not return until
2013-09-15.

I will be on my marriage leave from 9/5 to 9/15, for any urgent issue
please call me before 9/7.

For daily work, please ask my scrum master Zhu Zhu for help.
For glance issue, please ask glance SME Feilong Wang for help.
For defect report, there will be no report next week.

Thierry Carrez (ttx)
Changed in glance:
milestone: havana-3 → 2013.2
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.