lf-edge / eden

Eden is where EVE and Adam get tried and tested:
https://projecteve.dev
Apache License 2.0
49 stars 47 forks source link

qemu: replace serial console port #987

Closed christoph-zededa closed 1 month ago

christoph-zededa commented 2 months ago

7777 is used by gh action runner on IPv6

zededa@eve-runner:~/actions-runner$ sudo netstat -ltnp Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 127.0.0.54:53 0.0.0.0: LISTEN 1165/systemd-resolv tcp 0 0 127.0.0.53:53 0.0.0.0: LISTEN 1165/systemd-resolv tcp6 0 0 ::1:7777 ::: LISTEN 14603/node tcp6 0 0 :::22 ::: LISTEN 1/init

also some implementations of telnet try IPv6 first if the host has both addresses assigned

uncleDecart commented 2 months ago

Maybe it makes sense to actually check if following port is busy and fail, wdyt @christoph-zededa ?

christoph-zededa commented 2 months ago

Maybe it makes sense to actually check if following port is busy and fail, wdyt @christoph-zededa ?

It will fail if a component tries to listen on the same port with the same IP version.

You mean a check that goes through all listeners and checks if the pid of a listener on port x on IPv4 is different than port x on IPv6?

giggsoff commented 2 months ago

Maybe it makes sense to actually check if following port is busy and fail, wdyt @christoph-zededa ?

Right now Eden will fail on step of eden start (during start of qemu and waiting for 5 seconds after start in RunCommandNohup) if it cannot use port defined in config.

milan-zededa commented 2 months ago

@christoph-zededa What about instead adding eden config set default --key eve.telnet-port --value 17777 into the setup-environment action for your runner? (and then improving collect-info-console.sh to read port from the config) Or is the process node that listens on 7777 something that github will run on every self-hosted runner (and thus changing the default makes sense)?

christoph-zededa commented 2 months ago

@christoph-zededa What about instead adding eden config set default --key eve.telnet-port --value 17777 into the setup-environment action for your runner? (and then improving collect-info-console.sh to read port from the config) Or is the process node that listens on 7777 something that github will run on every self-hosted runner (and thus changing the default makes sense)?

As far as I understand these github runners, they have to run on every self-hosted runner. (if you don't like port 17777 I can also switch it back to 7777 but I find it confusing have different applications listening on the same port with different IP version).