canonical / action-build

A Github action for building Snapcraft projects
MIT License
42 stars 22 forks source link

tools: logic to remove docker if installed #47

Closed sergiusens closed 1 year ago

sergiusens commented 1 year ago

Docker installed is not essentially the problem for this action, but the firewall rule it sets up is.

The removal is preemptive of any other potential future issue.

Implemented as shared by @tomponline

Signed-off-by: Sergio Schvezov sergio.schvezov@canonical.com


42

CRAFT-1490

sergiusens commented 1 year ago

The Snapcraft 4.x failure looks unrelated to this change and is reproduceable outside this runner

sergiusens commented 1 year ago

ok, I fixed ci for 4.x with core; I believe the problem is cgroup v1/v2 related wrt the version of systemd in there.

@tomponline is my assessment reasonable

tomponline commented 1 year ago

ok, I fixed ci for 4.x with core; I believe the problem is cgroup v1/v2 related wrt the version of systemd in there.

@tomponline is my assessment reasonable

I'm not sure, what was the failure?

sergiusens commented 1 year ago

@tomponline systemd never starts https://github.com/snapcore/action-build/actions/runs/3534771782/jobs/5933244989#step:3:133

In effect systemctl is-system-running` always returns offline when the host is on 22.04 (and I believe 20.04)

tomponline commented 1 year ago

OK, I'm still not really following why you can't launch a 22.04 container on a 22.04 host? Why the need to pin it to 18.04?

sergiusens commented 1 year ago

Em 24/11/2022 13:02, Tom Parrott escreveu:

OK, I'm still not really following why you can't launch a 22.04 container on a 22.04 host?

16.04 container on a 22.04 host

— Reply to this email directly, view it on GitHub https://github.com/snapcore/action-build/pull/47#issuecomment-1326630085, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIX7ZM4TF3E4HT4TCK32QLWJ6GPTANCNFSM6AAAAAASJIOZVA. You are receiving this because you authored the thread.Message ID: @.***>

tomponline commented 1 year ago

Oh right, yes then 18.04 would probably be needed. I didn't know you were running a 16.04 container.

tomponline commented 1 year ago

We cover this in the lxd docs https://linuxcontainers.org/lxd/docs/master/howto/network_bridge_firewalld/#prevent-issues-with-lxd-and-docker

sergiusens commented 1 year ago

We can do as Alberto says and only apply the iptables rule

tomponline commented 1 year ago

Just be aware that you'll need to apply rules for each LXD bridge network you create :)