act_runner fails to run without global internet connectivity #64
Labels
No Label
kind
bug
kind
build
kind/compatible
kind
dependencies
kind
docs
kind
enhancement
kind
feature
kind
help wanted
kind
proposal
kind
refactor
related
act
related
environment
related
exec
related
gitea
related
workflow
reviewed
confirmed
reviewed
duplicate
reviewed
invalid
reviewed
needs feedback
reviewed
wontfix
reviewed
workaround
No Milestone
No Assignees
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: gitea/act_runner#64
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Thanks for writing act_runner, very excited to play with this feature!
My friends and I have a LAN that we share over IPSec between our houses. That VLAN (at least on my network) has no global internet connectivity, just connectivity to my friends' houses.
When running an 'act_runner' against my hosted git server, I get the following (bizzare?) error:
My
/etc/resolv.conf
doesn't use8.8.8.8
-- my local RR is at10.42.3.2
. Additionally, it's port 80 (not 53?) but it's still UDP. I greped the code, and tried to use logs to pinpoint where this is happening, but I believe it's happening on a background goroutine (maybe even from a dependency) that's fairly hard to track down.Excited to try out gitea actions!
Do you run act_runner in docker mode or host mode? If it's docker mode, the dns should come from the container.
@lunny I'm not sure, but I tried again with Docker disabled on the host, and tried it again with a fresh build (without my old log messages)
And, with Docker running:
My hunch is it's somewhere in the binary, here's some output that looks sus:
(Specifically, there's a
8.8.8.8:80
in there, which is not something I've seen before -- I don't even think 8.8.8.8 works on port 80? Citiation needed?)https://gitea.com/gitea/act/src/branch/main/pkg/common/outbound_ip.go#L12
Looks to be the source of pain here.
Good catch! I know exactly why, I will fix it later.
amazing! thank you!
some things id love to plant in the back of your head when you're looking at it:
This was hard to debug since it would fatal in a printf from the callsite in act_runner. maybe returning an error would help callers better realize this can fail and crash the program, and also allow the runner to fall back on a provided IP/fqdn.
hostname --ip-address
is implemented in a fairly complex - abet predictable - way. https://sources.debian.org/src/hostname/3.23+nmu1/hostname.c/#L359 - maybe something there can help with a v2 of that functionSome runners may be on ipv6 only networks. I have one such vlan too -- or at minimum use ipv6 to communicate with gitea not ipv4.
some runners may have an interface that's not the default route which is used to communicate with the gitea server
providing some sort of escape hatch would be very nice! thanks for your work!
FWIW: my two cents, a minimal change here maybe worth considering - rather then UDP dialing a global address, tcp dial the configured server on the configured port, and using the local IP from that
Reopen because #74 is still not ideal. It makes more sense to use the gateway IP address of container network as outbound IP of cache server. However, this requires act to cooperate, some think like: