Bug 958782 - glance-manage ignores --sql_connection parameter
Summary: glance-manage ignores --sql_connection parameter
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-glance
Version: 3.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: beta
: 4.0
Assignee: Flavio Percoco
QA Contact: Attila Fazekas
URL:
Whiteboard: storage
Depends On: 960670 1045049
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-05-02 11:59 UTC by Martin Magr
Modified: 2016-04-26 20:05 UTC (History)
5 users (show)

Fixed In Version: openstack-glance-2013.2-3.el6ost
Doc Type: Bug Fix
Doc Text:
oslo.config now prioritises CLI arguments over parameters supplied in config files. If CLI parameters include both config files and arguments, then the values specified in the arguments will take precedence. Before this fix, oslo.config gave priority to configuration parameters in config files over those specified in the CLI.
Clone Of:
Environment:
Last Closed: 2013-12-20 00:01:59 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Launchpad 1175570 0 None None None Never
OpenStack gerrit 41678 0 None None None Never
Red Hat Product Errata RHEA-2013:1859 0 normal SHIPPED_LIVE Red Hat Enterprise Linux OpenStack Platform Enhancement Advisory 2013-12-21 00:01:48 UTC

Description Martin Magr 2013-05-02 11:59:26 UTC
Description of problem:
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.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>


Version-Release number of selected component (if applicable):
[para@virtual-rhel packstack]$ rpm -qa openstack-glance
openstack-glance-2013.1-1.el6.noarch

Comment 2 Flavio Percoco 2013-05-06 09:01:42 UTC
Unfortunately, this is not a bug. 

Oslo.config 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

Comment 4 Flavio Percoco 2013-05-08 18:43:27 UTC
This is an python-oslo-config bug so it makes sense to track it there:

https://bugzilla.redhat.com/show_bug.cgi?id=960670

Comment 7 Ayal Baron 2013-10-17 20:36:33 UTC
Flavio, what is the status of this bug?

Comment 8 Flavio Percoco 2013-10-18 16:50:45 UTC
This was fixed and released in Havana. The package for oslo.config was already created - python-oslo-config-1.2.0-0.3.a3.el6ost - and the bug[0] moved to MODIFIED.

[0] https://bugzilla.redhat.com/show_bug.cgi?id=960670

Comment 13 Attila Fazekas 2013-12-02 09:01:41 UTC
The password in the registry.conf is wrong:
# glance-manage  db_sync
2013-12-02 08:59:33.654 26428 CRITICAL glance [-] (OperationalError) (1045, "Access denied for user 'glance'@'172.16.0.24' (using password: YES)") None None

good password in the cli:
# glance-manage --sql_connection mysql://glance:61bbaaeb249d40f5.0.24/glance  db_sync
#

Comment 17 errata-xmlrpc 2013-12-20 00:01:59 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHEA-2013-1859.html


Note You need to log in before you can comment on or make changes to this bug.