Closed
Description
todo
- add
region
andarchitecture
fields in cache entries (theregion
cache is for later, just create the field for now) - populate
architecture
field in cache entries when possible - update the cache helpers to take an optional architecture argument, if the argument is present, skip the other architectures
- when matching a bootscript with another object context (
scw run
(image context),scw tag --architecture
(architecture argument)), pass the architecture argument to the cache resolver - Bonus: related with Reduce resolver matching conflicts on 'create' and 'run' #212, if you feel the courage, also add a
owner
field, so we can filter byuser/XXX
=title
matchingXXX
andowner
= my organization id,community/XXX
= community meta organization,public/XXX
orXXX
= entity with public=True (official images/bootscripts)
Note: do not create a commercial-type
->architecture
mapping nor an architecture aliases
mapping, for now we need to write the exactly same architecture
example
scw run
scw run --bootscript=stable my-arm-image
: bootscript matchingstable
for the architecturearmv7l
scw run --bootscript=stable my-arm64-image
: bootscript matchingstable
for the architectureaarch64
scw run --bootscript=stable my-amd64-image
: bootscript matchingstable
for the architecturex86_64
scw tag
scw tag --arch=arm --bootscript=latest my-snapshot
: bootscript matchinglatest
for architecture armv7lscw tag --arch=x86_64 --bootscript=latest my-snapshot
: bootscript matchinglatest
for architecture x86_64scw tag --arch=arm64 --bootscript=latest my-snapshot
: bootscript matchinglatest
for architecture aarch64
live example
Actually we have this error when trying to tag with a bad bootscript
FATA[0001] cannot execute 'tag': cannot create image: Image and Bootscript architecture should be the same