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

feat: linux/arm64 support for sync helper #1389

Closed
altitudems opened this issue Apr 4, 2021 · 6 comments
Closed

feat: linux/arm64 support for sync helper #1389

altitudems opened this issue Apr 4, 2021 · 6 comments
Assignees
Labels
area/sync Issues related to the real-time code synchronization kind/feature New feature or feature request

Comments

@altitudems
Copy link

Is your feature request related to a problem?
The devspacehelper executable assumes amd64 architecture, therefore it will not run inside arm64 containers.

When running devspace dev you end up with an endless loop of 'exec format' errors, as it keeps trying to execute the incompatible binary:

[0:sync:app] Start syncing                   
[0:sync:app] Sync started on /Users/username/Code/app <-> . (Pod: app-66cd4cf65d-cb2b2)
[0:sync:app] Error: Sync Error on /Users/username/app: Sync - connection lost to pod app-66cd4cf65d-cb2b2:  Internal error occurred: error executing command in container: failed to exec in container: failed to start exec "8c56ce6de40ba50aa4e6c26470814d8b7ade37b3d578818217de7e5732448fd3": OCI runtime exec failed: exec failed: container_linux.go:370: starting container process caused: exec format error: unknown
[0:sync:app] Sync stopped
[0:sync:app] Restarting sync...

Which solution do you suggest?

  1. Cross compile multiple devspacehelper binaries, including the arch in the filename (e.g. devspacehelper-arm64)
  2. Copy the platform appropriate binary to the container
  3. Sync to your hearts content on Arm64 instances (AWS EC2, Raspberry Pi clusters, etc.)
  4. Proffit ;)

Which alternative solutions exist?
Don't use sync in arm64?

Additional context
Where the the amd64 arch is specified in the build script:
https://github.com/loft-sh/devspace/blob/c4502eb234b5ed322d7474ea2ba061a96b8366d1/hack/build-all.bash#L60

Where the download url is defined before copying the binary to the container:
https://github.com/loft-sh/devspace/blob/d092290ba00d270edf4316dc45add7c613fee009/pkg/devspace/services/sync.go#L42

/kind feature

@altitudems
Copy link
Author

This may make things the cross-compile part easier:
https://github.com/mitchellh/gox

@FabianKramm
Copy link
Collaborator

@altitudems thanks for creating this issue! Yes I guess we can add arm64 support for the sync helper binary that can be enabled via the sync options.

@FabianKramm FabianKramm added the kind/feature New feature or feature request label Apr 6, 2021
@FabianKramm FabianKramm self-assigned this Apr 6, 2021
@FabianKramm FabianKramm added the area/sync Issues related to the real-time code synchronization label Apr 6, 2021
@FabianKramm
Copy link
Collaborator

FabianKramm commented Apr 7, 2021

@altitudems we just released version v5.11.0-beta.0 which you can use via devspace upgrade --version v5.11.0-beta.0, which adds a new config option that installs the arm64 devspacehelper into the container:

dev:
  sync:
  - ...
    arch: arm64

Would be great if you could verify that this fixes the issue

@altitudems
Copy link
Author

Just saw this! I'll check it out and let you know :)

@markszente
Copy link

I can confirm the arch option solves the issue.

@FabianKramm
Copy link
Collaborator

@markszente great then I'll close this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/sync Issues related to the real-time code synchronization kind/feature New feature or feature request
Projects
None yet
Development

No branches or pull requests

3 participants