force_config_drive cannot be set to False from nova.conf

Bug #1319180 reported by Dmitry Borodaenko
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Davanum Srinivas (DIMS)

Bug Description

force_config_drive is not cast to boolean, so the only way to disable this option is not to have it in nova.conf. If it is set to 'false' it is treated as a string and evaluates to true in configdrive.required_by()

Tracy Jones (tjones-i)
tags: added: compute
tags: added: low-hanging-fruit
Revision history for this message
Gary Kotton (garyk) wrote :

I am not sure that this is a bug. The default value is None. If this is set as None then it has the same functionality as False.
An alternative is that we check if this is "False" and then the method required_by will not invoke the config drive

Gary Kotton (garyk)
Changed in nova:
assignee: nobody → Gary Kotton (garyk)
milestone: none → juno-1
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

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

Changed in nova:
status: New → In Progress
Revision history for this message
Michael Still (mikal) wrote :

Dims has an updated version of the fix at https://review.openstack.org/#/c/93842/3

Changed in nova:
assignee: Gary Kotton (garyk) → Davanum Srinivas (DIMS) (dims-v)
Revision history for this message
John Garbutt (johngarbutt) wrote :

We use milestones only at the very end of the milestone to track bugs that should block the release of the milestone. Please use tags not milestones to track bugs, try things like: my_bug_topic_milestone_name

Changed in nova:
milestone: juno-1 → none
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/93842
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=de92d65f2981b826e145e82ab2734c19bf1dffa3
Submitter: Jenkins
Branch: master

commit de92d65f2981b826e145e82ab2734c19bf1dffa3
Author: Davanum Srinivas <email address hidden>
Date: Thu May 15 23:22:05 2014 -0400

    Test force_config_drive as a boolean as last resort

    The force_config_drive help clearly states that only possible option is
    'always' but folks are setting it to 'True'/'False' etc and expecting
    it to work. So let's enable that as well. In the worst case scenario
    mentioned in the bug, it was set to 'False' and since the check for
    force_config_drive took any string as true, we were enabling the flag
    to true. With the change in this review, we force a conversion of the
    string to true. Additional check for the flag to be set as 'always' is
    treated as true as well. The test case checks for all the variations

    Closes-Bug: #1319180
    DocImpact

    Change-Id: Ifa6348fa7dfd9de063eb13d30e3ddf94fa530b57

Changed in nova:
status: In Progress → Fix Committed
Changed in nova:
milestone: none → juno-2
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: juno-2 → 2014.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.