From 702cc2f9f1d5db37216d9859c1198c7e0a2a57ff Mon Sep 17 00:00:00 2001 From: Nurlan Moldomurov Date: Wed, 20 Sep 2023 12:20:57 +0300 Subject: [PATCH] PMM-7 Fix UI upgrade. --- update/ansible/playbook/tasks/update.yml | 39 ++++++++++++++++-------- 1 file changed, 27 insertions(+), 12 deletions(-) diff --git a/update/ansible/playbook/tasks/update.yml b/update/ansible/playbook/tasks/update.yml index ffddbc123e..1b8eb081ac 100644 --- a/update/ansible/playbook/tasks/update.yml +++ b/update/ansible/playbook/tasks/update.yml @@ -313,17 +313,6 @@ enabled: no when: not is_docker - - name: Remove old or redundant packages - yum: - state: absent - name: - - percona-qan-app # https://jira.percona.com/browse/PMM-6766 - - mariadb-libs # https://jira.percona.com/browse/PMM-5215 - - logrotate # https://jira.percona.com/browse/PMM-7627 - - pmm-server # https://jira.percona.com/browse/PMM-11239 - - screen - - yum-cron - # https://jira.percona.com/browse/PMM-9298 - name: Copy rezise-xfs file for lvm copy: @@ -420,7 +409,18 @@ - ALTER TABLE api_key ALTER COLUMN name TYPE text; when: not ansible_check_mode - # Regenerating to enable pmm-update-perform-init + - name: Remove pmm-server package + yum: + state: absent + name: + - percona-qan-app # https://jira.percona.com/browse/PMM-6766 + - mariadb-libs # https://jira.percona.com/browse/PMM-5215 + - logrotate # https://jira.percona.com/browse/PMM-7627 + - pmm-server # https://jira.percona.com/browse/PMM-11239 + - screen + - yum-cron + + # Regenerating pmm.ini and enabling pmm-update-perform-init - name: Generate new supervisor config command: pmm-managed-init register: managed_init_result @@ -438,6 +438,21 @@ register: reread_init__result changed_when: "'No config updates to processes' not in reread_init__result.stdout" + # restarting pmm-managed to regenerate /etc/alertmanager.yml + - name: Restart pmm-managed EL7 + when: ansible_distribution == 'CentOS' and ansible_distribution_major_version == '7' + command: supervisorctl {{ item }} pmm-managed + become: true + changed_when: true + with_items: ["stop", "remove", "add"] + + - name: Restart pmm-managed EL9 + when: (ansible_distribution == 'OracleLinux' or ansible_distribution == 'AlmaLinux') and ansible_distribution_major_version == '9' + command: /usr/local/bin/supervisorctl {{ item }} pmm-managed + become: true + changed_when: true + with_items: ["stop", "remove", "add"] + - name: Update/restart other services EL7 when: ansible_distribution == 'CentOS' and ansible_distribution_major_version == '7' command: supervisorctl update