retry on packages and repositories failures

add register/until on all packaging related tasks to avoid non valid CI
failure.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
pull/3451/head
Guillaume Abrioux 2018-12-19 14:55:01 +01:00 committed by mergify[bot]
parent 110049e825
commit d7e77012ef
30 changed files with 99 additions and 0 deletions

View File

@ -38,6 +38,8 @@
package:
name: lvm2
state: present
register: result
until: result is succeeded
# Make entire nvme device a VG
- name: add nvme device as lvm pv

View File

@ -29,6 +29,8 @@
package:
name: lvm2
state: present
register: result
until: result is succeeded
# BEGIN TEARDOWN
- name: find any existing osd filesystems

View File

@ -49,6 +49,8 @@
package:
name: gdisk
state: present
register: result
until: result is succeeded
- name: erase all previous partitions(dangerous!!!)
shell: sgdisk --zap-all -- /dev/{{item.device_name}}

View File

@ -58,6 +58,8 @@
package:
name: gdisk
state: present
register: result
until: result is succeeded
when: osds_journal_devices is defined
- name: generate uuid for osds journal

View File

@ -80,6 +80,8 @@
package:
name: gdisk
state: present
register: result
until: result is succeeded
- name: get osd(s) journal uuid
command: cat "/var/lib/ceph/osd/{{ cluster }}-{{ item.1.osd_id }}/journal_uuid"

View File

@ -5,6 +5,8 @@
package:
name: rhscon-agent
state: present
register: result
until: result is succeeded
tags:
- package-install

View File

@ -31,6 +31,8 @@
package:
name: rsync
state: present
register: result
until: result is succeeded
- name: synchronize ceph install
synchronize:

View File

@ -2,6 +2,8 @@
- name: add ubuntu cloud archive key package
package:
name: ubuntu-cloud-keyring
register: result
until: result is succeeded
- name: add ubuntu cloud archive repository
apt_repository:

View File

@ -5,3 +5,5 @@
update_cache: no
state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
default_release: "{{ ceph_stable_release_uca | default(omit) }}{{ ansible_distribution_release ~ '-backports' if ceph_origin == 'distro' and ceph_use_distro_backports else '' }}"
register: result
until: result is succeeded

View File

@ -3,3 +3,5 @@
apt:
pkg: "{{ debian_ceph_pkgs | unique }}"
state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
register: result
until: result is succeeded

View File

@ -15,6 +15,8 @@
state: present
update_cache: yes
cache_valid_time: 3600
register: result
until: result is succeeded
- name: include install_debian_packages.yml
include_tasks: install_debian_packages.yml

View File

@ -3,6 +3,8 @@
package:
name: "{{ redhat_package_dependencies }}"
state: present
register: result
until: result is succeeded
when:
- ansible_distribution == 'RedHat'
@ -10,6 +12,8 @@
yum:
name: "{{ centos_package_dependencies }}"
state: present
register: result
until: result is succeeded
when:
- ansible_distribution == 'CentOS'
@ -17,3 +21,5 @@
package:
name: "{{ redhat_ceph_pkgs | unique }}"
state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
register: result
until: result is succeeded

View File

@ -3,8 +3,12 @@
package:
name: "{{ suse_package_dependencies }}"
state: present
register: result
until: result is succeeded
- name: install suse ceph packages
package:
name: "{{ suse_ceph_pkgs | unique }}"
state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
register: result
until: result is succeeded

View File

@ -4,6 +4,8 @@
name: ['apt-transport-https', 'ca-certificates', 'curl', 'software-properties-common']
state: present
update_cache: yes
register: result
until: result is succeeded
- name: add docker's gpg key
apt_key:
@ -35,19 +37,26 @@
state: present
default_release: testing
update_cache: yes
register: result
until: result is succeeded
- name: install docker-py via pip for debian
pip:
name: docker-py
state: latest
register: result
until: result is succeeded
tags:
- skip_ansible_lint
- name: install docker on debian
package:
name: "{{ 'docker-ce' if ansible_architecture == 'aarch64' else 'docker-engine' }}"
state: present
update_cache: yes
register: result
until: result is succeeded
# NOTE (jimcurtis): need at least version 1.9.0 of six or we get:
# re:NameError: global name 'DEFAULT_DOCKER_API_VERSION' is not defined

View File

@ -13,6 +13,8 @@
name: python-six
state: present
update_cache: yes
register: result
until: result is succeeded
tags:
with_pkg
when:
@ -25,6 +27,8 @@
name: ['docker.io', 'python-docker']
state: present
update_cache: yes
register: result
until: result is succeeded
tags:
with_pkg
when:
@ -48,6 +52,8 @@
package:
name: ['docker', 'python-docker-py']
state: present
register: result
until: result is succeeded
tags:
with_pkg
when:

