Skip to content

Commit

Permalink
PMM-7 Fix UI upgrade.
Browse files Browse the repository at this point in the history
  • Loading branch information
BupycHuk committed Sep 20, 2023
1 parent bb159fa commit 702cc2f
Showing 1 changed file with 27 additions and 12 deletions.
39 changes: 27 additions & 12 deletions update/ansible/playbook/tasks/update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 702cc2f

Please sign in to comment.