Problems interpretting ~

Bug #1012671 reported by Gary Kotton
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
openstack-common
Fix Released
Medium
Mark McLoughlin

Bug Description

When the config-file is set as "--config-file=~/etc/file.conf" then the following exception is received. Tried this with Quantum and glance.

Copenstack@openstack:/opt/stack/quantum$ cd /opt/stack/quantum && python /opt/stack/quantum/bin/quantum-server --config-file=~/etc/quantum.conf
Traceback (most recent call last):
File "/opt/stack/quantum/bin/quantum-server", line 24, in <module>
server()
File "/opt/stack/quantum/quantum/server/__init__.py", line 34, in main
config.parse(sys.argv)
File "/opt/stack/quantum/quantum/common/config.py", line 49, in parse
version='%%prog %s' % version_string())
File "/opt/stack/quantum/quantum/openstack/common/cfg.py", line 981, in __call__
self._parse_config_files()
File "/opt/stack/quantum/quantum/openstack/common/cfg.py", line 1403, in _parse_config_files
raise ConfigFilesNotFoundError(not_read_ok)
quantum.openstack.common.cfg.ConfigFilesNotFoundError: Failed to read some config files: ~/etc/quantum.conf
openstack@openstack:/opt/stack/quantum$

Note that if the = is removed then this works.

Mark McLoughlin (markmc)
Changed in openstack-common:
status: New → Triaged
importance: Undecided → Medium
assignee: nobody → Mark McLoughlin (markmc)
milestone: none → folsom-3
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to openstack-common (master)

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

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

Reviewed: https://review.openstack.org/11205
Committed: http://github.com/openstack/openstack-common/commit/0a36c92e84be0f432b8ce792834dc297196e09af
Submitter: Jenkins
Branch: master

commit 0a36c92e84be0f432b8ce792834dc297196e09af
Author: Mark McLoughlin <email address hidden>
Date: Sat Aug 11 12:21:51 2012 +0100

    Tilde expansion for --config-file and --config-dir

    Fixes bug #1012671

    Allow a filename starting with ~ or ~user to be passed for
    --config-file or --config-dir.

    Change-Id: I67705401ed1c35c0cc2161095e36616552740aba

Changed in openstack-common:
status: In Progress → Fix Committed
Mark McLoughlin (markmc)
Changed in openstack-common:
milestone: folsom-3 → 2012.2
status: Fix Committed → Fix Released
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.