Compare commits

...

3 commits

Author SHA1 Message Date
3288a2a413
f-15: ci: add upload scripts
All checks were successful
Pre Release Workflow / set-release-target (push) Successful in 36s
Pre Release Workflow / build (agent, amd64, linux) (push) Successful in 1m17s
Pre Release Workflow / build (db, amd64, linux) (push) Successful in 1m47s
Pre Release Workflow / build (dhcp, amd64, linux) (push) Successful in 1m27s
Pre Release Workflow / build (metacli, amd64, linux) (push) Successful in 1m28s
Pre Release Workflow / build (metadata, amd64, linux) (push) Successful in 1m29s
Pre Release Workflow / build (vpc, amd64, linux) (push) Successful in 1m31s
Pre Release Workflow / upload-scripts (run-dnsmasq-in-netns.sh) (push) Successful in 6s
Pre Release Workflow / prerelease (push) Successful in 11s
Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
2026-03-30 23:40:12 +02:00
deac1afe9f
f-15: script: add script for running dhcp in netns
Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
2026-03-30 23:40:12 +02:00
02e558e0e2
f-15: systemd: add systemd unit for dhcp
Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
2026-03-30 23:40:11 +02:00
3 changed files with 50 additions and 0 deletions

View file

@ -46,6 +46,24 @@ jobs:
goarch: ${{ matrix.goarch }}
binari: ${{ matrix.binaries }}
secrets: inherit
upload-scripts:
runs-on: docker
needs: [set-release-target]
strategy:
matrix:
script:
- run-dnsmasq-in-netns.sh
steps:
- uses: actions/checkout@v3
- name: Move asset
run: |
mkdir -p "dist"
cp scripts/${{ matrix.script }} dist/
- name: Upload script
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.script }}-${{ needs.set-release-target.outputs.release_cible }}
path: dist/${{ matrix.script }}
prerelease:
runs-on: docker
needs: [set-release-target, build]

View file

@ -0,0 +1,21 @@
#!/bin/bash
set -e
# Expects one argument: netns_bridge (e.g. vpc-00003_br-00002 or vpc1_br0)
arg="$1"
NETNS="${arg%%_*}"
BRIDGE="${arg#*_}"
echo "start dnsmasq ${NETNS} ${BRIDGE}"
exec ip netns exec "${NETNS}" \
dnsmasq \
--no-daemon \
--interface="${BRIDGE}" \
--bind-interfaces \
--pid-file="/run/dnsmasq-$arg.pid" \
--conf-file="/etc/dnsmasq.d/$arg.conf" \
--no-hosts \
--no-resolv \
--log-facility="/var/log/dnsmasq-$arg.log" \
--no-daemon -p0

11
systemd/dnsmasq@.service Normal file
View file

@ -0,0 +1,11 @@
[Unit]
Description=dnsmasq in netns %i
After=network.target
[Service]
Type=simple
ExecStart=/opt/two/bin/run-dnsmasq-in-netns.sh %i
ExecStopPost=/bin/rm -f /run/dnsmasq-%i.pid
[Install]
WantedBy=multi-user.target