View File

@ -7,6 +7,8 @@
package:
name: ntp
state: present
register: result
until: result is succeeded
- name: start ntp
service:
name: ntp
@ -22,6 +24,8 @@
package:
name: chrony
state: present
register: result
until: result is succeeded
- name: start chronyd
service:
name: chronyd

View File

@ -7,6 +7,8 @@
package:
name: ntp
state: present
register: result
until: result is succeeded
- name: start ntp
service:
name: ntpd
@ -22,6 +24,8 @@
package:
name: chrony
state: present
register: result
until: result is succeeded
- name: start chrony
service:
name: chronyd

View File

@ -37,6 +37,8 @@
package:
name: "{{ item }}"
state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
register: result
until: result is succeeded
with_items:
- tcmu-runner
- ceph-iscsi-config

View File

@ -12,6 +12,8 @@
package:
name: "ceph-mds"
state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
register: result
until: result is succeeded
when:
- mds_group_name in group_names
- ansible_os_family == 'RedHat'

View File

@ -3,6 +3,8 @@
package:
name: ceph-mgr
state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
register: result
until: result is succeeded
when:
- ansible_os_family in ['RedHat', 'Suse']
@ -11,5 +13,7 @@
name: ceph-mgr
state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
default_release: "{{ ceph_stable_release_uca | default(omit) }}{{ ansible_distribution_release ~ '-backports' if ceph_origin == 'distro' and ceph_use_distro_backports else '' }}"
register: result
until: result is succeeded
when:
- ansible_os_family == 'Debian'

View File

@ -10,6 +10,8 @@
package:
name: policycoreutils-python
state: present
register: result
until: result is succeeded
when:
- selinuxstatus.stdout != 'Disabled'

View File

@ -53,15 +53,21 @@
name: libjemalloc1
state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
update_cache: yes
register: result
until: result is succeeded
- name: install nfs rgw/cephfs gateway - debian
apt:
name: ['nfs-ganesha-rgw', 'radosgw']
allow_unauthenticated: yes
register: result
until: result is succeeded
when: nfs_obj_gw
- name: install nfs rgw/cephfs gateway - debian
apt:
name: nfs-ganesha-ceph
allow_unauthenticated: yes
register: result
until: result is succeeded
when: nfs_file_gw
when:
- (ceph_origin == 'repository' or ceph_origin == 'distro')
@ -73,16 +79,22 @@
apt:
name: nfs-ganesha
state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
register: result
until: result is succeeded
- name: install red hat storage nfs file gateway
apt:
name: nfs-ganesha-ceph
state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
register: result
until: result is succeeded
when:
- nfs_file_gw
- name: install red hat storage nfs obj gateway
apt:
name: nfs-ganesha-rgw
state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
register: result
until: result is succeeded
when:
- nfs_obj_gw
when:

View File

@ -40,6 +40,8 @@
package:
name: nfs-ganesha-ceph
state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
register: result
until: result is succeeded
when:
- nfs_file_gw
@ -47,5 +49,7 @@
package:
name: ['nfs-ganesha-rgw', 'ceph-radosgw']
state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
register: result
until: result is succeeded
when:
- nfs_obj_gw

View File

@ -6,6 +6,8 @@
package:
name: parted
state: present
register: result
until: result is succeeded
when:
- not containerized_deployment
- ansible_os_family != 'ClearLinux'

View File

@ -5,6 +5,8 @@
package:
name: rbd-mirror
state: present
register: result
until: result is succeeded
tags:
- package-install

View File

@ -3,6 +3,8 @@
package:
name: nss-tools
state: present
register: result
until: result is succeeded
when:
- ansible_pkg_mgr == 'yum' or ansible_pkg_mgr == 'dnf'
@ -10,6 +12,8 @@
package:
name: libnss3-tools
state: present
register: result
until: result is succeeded
when:
- ansible_pkg_mgr == 'apt'

View File

@ -23,6 +23,8 @@
package:
name: lvm2
state: present
register: result
until: result is succeeded
when:
- not is_atomic

View File

@ -19,6 +19,8 @@
package:
name: s3cmd
state: present
register: result
until: result is succeeded
when:
- not is_atomic

View File

@ -80,6 +80,8 @@
package:
name: docker
state: present
register: result
until: result is succeeded
when: ansible_os_family == 'RedHat'
- name: allow insecure docker registries

View File

@ -20,6 +20,8 @@
package:
name: net-tools
state: present
register: result
until: result is succeeded
when:
- not is_atomic
@ -35,6 +37,8 @@
package:
name: epel-release
state: present
register: result
until: result is succeeded
- name: enable local epel repository
ini_file:
path: /etc/yum.repos.d/epel.repo