Merge ~ack/maas:1938321-post-refresh-hook-all-mode into maas:2.8

Proposed by Alberto Donato
Status: Merged
Approved by: Adam Collard
Approved revision: 065696fae68623c5d192708a04f57b75ee0a27e9
Merge reported by: MAAS Lander
Merged at revision: not available
Proposed branch: ~ack/maas:1938321-post-refresh-hook-all-mode
Merge into: maas:2.8
Diff against target: 19 lines (+1/-7)
1 file modified
snap/hooks/install (+1/-7)
Reviewer Review Type Date Requested Status
Adam Collard Approve
MAAS Lander Approve
Review via email:

Commit message

LP:1938321 - drop check for service status in hook

because of a snapd issue, the hook can't reliably know if the service is
For this reason, always start the service so migrations can be performed

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

-b 1938321-post-refresh-hook-all-mode lp:~ack/maas/+git/maas into -b 2.8 lp:~maas-committers/maas

COMMIT: 065696fae68623c5d192708a04f57b75ee0a27e9

review: Approve
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 910a2da..0f4dd2e 100755
3--- a/snap/hooks/install
4+++ b/snap/hooks/install
5@@ -48,13 +48,7 @@ maas_snap_mode() {
6 if [ "$(maas_snap_mode)" = "all" ]; then
7 # When running in all mode and not disabled, start services to ensure
8 # PostgreSQL is running to perform migrations
9- service="${SNAP_INSTANCE_NAME}.supervisor"
10- if snapctl services "$service" | grep -q disabled; then
11- echo "Can't refresh snap in 'all' mode while disabled." >&2
12- exit 1
13- else
14- snapctl start "$service"
15- fi
16+ snapctl start "${SNAP_INSTANCE_NAME}.supervisor"
17 fi
19 # Perform migrations. Does nothing in 'rack' or 'none' mode.


People subscribed via source and target branches