Merge ~andreserl/maas:lp1696771_snap_preseeds_2.4 into maas:2.4

Proposed by Andres Rodriguez
Status: Merged
Approved by: Andres Rodriguez
Approved revision: be964a74290b86bb80399d3f4c95790a0b5749ad
Merge reported by: MAAS Lander
Merged at revision: not available
Proposed branch: ~andreserl/maas:lp1696771_snap_preseeds_2.4
Merge into: maas:2.4
Diff against target: 39 lines (+9/-0)
3 files modified
dev/null (+0/-0)
snap/hooks/configure (+8/-0)
src/maasserver/djangosettings/snappy.py (+1/-0)
Reviewer Review Type Date Requested Status
Andres Rodriguez (community) Approve
Review via email: mp+348106@code.launchpad.net

Commit message

Backport a02dfe2. LP: #1696771 - Allow overriding preseeds in SNAP_DATA/preseeds & provide template files

To post a comment you must log in.
Revision history for this message
Andres Rodriguez (andreserl) wrote :

selfie!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/snap/conf/empty.tgt b/snap/conf/empty.tgt
0deleted file mode 1006440deleted file mode 100644
index e69de29..0000000
--- a/snap/conf/empty.tgt
+++ /dev/null
diff --git a/snap/hooks/configure b/snap/hooks/configure
index 258943e..bbc8c89 100755
--- a/snap/hooks/configure
+++ b/snap/hooks/configure
@@ -12,10 +12,18 @@ mkdir -p "$SNAP_COMMON/proxy/cache"
12chown -R nobody:nogroup "$SNAP_COMMON/proxy/cache"12chown -R nobody:nogroup "$SNAP_COMMON/proxy/cache"
13mkdir -p "$SNAP_COMMON/proxy/spool"13mkdir -p "$SNAP_COMMON/proxy/spool"
14chown -R nobody:nogroup "$SNAP_COMMON/proxy/spool"14chown -R nobody:nogroup "$SNAP_COMMON/proxy/spool"
15mkdir -p "$SNAP_DATA/preseeds"
15mkdir -p "$SNAP_DATA/bind"16mkdir -p "$SNAP_DATA/bind"
16mkdir -p "$SNAP_DATA/proxy"17mkdir -p "$SNAP_DATA/proxy"
17mkdir -p "$SNAP_DATA/supervisord"18mkdir -p "$SNAP_DATA/supervisord"
18mkdir -p "$SNAP_DATA/var/lib/maas"19mkdir -p "$SNAP_DATA/var/lib/maas"
1920
21# Always overwrite sample preseeds to ensure samples are up-to-date in case
22# we do changes that need to be reflected.
23cp "$SNAP/etc/maas/preseeds/curtin_userdata" "$SNAP_DATA/preseeds/curtin_userdata.sample"
24cp "$SNAP/etc/maas/preseeds/curtin_userdata_centos" "$SNAP_DATA/preseeds/curtin_userdata_centos.sample"
25cp "$SNAP/etc/maas/preseeds/curtin_userdata_custom" "$SNAP_DATA/preseeds/curtin_userdata_custom.sample"
26cp "$SNAP/etc/maas/preseeds/curtin_userdata_windows" "$SNAP_DATA/preseeds/curtin_userdata_windows.sample"
27
20# Perform migrations. Does nothing in 'rack' or 'none' mode.28# Perform migrations. Does nothing in 'rack' or 'none' mode.
21exec "$SNAP/command-maas.wrapper" migrate --configure29exec "$SNAP/command-maas.wrapper" migrate --configure
diff --git a/src/maasserver/djangosettings/snappy.py b/src/maasserver/djangosettings/snappy.py
index 59dcebd..7648e00 100644
--- a/src/maasserver/djangosettings/snappy.py
+++ b/src/maasserver/djangosettings/snappy.py
@@ -25,5 +25,6 @@ STATIC_ROOT = os.path.join(
2525
26# Override the preseed locations.26# Override the preseed locations.
27PRESEED_TEMPLATE_LOCATIONS = (27PRESEED_TEMPLATE_LOCATIONS = (
28 os.path.join(os.environ['SNAP_DATA'], 'preseeds'),
28 os.path.join(os.environ['SNAP'], 'etc', 'maas', 'preseeds'),29 os.path.join(os.environ['SNAP'], 'etc', 'maas', 'preseeds'),
29 )30 )

Subscribers

People subscribed via source and target branches