You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, references to docker images defined in rock-ons' json files are stored in the storageadmin_dimage table under the DImage model.
When parsing the json file, the "image" object fed to the DImage model, along with the associated tag, but only the image name and not its tag is used. As a result, if the same image is used in the same or different rock-ons but with a different tag, it will not be updated and only the first set will be registered and thus used for all.
io, created = DImage.objects.get_or_create(name=c_d['image'],
defaults=defaults)
As stated above, we are feeding the DImage model filtering by image name, for each container in the json, so this does not allow to have the same image with different tags in the same rock-on, such as in the following test json:
The situation above may not happen, but the case of two different rock-ons using the same image but with a different tag is more likely to arise.
We should thus take the "tag" object from the json file when feeding and updating the DImage model.
Either one of these problematic situations is not very likely to happen, however (and hasn't been reported yet), so addressing this shortcoming may be considered for a future enhancement.
Up to you @schakrava and @phillxnet to set priority on this one.
The text was updated successfully, but these errors were encountered:
This issue was identified while reviewing #2016
Currently, references to docker images defined in rock-ons' json files are stored in the storageadmin_dimage table under the
DImage
model.When parsing the json file, the
"image"
object fed to theDImage
model, along with the associated tag, but only the image name and not its tag is used. As a result, if the same image is used in the same or different rock-ons but with a different tag, it will not be updated and only the first set will be registered and thus used for all.The code in question is from rockon.py:
As stated above, we are feeding the
DImage
model filtering by image name, for each container in the json, so this does not allow to have the same image with different tags in the same rock-on, such as in the following test json:The situation above may not happen, but the case of two different rock-ons using the same image but with a different tag is more likely to arise.
We should thus take the
"tag"
object from the json file when feeding and updating theDImage
model.Either one of these problematic situations is not very likely to happen, however (and hasn't been reported yet), so addressing this shortcoming may be considered for a future enhancement.
Up to you @schakrava and @phillxnet to set priority on this one.
The text was updated successfully, but these errors were encountered: