deep_scrub_choked

This commit is contained in:
a.pivkin
2026-04-06 07:08:17 +03:00
commit 9149dc1d7f
840 changed files with 52471 additions and 0 deletions
@@ -0,0 +1,16 @@
---
- name: Include debian_community_repository.yml
ansible.builtin.include_tasks: debian_community_repository.yml
when: ceph_repository == 'community'
- name: Include debian_dev_repository.yml
ansible.builtin.include_tasks: debian_dev_repository.yml
when: ceph_repository == 'dev'
- name: Include debian_custom_repository.yml
ansible.builtin.include_tasks: debian_custom_repository.yml
when: ceph_repository == 'custom'
- name: Include debian_uca_repository.yml
ansible.builtin.include_tasks: debian_uca_repository.yml
when: ceph_repository == 'uca'
@@ -0,0 +1,45 @@
---
- name: Make sure /tmp exists
ansible.builtin.file:
path: /tmp
state: directory
mode: "0755"
when: use_installer | bool
- name: Use mktemp to create name for rundep
ansible.builtin.tempfile:
path: /tmp
prefix: rundep.
register: rundep_location
when: use_installer | bool
- name: Copy rundep
ansible.builtin.copy:
src: "{{ ansible_dir }}/rundep"
dest: "{{ rundep_location.path }}"
mode: preserve
when: use_installer | bool
- name: Install ceph dependencies
ansible.builtin.script: "{{ ansible_dir }}/rundep_installer.sh {{ rundep_location.path }}"
when: use_installer | bool
- name: Ensure rsync is installed
ansible.builtin.package:
name: rsync
state: present
register: result
until: result is succeeded
- name: Synchronize ceph install
ansible.posix.synchronize:
src: "{{ ceph_installation_dir }}/"
dest: "/"
- name: Create user group ceph
ansible.builtin.group:
name: 'ceph'
- name: Create user ceph
ansible.builtin.user:
name: 'ceph'
@@ -0,0 +1,34 @@
---
- name: Configure epel repository
ansible.builtin.package:
name: epel-release
register: result
until: result is succeeded
tags: with_pkg
when:
- ansible_facts['distribution'] == 'Rocky'
- name: Install python3-packaging
ansible.builtin.yum:
name: python3-packaging
enablerepo: powertools
state: present
when: ansible_facts['distribution_major_version'] | int < 9
- name: Include redhat_community_repository.yml
ansible.builtin.include_tasks: redhat_community_repository.yml
when: ceph_repository == 'community'
- name: Include redhat_dev_repository.yml
ansible.builtin.include_tasks: redhat_dev_repository.yml
when: ceph_repository == 'dev'
- name: Include redhat_custom_repository.yml
ansible.builtin.include_tasks: redhat_custom_repository.yml
when: ceph_repository == 'custom'
# Remove yum caches so yum doesn't get confused if we are reinstalling a different ceph version
- name: Purge yum cache
ansible.builtin.command: yum clean all # noqa: [303]
changed_when: false
when: ansible_facts['pkg_mgr'] == 'yum'
@@ -0,0 +1,4 @@
---
- name: Include suse_obs_repository.yml
ansible.builtin.include_tasks: suse_obs_repository.yml
when: ceph_repository == 'obs'
@@ -0,0 +1,20 @@
---
- name: Install dependencies for apt modules
ansible.builtin.package:
name: ['apt-transport-https', 'ca-certificates', 'gnupg', 'software-properties-common']
update_cache: true
register: result
until: result is succeeded
- name: Configure debian ceph community repository stable key
ansible.builtin.apt_key:
data: "{{ lookup('file', role_path + '/files/cephstable.asc') }}"
state: present
register: result
until: result is succeeded
- name: Configure debian ceph stable community repository
ansible.builtin.apt_repository:
repo: "deb {{ ceph_stable_repo }} {{ ceph_stable_distro_source | default(ansible_facts['distribution_release']) }} main"
state: present
update_cache: true
@@ -0,0 +1,14 @@
---
- name: Configure debian custom apt key
ansible.builtin.apt_key:
url: "{{ ceph_custom_key }}"
state: present
register: result
until: result is succeeded
when: ceph_custom_key is defined
- name: Configure debian custom repository
ansible.builtin.apt_repository:
repo: "deb {{ ceph_custom_repo }} {{ ansible_facts['distribution_release'] }} main"
state: present
update_cache: true
@@ -0,0 +1,12 @@
---
- name: Fetch ceph debian development repository
ansible.builtin.uri:
url: "https://shaman.ceph.com/api/repos/ceph/{{ ceph_dev_branch }}/{{ ceph_dev_sha1 }}/{{ ansible_facts['distribution'] | lower }}/{{ ansible_facts['distribution_release'] }}/repo?arch={{ ansible_facts['architecture'] }}"
return_content: true
register: ceph_dev_deb_repo
- name: Configure ceph debian development repository
ansible.builtin.apt_repository:
repo: "{{ ceph_dev_deb_repo.content }}"
state: present
update_cache: true
@@ -0,0 +1,12 @@
---
- name: Add ubuntu cloud archive key package
ansible.builtin.package:
name: ubuntu-cloud-keyring
register: result
until: result is succeeded
- name: Add ubuntu cloud archive repository
ansible.builtin.apt_repository:
repo: "deb {{ ceph_stable_repo_uca }} {{ ceph_stable_release_uca }} main"
state: present
update_cache: true
@@ -0,0 +1,9 @@
---
- name: Install ceph for debian
ansible.builtin.apt:
name: "{{ debian_ceph_pkgs | unique }}"
update_cache: false
state: "{{ (upgrade_ceph_packages | bool) | ternary('latest', 'present') }}"
default_release: "{{ ceph_stable_release_uca | default('') if ceph_origin == 'repository' and ceph_repository == 'uca' else '' }}{{ ansible_facts['distribution_release'] ~ '-backports' if ceph_origin == 'distro' and ceph_use_distro_backports | bool else '' }}"
register: result
until: result is succeeded
@@ -0,0 +1,7 @@
---
- name: Install ceph bundle
community.general.swupd:
name: storage-cluster
state: present
register: result
until: result is succeeded
@@ -0,0 +1,13 @@
- name: Install dependencies
ansible.builtin.apt:
name: "{{ debian_package_dependencies }}"
state: present
update_cache: true
cache_valid_time: 3600
register: result
until: result is succeeded
- name: Include install_debian_packages.yml
ansible.builtin.include_tasks: install_debian_packages.yml
when:
- (ceph_origin == 'repository' or ceph_origin == 'distro')
@@ -0,0 +1,23 @@
---
- name: Install redhat dependencies
ansible.builtin.package:
name: "{{ redhat_package_dependencies }}"
state: present
register: result
until: result is succeeded
when: ansible_facts['distribution'] == 'RedHat'
- name: Install centos dependencies
ansible.builtin.yum:
name: "{{ centos_package_dependencies }}"
state: present
register: result
until: result is succeeded
when: ansible_facts['distribution'] == 'CentOS'
- name: Install redhat ceph packages
ansible.builtin.package:
name: "{{ redhat_ceph_pkgs | unique }}"
state: "{{ (upgrade_ceph_packages | bool) | ternary('latest', 'present') }}"
register: result
until: result is succeeded
@@ -0,0 +1,14 @@
---
- name: Install SUSE/openSUSE dependencies
ansible.builtin.package:
name: "{{ suse_package_dependencies }}"
state: present
register: result
until: result is succeeded
- name: Install SUSE/openSUSE ceph packages
ansible.builtin.package:
name: "{{ suse_ceph_pkgs | unique }}"
state: "{{ (upgrade_ceph_packages | bool) | ternary('latest', 'present') }}"
register: result
until: result is succeeded
@@ -0,0 +1,41 @@
---
- name: Install yum plugin priorities
ansible.builtin.package:
name: yum-plugin-priorities
register: result
until: result is succeeded
tags: with_pkg
when: ansible_facts['distribution_major_version'] | int == 7
- name: Configure red hat ceph community repository stable key
ansible.builtin.rpm_key:
key: "{{ ceph_stable_key }}"
state: present
register: result
until: result is succeeded
- name: Configure red hat ceph stable community repository
ansible.builtin.yum_repository:
name: ceph_stable
description: Ceph Stable $basearch repo
gpgcheck: true
state: present
gpgkey: "{{ ceph_stable_key }}"
baseurl: "{{ ceph_mirror }}/rpm-{{ ceph_stable_release }}/el{{ ansible_facts['distribution_major_version'] }}/$basearch"
file: ceph_stable
priority: 2
register: result
until: result is succeeded
- name: Configure red hat ceph stable noarch community repository
ansible.builtin.yum_repository:
name: ceph_stable_noarch
description: Ceph Stable noarch repo
gpgcheck: true
state: present
gpgkey: "{{ ceph_stable_key }}"
baseurl: "{{ ceph_mirror }}/rpm-{{ ceph_stable_release }}/el{{ ansible_facts['distribution_major_version'] }}/noarch"
file: ceph_stable
priority: 2
register: result
until: result is succeeded
@@ -0,0 +1,16 @@
---
- name: Configure red hat custom rpm key
ansible.builtin.rpm_key:
key: "{{ ceph_custom_key }}"
state: present
register: result
until: result is succeeded
when: ceph_custom_key is defined
- name: Configure red hat custom repository
ansible.builtin.get_url:
url: "{{ ceph_custom_repo }}"
dest: /etc/yum.repos.d
owner: root
group: root
mode: "0644"
@@ -0,0 +1,25 @@
---
- name: Fetch ceph red hat development repository
ansible.builtin.uri:
# Use the centos repo since we don't currently have a dedicated red hat repo
url: "https://shaman.ceph.com/api/repos/ceph/{{ ceph_dev_branch }}/{{ ceph_dev_sha1 }}/centos/{{ ansible_facts['distribution_major_version'] }}/repo?arch={{ ansible_facts['architecture'] }}"
return_content: true
register: ceph_dev_yum_repo
- name: Configure ceph red hat development repository
ansible.builtin.copy:
content: "{{ ceph_dev_yum_repo.content }}"
dest: /etc/yum.repos.d/ceph-dev.repo
owner: root
group: root
mode: "0644"
backup: true
- name: Remove ceph_stable repositories
ansible.builtin.yum_repository:
name: '{{ item }}'
file: ceph_stable
state: absent
with_items:
- ceph_stable
- ceph_stable_noarch
@@ -0,0 +1,8 @@
---
- name: Configure openSUSE ceph OBS repository
community.general.zypper_repository:
name: "OBS:filesystems:ceph:{{ ceph_release }}"
state: present
repo: "{{ ceph_obs_repo }}"
auto_import_keys: true
autorefresh: true