Skip to content

Commit

Permalink
PMM-12692 clean up post-build
Browse files Browse the repository at this point in the history
  • Loading branch information
ademidoff committed Dec 7, 2023
1 parent 631af5f commit 8e306c6
Showing 1 changed file with 4 additions and 22 deletions.
26 changes: 4 additions & 22 deletions build/ansible/pmm/post-build-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@
- ansible_distribution == 'OracleLinux' or ansible_distribution == 'AlmaLinux'
- ansible_distribution_major_version == '9'

# TODO: move to a version-less directory, e.g. /usr/local/percona/pmm
- name: pmm-agent | Setup pmm-agent
command: >
pmm-agent setup
Expand Down Expand Up @@ -90,11 +89,11 @@
name: pmm-managed
state: stopped

- name: Supervisord stop | Stop supervisord service for AMI/OVF
- name: Stop supervisord service for AMI/OVF
when: ansible_virtualization_type != "docker"
service: name=supervisord state=stopped enabled=yes

- name: Supervisord stop | Stop supervisord service for docker
- name: Stop supervisord service for docker
when: ansible_virtualization_type == "docker"
shell: supervisorctl shutdown

Expand Down Expand Up @@ -125,12 +124,6 @@
name: pmm-managed
force: true
state: absent
register: db_check_result

- name: Output db_check_result
debug:
msg: "pmm-managed database was removed"
when: db_check_result.changed == True

- name: Remove pmm-managed role from postgres
postgresql_user:
Expand All @@ -144,17 +137,6 @@
ignore_errors: yes
when: ansible_virtualization_type != "docker"

- name: Supervisord stop | Stop supervisord service for AMI/OVF
when: ansible_virtualization_type != "docker"
service: name=supervisord state=stopped enabled=yes

- name: Supervisord stop EL9 | Stop supervisord service for docker
when:
- ansible_virtualization_type == "docker"
- ansible_distribution == 'OracleLinux' or ansible_distribution == 'AlmaLinux'
- ansible_distribution_major_version == '9'
shell: /usr/local/bin/supervisorctl shutdown

- name: Cleanup yum cache | Cleanup yum cache
command: yum clean all

Expand All @@ -180,8 +162,8 @@
# This step is required because of a change between VictoriaMetrics 1.77.1 and 1.82.1.
# VictoriaMetrics tries to atomically rename directories in this folder on startup.
# With RedHat-based docker images the rename fails with an error "Invalid cross-device link".
# This due to the way OverlayFS and kernel works. More info https://github.com/moby/moby/issues/25409
# This step ensures the directory is empty on startup and the contents is recreated.
# This is due to the way OverlayFS and kernel works. More info https://github.com/moby/moby/issues/25409
# This step ensures the directory is empty on startup and the contents are recreated.
# This is not an issue if the folder is in a volume or mounted from the host OS.
- name: Recreate /srv/victoriametrics folder
file:
Expand Down

0 comments on commit 8e306c6

Please sign in to comment.