config drive is broken by one commit
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 715435c816b51b6
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: I61bfa4029897c7
+ def _check_
+ bool_like = True
+ try:
+ strutils.
+ 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 .
Changed in nova: | |
assignee: | nobody → Yaguang Tang (heut2008) |
Changed in nova: | |
milestone: | none → havana-1 |
Changed in nova: | |
importance: | Undecided → High |
importance: | High → Critical |
Changed in nova: | |
milestone: | havana-1 → 2013.2 |
Fix proposed to branch: master /review. openstack. org/29757
Review: https:/