cinder-manage --config-dir is silently ignored if it's incorrect

Bug #1255354 reported by Russell Sim
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Low
Unassigned
oslo-incubator
Fix Released
Low
Jay Bryant

Bug Description

Hi,

It seems that if the config-dir path is not accessible by the cinder-manage process then it's ignored without either a message or an error.

This is different to the behavior of config-file which errors if the path is incorrect.

An example command like that exhibits this problem is

su cinder -c 'cinder-manage --config-dir /invalid-dir db sync'

Revision history for this message
Jay Bryant (jsbryant) wrote :

I can recreate the behavior. Need to look closer to see if this is a bug or not.

Changed in cinder:
status: New → Confirmed
importance: Undecided → Low
affects: cinder → python-cinderclient
affects: python-cinderclient → cinder
Revision history for this message
Russell Sim (russell-sim) wrote : Re: [Bug 1255354] Re: cinder-manage --config-dir is silently ignored if it's incorrect

Jay Bryant <email address hidden> writes:

> I can recreate the behavior. Need to look closer to see if this is a
> bug or not.

You should be able to just specify a made up path for the --config-dir
option and everything will work as if the path was a legitimate, which I
think is a problem.

I have tracked it down, to OSLO-Config.

Revision history for this message
Jay Bryant (jsbryant) wrote :

Russell, looks like you are right.

cfg.py makes no attempt to verify the existence or state of --config-dir . As a result, it puts together the glob for files (I.E. /invalid-dir/*.conf) and tries to get a list of files in there. The list is empty so it just moves on. I will propose a patch that checks the accessibility of the directory and one or more config files. See what people think of that.

Changed in oslo:
status: New → Confirmed
assignee: nobody → Jay Bryant (jsbryant)
Mike Perez (thingee)
Changed in cinder:
assignee: nobody → Jay Bryant (jsbryant)
status: Confirmed → Triaged
milestone: none → icehouse-2
Revision history for this message
Jay Bryant (jsbryant) wrote :

I am not sure why infra isn't updating the status of this bug, but I do have a patch for it out for review: https://review.openstack.org/#/c/62789/

Changed in cinder:
status: Triaged → In Progress
Changed in oslo:
status: Confirmed → In Progress
Changed in cinder:
status: In Progress → Triaged
Changed in cinder:
milestone: icehouse-2 → icehouse-3
Ben Nemec (bnemec)
Changed in oslo:
importance: Undecided → Low
milestone: none → icehouse-3
Changed in oslo:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in cinder:
milestone: icehouse-3 → icehouse-rc1
Thierry Carrez (ttx)
Changed in oslo:
status: Fix Committed → Fix Released
Changed in cinder:
milestone: icehouse-rc1 → none
milestone: none → next
Thierry Carrez (ttx)
Changed in oslo:
milestone: icehouse-3 → 2014.1
Changed in cinder:
assignee: Jay Bryant (jsbryant) → Yuriy Nesenenko (ynesenenko)
Changed in cinder:
status: Triaged → In Progress
Changed in cinder:
assignee: Yuriy Nesenenko (ynesenenko) → Mike Perez (thingee)
Changed in cinder:
assignee: Mike Perez (thingee) → Yuriy Nesenenko (ynesenenko)
Changed in cinder:
status: In Progress → Fix Committed
Revision history for this message
Sean McGinnis (sean-mcginnis) wrote :

Automatically unassigning due to inactivity.

Changed in cinder:
assignee: Yuriy Nesenenko (ynesenenko) → nobody
Thierry Carrez (ttx)
Changed in cinder:
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.