Merge ~bjornt/maas:dns-crash-issues into maas:master

Proposed by Björn Tillenius
Status: Merged
Approved by: Björn Tillenius
Approved revision: 672571ec19fcc68a3961541d51bbb47bd16791fa
Merge reported by: MAAS Lander
Merged at revision: not available
Proposed branch: ~bjornt/maas:dns-crash-issues
Merge into: maas:master
Diff against target: 13 lines (+2/-1)
1 file modified
snap/local/tree/bin/run-named (+2/-1)
Reviewer Review Type Date Requested Status
Alberto Donato (community) Approve
Review via email: mp+388563@code.launchpad.net

Commit message

LP: #1888536 - named.conf.options.inside.maas reverts to default

run-named always generated a blank config for bind when it's started.

It's questionable why we need to do that on every start, but for now, we
don't generate a config if a config is alrady there.

This should be safe enough to backport, and then we can revisit this
later, to see if we can fix it in a better way.

To post a comment you must log in.
Revision history for this message
Alberto Donato (ack) wrote :

+1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/snap/local/tree/bin/run-named b/snap/local/tree/bin/run-named
2index bd0c252..13c167c 100755
3--- a/snap/local/tree/bin/run-named
4+++ b/snap/local/tree/bin/run-named
5@@ -12,6 +12,7 @@ cp -f "$SNAP/usr/share/maas/bind/named.conf" "$SNAP_DATA/bind/"
6 mkdir -p "$SNAP_DATA/bind/cache"
7
8 # generate MAAS bind configuration
9-MAAS_DNS_CONFIG_DIR="$SNAP_DATA/bind" "$SNAP/bin/maas-rack" setup-dns
10+MAAS_DNS_CONFIG_DIR="$SNAP_DATA/bind" "$SNAP/bin/maas-rack" \
11+ setup-dns --no-clobber
12
13 exec "$SNAP/usr/sbin/named" -c "$SNAP_DATA/bind/named.conf" -g

Subscribers

People subscribed via source and target branches