Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Bravetools fails to deploy an image on a remote if using the source image on the remote #204

Closed
idroz opened this issue Nov 20, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@idroz
Copy link
Contributor

idroz commented Nov 20, 2022

Consider the following set up:

  1. A remote amd64 is added to Bravetools
  2. The remote amd64 is used to build an image (see Bravefile below)
  3. The resulting image is pushed to the remote
  4. brave deploy is run with amd64 remote as the target for a deployed unit.

Since the image already exists on the remote, LXD raises an error:

failed to import image: Image with same fingerprint already exists

A possible work around is to check if the image exists on the remote and not re-import it during brave deploy.

Bravefile:

image: amd64:python/3.10
base:
  image: alpine/edge
  location: public
packages:
  manager: apk
  system:
  - bash
  - python3
run:
- command: sh
  args:
  - -c
  - echo Hello World
service:
  name: python
  docker: "no"
  resources:
    ram: 4GB
    cpu: 2
    gpu: "no"
@idroz idroz added the bug Something isn't working label Nov 20, 2022
idroz added a commit that referenced this issue Nov 20, 2022
address #204 by checking if the image already exists in LXD store
@idroz
Copy link
Contributor Author

idroz commented Nov 20, 2022

Closed over #209

@idroz idroz closed this as completed Nov 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant