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 'docker --net host' is not supported on docker Desktop (mac, windows) #964

Open
Ognian opened this issue Feb 25, 2023 · 11 comments
Labels
area/auroraboot bug Something isn't working

Comments

@Ognian
Copy link
Contributor

Ognian commented Feb 25, 2023

I tried auroraboot on my mac so that I can boot a bare metal x64 machine.
using --net host as in the examples, doesn't work on docker desktop (mac) see https://docs.docker.com/network/host/
so I tried with the -p option like below:

docker run -v $PWD/cloud-config.yaml:/config.yaml --rm -ti -p 8080:8080 -p 8090:8090 -p 67:67 quay.io/kairos/auroraboot \
        --set "artifact_version=v1.5.1-k3sv1.26.1+k3s1" \
        --set "release_version=v1.5.1" \
        --set "flavor=opensuse-leap" \
        --set "repository=kairos-io/provider-kairos" \
        --cloud-config /config.yaml
1:36PM INF Downloading https://github.com/kairos-io/provider-kairos/releases/download/v1.5.1/kairos-opensuse-leap-v1.5.1-k3sv1.26.1+k3s1.iso...
1:38PM INF Downloading https://github.com/kairos-io/provider-kairos/releases/download/v1.5.1/kairos-opensuse-leap-v1.5.1-k3sv1.26.1+k3s1-kernel...
1:38PM INF Downloading https://github.com/kairos-io/provider-kairos/releases/download/v1.5.1/kairos-opensuse-leap-v1.5.1-k3sv1.26.1+k3s1-initrd...
1:38PM INF Downloading https://github.com/kairos-io/provider-kairos/releases/download/v1.5.1/kairos-opensuse-leap-v1.5.1-k3sv1.26.1+k3s1.squashfs...
1:39PM INF Start pixiecore
1:39PM INF Listening on :8080...

after this the http server on 8080 is accessible, but network boot doesn't seem to work...

Any idea if there are any other ports needed? Is it even supposed to work with docker desktop?
At least the documentation shall be changed, that this works only with docker on linux...
Thanks
Ognian

@Ognian Ognian added the bug Something isn't working label Feb 25, 2023
@Ognian
Copy link
Contributor Author

Ognian commented Feb 27, 2023

It looks like this won't work on mac or windows, so the documentation should provide this hint.
I tested with an raspberry pi (linux, docker) with

 docker run -v $PWD/cloud-config.yaml:/config.yaml --rm -ti --net host quay.io/kairos/auroraboot \
        --set "artifact_version=v1.5.1-k3sv1.26.1+k3s1" \
        --set "release_version=v1.5.1" \
        --set "flavor=opensuse-leap" \
        --set "repository=kairos-io/provider-kairos" \
        --cloud-config /config.yaml

This somehow got further:

1:01PM INF Downloading https://github.com/kairos-io/provider-kairos/releases/download/v1.5.1/kairos-opensuse-leap-v1.5.1-k3sv1.26.1+k3s1.iso...
1:04PM INF Downloading https://github.com/kairos-io/provider-kairos/releases/download/v1.5.1/kairos-opensuse-leap-v1.5.1-k3sv1.26.1+k3s1-initrd...
1:04PM INF Downloading https://github.com/kairos-io/provider-kairos/releases/download/v1.5.1/kairos-opensuse-leap-v1.5.1-k3sv1.26.1+k3s1.squashfs...
1:04PM INF Downloading https://github.com/kairos-io/provider-kairos/releases/download/v1.5.1/kairos-opensuse-leap-v1.5.1-k3sv1.26.1+k3s1-kernel...
1:06PM INF Start pixiecore
1:08PM INF Listening on :8080...

