Skip to content

Commit

Permalink
use dnsmasq for translations generic worker
Browse files Browse the repository at this point in the history
Hopefully a fix for mozilla/translations#549
  • Loading branch information
bhearsum committed Oct 10, 2024
1 parent 8f0647d commit 3ef417a
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
1 change: 1 addition & 0 deletions builders/gw_translations_gcp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ script_directories:
- ubuntu-jammy
- ubuntu-worker-requirements
- ubuntu-cuda
- ubuntu-dnsmasq
- generic-worker-linux
- worker-runner-linux
- worker-runner-gw-systemd # TODO: merge with 'generic-worker-linux'?
Expand Down
23 changes: 23 additions & 0 deletions scripts/ubuntu-dnsmasq/01-switch-to-dnsmasq.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash

set -exv

# init helpers
helpers_dir=${MONOPACKER_HELPERS_DIR:-"/etc/monopacker/scripts"}
for h in ${helpers_dir}/*.sh; do
. $h;
done

# install dnsmasq before disabling systemd-resolved, because we need working
# dns to do so
apt-get install -y dnsmasq
# disable systemd-resolved
systemctl stop systemd-resolved
systemctl disable systemd-resolved
# remove symlink to systemd-resolved's resolv.conf; replace it with a version
# that points at the dnsmasq server that's about to start up
rm /etc/resolv.conf
echo "nameserver 127.0.0.1" > /etc/resolv.conf
echo "server=8.8.8.8" >> /etc/dnsmasq.conf
systemctl start dnsmasq
systemctl enable dnsmasq

0 comments on commit 3ef417a

Please sign in to comment.