Error in logic to retrieve image details in image_valid_on_flavor
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Rally |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
After upgrading to Rally version 0.1.2, running NovaServers.
----
2016-01-26 01:19:22.839 19584 ERROR rally.task.scenario [-] 'min_ram'
2016-01-26 01:19:22.839 19584 ERROR rally.task.scenario Traceback (most recent call last):
2016-01-26 01:19:22.839 19584 ERROR rally.task.scenario File "/usr/lib/
2016-01-26 01:19:22.839 19584 ERROR rally.task.scenario deployment=
2016-01-26 01:19:22.839 19584 ERROR rally.task.scenario File "/usr/lib/
2016-01-26 01:19:22.839 19584 ERROR rally.task.scenario return (fn(config, clients, deployment, *args, **kwargs) or
2016-01-26 01:19:22.839 19584 ERROR rally.task.scenario File "/usr/lib/
2016-01-26 01:19:22.839 19584 ERROR rally.task.scenario if flavor.ram < (image["min_ram"] or 0):
2016-01-26 01:19:22.839 19584 ERROR rally.task.scenario KeyError: 'min_ram'
2016-01-26 01:19:22.839 19584 ERROR rally.task.scenario
Task config is invalid: `Input task is invalid!
Subtask NovaServers.
{'runner': {'type': 'constant', 'concurrency': 1, 'times': 1}, 'args': {'nics': [{'net-id': '42a02ea4-
Reason:
Invalid scenario argument: ''min_ram''
----
After asking on #openstack-rally IRC channel, boris-42 suggested the following solution http://
This 'image' variable is a dictionary and when the key "min_ram", "size", or "min_disk" does not exist, it throws a 'KeyError'. To fix this, we can use the get() method on the 'image' dictionary.
Andrey Kurilin, thanks for fixing my typo regarding the Rally version, sorry for the mix up :)