2023/02/27 13:44:02 DHCP: Unusable packet from xx:xx:xx:xx:xx:xx: unsupported client firmware type '0' (please file a bug!)
2023/02/27 13:44:05 DHCP: Unusable packet from xx:xx:xx:xx:xx:xx: unsupported client firmware type '0' (please file a bug!)
2023/02/27 13:44:13 DHCP: Unusable packet from xx:xx:xx:xx:xx:xx: unsupported client firmware type '0' (please file a bug!)
2023/02/27 13:44:29 DHCP: Unusable packet from xx:xx:xx:xx:xx:xx: unsupported client firmware type '0' (please file a bug!)
2023/02/27 13:45:02 DHCP: Unusable packet from xx:xx:xx:xx:xx:xx: unsupported client firmware type '0' (please file a bug!)
2023/02/27 13:45:06 DHCP: Unusable packet from xx:xx:xx:xx:xx:xx: unsupported client firmware type '0' (please file a bug!)
2023/02/27 13:45:14 DHCP: Unusable packet from xx:xx:xx:xx:xx:xx: unsupported client firmware type '0' (please file a bug!)
2023/02/27 13:45:30 DHCP: Unusable packet from xx:xx:xx:xx:xx:xx: unsupported client firmware type '0' (please file a bug!)
2023/02/27 13:46:02 DHCP: Unusable packet from xx:xx:xx:xx:xx:xx: unsupported client firmware type '0' (please file a bug!)
2023/02/27 13:46:07 DHCP: Unusable packet from xx:xx:xx:xx:xx:xx: unsupported client firmware type '0' (please file a bug!)
2023/02/27 13:46:15 DHCP: Unusable packet from xx:xx:xx:xx:xx:xx: unsupported client firmware type '0' (please file a bug!)
2023/02/27 13:46:31 DHCP: Unusable packet from xx:xx:xx:xx:xx:xx: unsupported client firmware type '0' (please file a bug!)
2023/02/27 13:47:05 DHCP: Offering to boot xx:xx:xx:xx:xx:xx
2023/02/27 13:47:09 TFTP: Send of "xx:xx:xx:xx:xx:xx/2" to 192.168.6.21:1204 failed: "192.168.6.21:1204": sending OACK: client aborted transfer: User aborted the transfer
2023/02/27 13:47:10 TFTP: Sent "xx:xx:xx:xx:xx:xx/2" to 192.168.6.21:1205
2023/02/27 13:50:28 DHCP: Unusable packet from xx:xx:xx:xx:xx:xx: unsupported client firmware type '0' (please file a bug!)
2023/02/27 13:50:31 DHCP: Unusable packet from xx:xx:xx:xx:xx:xx: unsupported client firmware type '0' (please file a bug!)
2023/02/27 13:50:39 DHCP: Unusable packet from xx:xx:xx:xx:xx:xx: unsupported client firmware type '0' (please file a bug!)
2023/02/27 13:50:55 DHCP: Unusable packet from xx:xx:xx:xx:xx:xx: unsupported client firmware type '0' (please file a bug!)

which is exactly danderson/netboot#132

The above bug is nearly 2 years old, so chances are very low to be fixed

@mudler
Copy link
Member

mudler commented Mar 1, 2023

Thanks for the detective work @Ognian ! I didn't tried to expose the port directly - I will come back at you when testing locally. Re boot, did you tried booting RPIs? this is working only x86 as for now

@mudler mudler removed their assignment Mar 1, 2023
@mudler mudler changed the title auroraboot 'docker --net host' is not supported on docker Desktop (mac, windows) 🐛 auroraboot 'docker --net host' is not supported on docker Desktop (mac, windows) Mar 1, 2023
@Ognian
Copy link
Contributor Author

Ognian commented Mar 1, 2023

@mudler the second try was trying to net boot a x86 machine (Latte Panda 3) which should be possible. Auroraboot was running on a rpi with raspbian and docker which worked surprisingly good (I had to other linux machine what was needed for --net host)...

@mudler
Copy link
Member

mudler commented Mar 2, 2023

