Merge ~ack/maas:1938321-drop-leftover-common-maas-dir into maas:2.8

Proposed by Alberto Donato
Status: Merged
Approved by: Alberto Donato
Approved revision: 266373b97558cca103f9de4681b6cc67ff1c2354
Merge reported by: MAAS Lander
Merged at revision: not available
Proposed branch: ~ack/maas:1938321-drop-leftover-common-maas-dir
Merge into: maas:2.8
Diff against target: 14 lines (+3/-0)
1 file modified
snap/hooks/install (+3/-0)
Reviewer Review Type Date Requested Status
Adam Collard Approve
MAAS Lander Needs Fixing
Review via email:

Commit message

LP:1938321 - remove leftover $SNAP_COMMON/maas from failed upgrade

To post a comment you must log in.
Revision history for this message
MAAS Lander (maas-lander) wrote :

-b 1938321-drop-leftover-common-maas-dir lp:~ack/maas/+git/maas into -b 2.8 lp:~maas-committers/maas

LOG: http://maas-ci.internal:8080/job/maas/job/branch-tester/10674/console
COMMIT: 266373b97558cca103f9de4681b6cc67ff1c2354

review: Needs Fixing
Revision history for this message
Adam Collard (adam-collard) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/snap/hooks/install b/snap/hooks/install
2index 0f4dd2e..376830e 100755
3--- a/snap/hooks/install
4+++ b/snap/hooks/install
5@@ -15,6 +15,9 @@ migrate_data() {
6 # migrate /var/lib/maas to avoid space waste because of duplicated trees
7 # for different snap revisions
8 if [ -d "$SNAP_DATA/var/lib/maas" ]; then
9+ # ensure target dir doesn't exist (in case it was left over because of
10+ # lp:1938321)
11+ rm -rf "$SNAP_COMMON/maas"
12 mv "$SNAP_DATA/var/lib/maas" "$SNAP_COMMON/"
13 # shellcheck disable=SC2115
14 rm -rf "$SNAP_DATA/var"


People subscribed via source and target branches