From e326639e1883c6574ed65ac344e814181a550dcf Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Mon, 12 Feb 2024 11:51:03 -0500 Subject: [PATCH] Become primary and apply migrations on first node --- oneshot/update-pvc-daemons.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/oneshot/update-pvc-daemons.yml b/oneshot/update-pvc-daemons.yml index 7bb95c2..3a8f244 100644 --- a/oneshot/update-pvc-daemons.yml +++ b/oneshot/update-pvc-daemons.yml @@ -130,7 +130,15 @@ - pvcworkerd - pvchealthd - - name: unset PVC maintenance mode + - name: become primary on first node + command: pvc node primary --wait + run_once: yes + + - name: apply database migrations on first node (safe upgrades prevented this in dpkg) + command: /usr/share/pvc/pvc-api-db-upgrade + run_once: yes + + - name: unset PVC maintenance mode on first node command: pvc cluster maintenance off run_once: yes