Images created by images context cannot be passed to scenario
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Rally |
Expired
|
Undecided
|
Unassigned |
Bug Description
If you create a named image with the images context, you cannot use that image name as an argument to a scenario. For instance:
NovaServers.
- args:
flavor:
name: m1.small
image:
name: fedora-22
context:
images:
image_url: http://
image_type: raw
image_
image_name: fedora-22
context:
users:
tenants: 2
...
This happens because the image is created as a non-public image in each ephemeral tenant, but ImageResourceTy
Unfortunately, it won't work to simply make ImageResourceType search all tenants, since the task I described above winds up creating two images named "fedora-22", and each run of the scenario must use the correct image. I think the best solution is to make preprocess() run for each scenario instead of for each task, and pass it the scenario context so that it had the non-admin creds that the scenario was being run with. That's obviously a big change, and it has a huge downside: most of the preprocessed resource types can be run just once for the entire task, not once per run. So we may need to split out two different ResourceType subclasses: one that applies per-task, and one that applies per-run.
Obviously this is a mess.
Chris,
Described workflow ahead is not what actually happens in real life.
First of all validation is executed before context classes are actually run. So at the moment of validation you don't have any images at all.
That's why during image validation we are analyzing whatever we use image_context or not. And if we are using we are expecting that we will have such image.
Here is the code: /github. com/openstack/ rally/blob/ master/ rally/task/ validation. py#L237
https:/