Skip to content

Commit

Permalink
preflight: 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

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=2211324

Signed-off-by: Teoman ONAY <tonay@ibm.com>
(cherry picked from commit b9bdab6)
  • Loading branch information
asm0deuz committed Jul 27, 2023
1 parent a68511b commit 119a3a8
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions cephadm-preflight.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,14 @@
- hosts: all
become: true
gather_facts: true
vars:
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 @@ -155,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 @@ -276,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 119a3a8

Please sign in to comment.