issue with gitlab runner in lxc proxmox

zikou

Member
Nov 13, 2024
54
5
8
Hello everyone,

Pfsense LAN interface 10.1.0.252,WAN interface 10.0.0.252

on proxmox host machine

Chain POSTROUTING (policy ACCEPT 2832K packets, 181M bytes)
pkts bytes target prot opt in out source destination
1249K 86M MASQUERADE all -- any vmbr0 10.1.0.0/24 anywhere
37M 2763M MASQUERADE all -- any vmbr0 10.0.0.0/24 anywhere

dhcp server configuration
gateway: 10.1.0.252
dns servers: 10.1.0.252,8.8.8.8, 8.8.4.4

I'm encountering a perplexing issue with my GitLab CI/CD pipelines where the "build" stage gets stuck indefinitely while downloading Maven dependencies. The strange part is that a on a fresh Proxmox LXC setup with the same GitLab Runner and Docker configuration works perfectly fine.

My Setup:


  • Proxmox VE Host: Running an unprivileged LXC container (ubuntu Linux).
  • LXC Container: Hosts a GitLab Runner (docker executor) which runs Docker commands.
  • Docker: Jobs execute directly on the LXC's Docker daemon (using /var/run/docker.sock mounted into the runner, not docker:dind).
  • Network: pfSense is my DHCP server. The Proxmox host and the LXC container both receive IPs via DHCP from pfSense.
  • Problematic Task: docker build command inside the GitLab CI pipeline, specifically when Maven tries to download dependencies from repo.maven.apache.org. The build output just stops, without an error message, implying it's waiting for a network operation.
Key Observation:

  • When I set the Proxmox LXC to a static IP (e.g., 10.1.0.144/32 with gateway 10.1.0.1), the pipeline runs fast and completes without issues.
  • When using DHCP from pfSense, the pipeline gets stuck on Maven downloads.
  • A new Proxmox VM/LXC, configured identically and also using pfSense DHCP, works flawlessly.
 
Last edited: