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

when using a build or intermediate container the install of atmos fails. Error: Error: EXDEV: cross-device link not permitted, rename #98

Open
dsidman-aeg opened this issue Jan 28, 2025 · 4 comments
Labels
bug 🐛 An issue with the system

Comments

@dsidman-aeg
Copy link

Describe the Bug

when using an intermediate or build container Atmos will not install and you get error:
Error: Error: EXDEV: cross-device link not permitted, rename '/__w/_temp/06181220-7e5e-4ef4-90c1-fc9f44907020' -> '/__w/_actions/cloudposse/github-action-setup-atmos/atmos/atmos'

Expected Behavior

Build containers or intermediate containers or side car containers are quite common, Atmos should install with this configuration.

Steps to Reproduce

Run this Action: Steps to reproduce the behavior:
name: install-atmos

on:
workflow_dispatch: # Allow manual triggering of the workflow

jobs:
hello:
runs-on: {private runner name}
steps:
- name: whoami
id: tellmewhere
run: |
echo "Hello, from private runner"
hostname

set-atmos-env:
runs-on: ubuntu-latest
container:
image: {the link to your build or side car container registry and image}
outputs:
atmos_version: ${{ steps.install-atmos.outputs.atmos_version }}
atmos_cli_config_path: ${{ steps.install-atmos.outputs.atmos_cli_config_path }}
atmos_base_path: ${{ steps.install-atmos.outputs.atmos_base_path }}
steps:
- name: whoami
id: tellmeuser
run: |
whoami
hostname
echo "hello from build container"
cd ~
pwd
- name: Install Atmos
id: install-atmos
uses: cloudposse/github-action-setup-atmos@v2
with:
atmos-version: 1.156.0
install-wrapper: false

Possible fix:

The error EXDEV: cross-device link not permitted typically occurs when a file is being moved across different file systems or devices, which is not allowed by the rename operation in some environments. To fix this issue, you can modify the GitHub Actions workflow to use a different method for installing Atmos that doesn't rely on cross-device linking...or change the rename process.

Environment (please complete the following information):

ubuntu 20.x

@dsidman-aeg dsidman-aeg added the bug 🐛 An issue with the system label Jan 28, 2025
@dsidman-aeg
Copy link
Author

can this be added to the install script:

--no-cross-device-link

@dsidman-aeg
Copy link
Author

or change the action to use copy over move....something like this:

const fs = require('fs');
fs.copyFileSync(source, target);
fs.unlinkSync(source); // Delete the original file

@dsidman-aeg
Copy link
Author

Hello,

In this file >> https://github.com/cloudposse/github-action-setup-atmos/blob/main/dist/index.js

From this:
fs.renameSync(tempFilePath, atmosBinaryPath);

To something this:
fs.copyFileSync(source, target);
fs.unlinkSync(source); // Delete the original file

Another problem is that the script is not honoring the RUNNER_TEMP environment variable to control downloads etc, so it has to be changed here:
https://github.com/cloudposse/github-action-setup-atmos/blob/main/dist/index.js

Thanks for looking at this. Have a great rest of your day!

@GabisCampana
Copy link

@mcalhoun

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 An issue with the system
Projects
None yet
Development

No branches or pull requests

2 participants