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

[Auroraboot][mac] Setting the state_dir option fails to build an iso #1695

Open
Itxaka opened this issue Aug 8, 2023 · 3 comments
Open

[Auroraboot][mac] Setting the state_dir option fails to build an iso #1695

Itxaka opened this issue Aug 8, 2023 · 3 comments
Labels
area/auroraboot bug Something isn't working documentation Improvements or additions to documentation

Comments

@Itxaka
Copy link
Member

Itxaka commented Aug 8, 2023

Runninng

docker run --platform linux/amd64 \
             -v "$PWD"/build:/tmp/auroraboot \
             --rm -ti quay.io/kairos/auroraboot:v0.2.5 \
             --set container_image=quay.io/kairos/core-ubuntu-22-lts-k3s:v1.26.4-k3s1 \
             --set "disable_http_server=true" \
             --set "disable_netboot=true" \
             --set "state_dir=/tmp/auroraboot"

From a Mac with M1/M2 chip fails to build:

5:43PM ERR Failed generating iso 'kairos' from '/tmp/auroraboot/temp-rootfs'. Error: exit status 1
1 error occurred:
	* exit status 1\
# itxaka @ Itxakas-MacBook-Air in ~/projects [20:16:00] C:1
$ docker run --platform linux/amd64 \
             -v "$PWD"/build:/tmp/auroraboot \
             --rm -ti quay.io/kairos/auroraboot:v0.2.5 \
             --set container_image=quay.io/kairos/core-ubuntu-22-lts-k3s:v1.26.4-k3s1 \
             --set "disable_http_server=true" \
             --set "disable_netboot=true" --debug \
             --set "state_dir=/tmp/auroraboot"
6:16PM DBG
6:16PM DBG 1.
6:16PM DBG  <prepare-iso> (background: false)
6:16PM DBG  <prepare-netboot> (background: false)
6:16PM DBG  <prepare-temp> (background: false)
6:16PM DBG
6:16PM DBG 2.
6:16PM DBG  <container-pull> (background: false)
6:16PM DBG  <copy-cloud-config> (background: false)
6:16PM DBG
6:16PM DBG 3.
6:16PM DBG  <gen-iso> (background: false)
6:16PM DBG
6:16PM DBG 4.
6:16PM DBG
6:16PM DBG 5.
6:16PM DBG
6:16PM INF Pulling container image 'quay.io/kairos/core-ubuntu-22-lts-k3s:v1.26.4-k3s1' to '/tmp/auroraboot/temp-rootfs' (local: false)
6:16PM DBG Output ' INFO   Downloading quay.io/kairos/core-ubuntu-22-lts-k3s:v1.26.4-k3s1 to /tmp/auroraboot/temp-rootfs
  ERROR    chmod /tmp/auroraboot/temp-rootfs/etc/machine-id: permission denied
'
6:16PM ERR Failed pulling container image 'quay.io/kairos/core-ubuntu-22-lts-k3s:v1.26.4-k3s1' to '/tmp/auroraboot/temp-rootfs' (local: false): exit status 1
2 errors occurred:
	* exit status 1
	* 'gen-iso' deps container-pull failed

removing the state_dir option makes it work with no issues.

@Itxaka Itxaka added bug Something isn't working area/auroraboot labels Aug 8, 2023
@Itxaka Itxaka assigned mudler and unassigned mudler Aug 8, 2023
@Itxaka
Copy link
Member Author

Itxaka commented Aug 8, 2023

Not happening under linux

@mudler
Copy link
Member

mudler commented Aug 16, 2023

documentation issue?

@mudler mudler added the documentation Improvements or additions to documentation label Aug 16, 2023
@allenporter
Copy link

I also ran into this on mac and it seems like there is a problem writing to the bind mount for the flag

 -v "$PWD"/build:/tmp/auroraboot

I assume the reason why removing the state dir config works is because it writes to /tmp/ instead by default which is not in the bind mount directory.

As an alternative that worked for me, you can create a docker volume to store data for reuse across builds like -v auroraboot-tmp:/tmp/auroraboot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/auroraboot bug Something isn't working documentation Improvements or additions to documentation
Projects
Status: No status
Development

No branches or pull requests

3 participants