config drive is broken by one commit

Bug #1181991 reported by Yaguang Tang
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Critical
Yaguang Tang

Bug Description

config drive feature is broken by the follow commit

commit 715435c816b51b6ec8d38453326eecd35c339fd9
Author: Rick Harris <email address hidden>
Date: Tue May 14 15:23:55 2013 +0000

    Use strict=True instead of `is_valid_boolstr`

    Oslo's `bool_from_string` learned the `strict` keyword which allows
    callers to detect invalid boolean values, so we can use that instead
    of having a new Nova-specific function.

    Change-Id: I61bfa4029897c7304bd54d6cdae9f9a9bc4c1f78

+ def _check_config_drive(self, context, config_drive):
+ bool_like = True
+ try:
+ strutils.bool_from_string(config_drive, strict=True)
+ except ValueError:
+ bool_like = False
+
+ if config_drive is None:
+ return None, None
+ elif bool_like and config_drive not in (0, 1, '0', '1'):
+ # NOTE(sirp): '0' and '1' could be a bool value or an ID. Since
+ # there are many other ways to specify bools (e.g. 't', 'f'), it's
+ # better to treat as an ID.
+ return None, config_drive

when config_drive is True or False, from the code logic above, it is treated as an ID .

Yaguang Tang (heut2008)
Changed in nova:
assignee: nobody → Yaguang Tang (heut2008)
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/29757

Changed in nova:
status: New → In Progress
Thierry Carrez (ttx)
Changed in nova:
milestone: none → havana-1
Changed in nova:
importance: Undecided → High
importance: High → Critical
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/29757
Committed: http://github.com/openstack/nova/commit/4f44cd9129f094d88dfddfa5885c453590ac847c
Submitter: Jenkins
Branch: master

commit 4f44cd9129f094d88dfddfa5885c453590ac847c
Author: Yaguang Tang <email address hidden>
Date: Mon May 20 18:05:30 2013 +0800

    Fix config drive code logical error.

    Image id has changed to uuid, so bool value can't be a image ID
    any more, remove unnecessary test code.

    fix bug #1181991

    Change-Id: I420e4cdb848401375b347d43e06343efaa7bf5fc

Changed in nova:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (milestone-proposed)

Fix proposed to branch: milestone-proposed
Review: https://review.openstack.org/30969

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (milestone-proposed)

Reviewed: https://review.openstack.org/30969
Committed: http://github.com/openstack/nova/commit/94d87df93d82626a8f7d5e60f364fdbd411f6c6c
Submitter: Jenkins
Branch: milestone-proposed

commit 94d87df93d82626a8f7d5e60f364fdbd411f6c6c
Author: Yaguang Tang <email address hidden>
Date: Mon May 20 18:05:30 2013 +0800

    Fix config drive code logical error.

    Image id has changed to uuid, so bool value can't be a image ID
    any more, remove unnecessary test code.

    fix bug #1181991

    Change-Id: I420e4cdb848401375b347d43e06343efaa7bf5fc
    (cherry picked from commit 4f44cd9129f094d88dfddfa5885c453590ac847c)

Changed in nova:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: havana-1 → 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.