Skip to content

Commit

Permalink
Merge pull request #237 from ceph/mergify/bp/quincy/pr-235
Browse files Browse the repository at this point in the history
Uninstall old ceph packages before upgrading ceph-common (backport #235)
  • Loading branch information
asm0deuz authored Oct 30, 2023
2 parents 7d60ad6 + 4c75832 commit e34eb72
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions cephadm-preflight.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,13 @@
- rhceph-4-mon-for-rhel-{{ ansible_facts['distribution_major_version'] }}-{{ ansible_facts['architecture'] }}-rpms
- rhceph-4-osd-for-rhel-{{ ansible_facts['distribution_major_version'] }}-{{ ansible_facts['architecture'] }}-rpms
- rhceph-5-tools-for-rhel-{{ ansible_facts['distribution_major_version'] }}-{{ ansible_facts['architecture'] }}-rpms
packages_to_uninstall:
- ceph-mds
- ceph-mgr
- ceph-mon
- ceph-osd
- ceph-radosgw
- rbd-mirror
tasks:
- name: import_role ceph_defaults
import_role:
Expand Down Expand Up @@ -156,9 +163,16 @@
register: result
until: result is succeeded

- name: remove remaining local services ceph packages
dnf:
name: "{{ packages_to_uninstall }}"
state: absent
autoremove: no

- name: install ceph-common on rhel
command: dnf install --allowerasing --assumeyes ceph-common
changed_when: false
package:
name: ceph-common
state: "{{ (upgrade_ceph_packages | bool) | ternary('latest', 'present') }}"
register: result
until: result is succeeded

Expand Down Expand Up @@ -277,4 +291,4 @@

- name: set insecure container registry in /etc/containers/registries.conf
ansible.builtin.import_playbook: cephadm-set-container-insecure-registries.yml
when: set_insecure_registries | default(false) | bool
when: set_insecure_registries | default(false) | bool

0 comments on commit e34eb72

Please sign in to comment.