From d3391aa0807f896163dc641736bf694adb5e380a Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Fri, 1 Sep 2023 15:42:29 -0400 Subject: [PATCH] Move to new maintenance mode and check legacy first --- oneshot/reboot-pvc-cluster.yml | 10 ++++++++-- oneshot/update-pvc-cluster.yml | 10 ++++++++-- oneshot/update-pvc-daemons.yml | 10 ++++++++-- oneshot/upgrade-pvc-cluster_deb11.yml | 4 ++-- oneshot/upgrade-pvc-cluster_deb12.yml | 4 ++-- 5 files changed, 28 insertions(+), 10 deletions(-) diff --git a/oneshot/reboot-pvc-cluster.yml b/oneshot/reboot-pvc-cluster.yml index d82de71..6c52443 100644 --- a/oneshot/reboot-pvc-cluster.yml +++ b/oneshot/reboot-pvc-cluster.yml @@ -5,9 +5,15 @@ become_user: root gather_facts: yes tasks: - - name: set PVC maintenance mode + - name: set PVC maintenance mode (legacy) command: pvc maintenance on run_once: yes + ignore_errors: yes + + - name: set PVC maintenance mode + command: pvc cluster maintenance on + run_once: yes + ignore_errors: yes - hosts: all remote_user: deploy @@ -160,5 +166,5 @@ gather_facts: yes tasks: - name: unset PVC maintenance mode - command: pvc maintenance off + command: pvc cluster maintenance off run_once: yes diff --git a/oneshot/update-pvc-cluster.yml b/oneshot/update-pvc-cluster.yml index df2dd02..05ee9e0 100644 --- a/oneshot/update-pvc-cluster.yml +++ b/oneshot/update-pvc-cluster.yml @@ -5,9 +5,15 @@ become_user: root gather_facts: yes tasks: - - name: set PVC maintenance mode + - name: set PVC maintenance mode (legacy) command: pvc maintenance on run_once: yes + ignore_errors: yes + + - name: set PVC maintenance mode + command: pvc cluster maintenance on + run_once: yes + ignore_errors: yes - hosts: all remote_user: deploy @@ -216,5 +222,5 @@ gather_facts: yes tasks: - name: unset PVC maintenance mode - command: pvc maintenance off + command: pvc cluster maintenance off run_once: yes diff --git a/oneshot/update-pvc-daemons.yml b/oneshot/update-pvc-daemons.yml index 5499971..16eece2 100644 --- a/oneshot/update-pvc-daemons.yml +++ b/oneshot/update-pvc-daemons.yml @@ -5,9 +5,15 @@ become_user: root gather_facts: yes tasks: - - name: set PVC maintenance mode + - name: set PVC maintenance mode (legacy) command: pvc maintenance on run_once: yes + ignore_errors: yes + + - name: set PVC maintenance mode + command: pvc cluster maintenance on + run_once: yes + ignore_errors: yes - hosts: all remote_user: deploy @@ -89,5 +95,5 @@ gather_facts: yes tasks: - name: unset PVC maintenance mode - command: pvc maintenance off + command: pvc cluster maintenance off run_once: yes diff --git a/oneshot/upgrade-pvc-cluster_deb11.yml b/oneshot/upgrade-pvc-cluster_deb11.yml index ae3bae1..33cb13d 100644 --- a/oneshot/upgrade-pvc-cluster_deb11.yml +++ b/oneshot/upgrade-pvc-cluster_deb11.yml @@ -7,7 +7,7 @@ serial: 1 tasks: - name: set PVC maintenance mode - command: pvc maintenance on + command: pvc cluster maintenance on - name: secondary node command: "pvc node secondary {{ ansible_hostname }}" @@ -216,7 +216,7 @@ connection: local - name: unset PVC maintenance mode - command: pvc maintenance off + command: pvc cluster maintenance off - hosts: all remote_user: deploy diff --git a/oneshot/upgrade-pvc-cluster_deb12.yml b/oneshot/upgrade-pvc-cluster_deb12.yml index 7ff9aab..478850a 100644 --- a/oneshot/upgrade-pvc-cluster_deb12.yml +++ b/oneshot/upgrade-pvc-cluster_deb12.yml @@ -19,7 +19,7 @@ when: ansible_lsb.codename is defined - name: set PVC maintenance mode - command: pvc maintenance on + command: pvc cluster maintenance on - name: secondary node command: "pvc node secondary {{ ansible_hostname }}" @@ -240,7 +240,7 @@ connection: local - name: unset PVC maintenance mode - command: pvc maintenance off + command: pvc cluster maintenance off - hosts: all remote_user: deploy