cirruslabs / gitlab-tart-executor

GitLab Runner executor to run jobs in Tart VMs
MIT License
60 stars 5 forks source link

"no IP address found, is your VM running?" #4

Closed jlsalmon closed 1 year ago

jlsalmon commented 1 year ago

Hello,

We are super excited to start experimenting with this new tart runner for GitLab, thanks for making it available!

Currently we are running into an issue where the executor seems to be failing to get the IP of the newly created VM:

Running with gitlab-runner 15.10.1 (dcfb4b66)
  on tart-runner 9ivB84rx, system ID: s_96b75f854d40
  feature flags: FF_RESOLVE_FULL_TLS_CHAIN:false
Preparing the "custom" executor 00:01
Using Custom executor...
2023/04/12 19:42:30 Pulling the latest version of ghcr.io/cirruslabs/macos-ventura-base:latest...
2023/04/12 19:42:31 Cloning and configuring a new VM...
2023/04/12 19:42:31 Waiting for the VM to boot and be SSH-able...
2023/04/12 19:42:31 tart command returned non-zero exit code: "no IP address found, is your VM running?"
ERROR: Job failed: exit status 1

I can see that the executor is calling tart ip --wait 60, but it seems that this part might not be working correctly?

If I use the tart CLI directly to run a new VM and then immediately try to run tart ip, I get a very similar behaviour:

$ tart clone ghcr.io/cirruslabs/macos-ventura-base:latest my-vm
$ tart run my-vm & tart ip --wait 60 my-vm
[1] 50278
no IP address found, is your VM running?

If I add a small amount of sleep before calling tart ip, it seems to work:

$ tart run my-vm & sleep 0.1 && tart ip --wait 60 my-vm
[1] 50470
192.168.64.10

I could be barking up the wrong tree here, so any pointers would be greatly appreciated!

fkorotkov commented 1 year ago

Hey @jlsalmon, which version of Tart are you using? There was a regression in 1.4.0 that got fixed in 1.4.2.

jlsalmon commented 1 year ago

Thanks for the super quick reply @fkorotkov - I was using 1.4.1. Just upgraded to 1.4.2 and the issue no longer exists 🎉

fkorotkov commented 1 year ago

Great! Please let me know if you'll have any other issues.