Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

When matching a bootscript by name, we need to take into account its architecture #255

Closed
4 of 5 tasks
moul opened this issue Jan 5, 2016 · 1 comment
Closed
4 of 5 tasks
Assignees

Comments

@moul
Copy link
Contributor

moul commented Jan 5, 2016

todo

  • add region and architecture fields in cache entries (the region 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 by user/XXX = title matching XXX and owner = my organization id, community/XXX = community meta organization, public/XXX or XXX = 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 matching stable for the architecture armv7l
  • scw run --bootscript=stable my-arm64-image: bootscript matching stable for the architecture aarch64
  • scw run --bootscript=stable my-amd64-image: bootscript matching stable for the architecture x86_64

scw tag

  • scw tag --arch=arm --bootscript=latest my-snapshot: bootscript matching latest for architecture armv7l
  • scw tag --arch=x86_64 --bootscript=latest my-snapshot: bootscript matching latest for architecture x86_64
  • scw tag --arch=arm64 --bootscript=latest my-snapshot: bootscript matching latest 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
@moul
Copy link
Contributor Author

moul commented Jan 8, 2016

Closing as the only missing part already has its own issue (#212)

@moul moul closed this as completed Jan 8, 2016
clement-gilbert pushed a commit to clement-gilbert/scaleway-cli that referenced this issue Mar 3, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

2 participants