Skip to content

Commit

Permalink
Uninstall old ceph packages before upgrading ceph-common
Browse files Browse the repository at this point in the history
Removing the existing packages prevents depsolv conflit when
upgrading ceph-common

Signed-off-by: Teoman ONAY <[email protected]>
  • Loading branch information
asm0deuz committed Jul 26, 2023
1 parent 4de64f9 commit 5ea1aea
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 5ea1aea

Please sign in to comment.