@mudler the second try was trying to net boot a x86 machine (Latte Panda 3) which should be possible. Auroraboot was running on a rpi with raspbian and docker which worked surprisingly good (I had to other linux machine what was needed for --net host)...

so did it worked in that case? Can we scope this card to only mac and windows?

@Ognian
Copy link
Contributor Author

Ognian commented Mar 2, 2023

@mudler the second try did not work due to danderson/netboot#132
so there are two issues here:

first: auroraboot doesn't work with mac and windows since they are missing --net host -> this can be solved by simply documenting it

second: danderson/netboot#132 is a bug in netboot, I have no idea how to solve this and unfortunately this bug exists since nearly 2 years...

@Itxaka
Copy link
Member

Itxaka commented Mar 15, 2023

@Ognian we updated the docs #1139

Unfortunately I cannot test the netboot by runing the binary directly under macOS as my network is not compatible with the requirements. Would you be able to test running the binary directly (no the docker image) and see if that indeed works?

@Ognian
Copy link
Contributor Author

Ognian commented Mar 17, 2023

@Itxaka yes of course. But I couldn't find the osx binary under the auroraboot releases...

@Itxaka
Copy link
Member

Itxaka commented Mar 17, 2023

@Ognian sorry! I merged the PR to provide binaries but forgot to cut a release. v0.2.3 is now available with binaries https://github.com/kairos-io/AuroraBoot/releases

@Ognian
Copy link
Contributor Author

Ognian commented Mar 17, 2023

@Itxaka after running docker without starting auroraboot my directory structure looks:
image

how shall I start ./AuroraBoot ? (wich parameters and command)?

@Ognian
Copy link
Contributor Author

Ognian commented Mar 24, 2023

@Itxaka OK, I managed to start auroraboot under MacOS. As stated in the Documentation we need brew install xorriso
afterwards auroraboot can be started like:

sudo ./AuroraBoot \
        --set "artifact_version=v1.6.1-k3sv1.26.1+k3s1" \
        --set "release_version=v1.6.1" \
        --set "flavor=opensuse-leap" \
        --set "repository=kairos-io/provider-kairos" \
        --cloud-config ./tmp/config.yaml

output is in \tmp which should be also OK

Output of auroraboot is OK, with the last lines:

...
5:15PM INF Wrote '/tmp/iso/kairos.iso.custom.iso'
5:15PM INF Listening on :8080...

but actually it does not work.
There is indeed a http server on the local 8080 port, but when looking at the network traffic via Wireshark, I can see the udp DHCP request from the client, and the DHCP offer from the server, but somehow auroraboot is not trying to respond with the additional DHCP fields to offer itself as a http server...

Any Ideas?

@Itxaka
Copy link
Member

Itxaka commented Mar 25, 2023

@Itxaka OK, I managed to start auroraboot under MacOS. As stated in the Documentation we need brew install xorriso afterwards auroraboot can be started like:

sudo ./AuroraBoot \
        --set "artifact_version=v1.6.1-k3sv1.26.1+k3s1" \
        --set "release_version=v1.6.1" \
        --set "flavor=opensuse-leap" \
        --set "repository=kairos-io/provider-kairos" \
        --cloud-config ./tmp/config.yaml

output is in \tmp which should be also OK

Output of auroraboot is OK, with the last lines:

...
5:15PM INF Wrote '/tmp/iso/kairos.iso.custom.iso'
5:15PM INF Listening on :8080...

but actually it does not work. There is indeed a http server on the local 8080 port, but when looking at the network traffic via Wireshark, I can see the udp DHCP request from the client, and the DHCP offer from the server, but somehow auroraboot is not trying to respond with the additional DHCP fields to offer itself as a http server...

Any Ideas?

Umm. Its good that it "works", but no idea why it would not provide the proper responses. @mudler any ideas here? tcpdump? custom auroraboot with extra debug maybe?

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
Projects
Status: No status
Development

No branches or pull requests

3 participants