[ceph-client] Fix ceph-rbd-pool deletion race

In cases where the pool deletion feature [0] is used, but the pool does
not exists, a pool is created and then subsequently deleted.

This was broken by the performance optimizations introduced with [1], as
the job is trying to delete a pool that does not exist (yet).

This change makes the ceph-rbd-pool job wait for manage_pools to finish
before trying to delete the pool.

0: https://review.opendev.org/c/792851
1: https://review.opendev.org/c/806443

Change-Id: Ibb77e33bed834be25ec7fd215bc448e62075f52a
This commit is contained in:
Phil Sphicas 2021-10-13 17:14:20 -07:00
parent 4d629d3db6
commit 25b0cdc7ec
3 changed files with 4 additions and 1 deletions

View File

@ -15,6 +15,6 @@ apiVersion: v1
appVersion: v1.0.0
description: OpenStack-Helm Ceph Client
name: ceph-client
version: 0.1.25
version: 0.1.26
home: https://github.com/ceph/ceph-client
...

View File

@ -384,6 +384,8 @@ if [[ -n $(grep ^{{ .name }}$ <<< "${pool_list}") ]] &&
fi
{{- end }}
{{- if and .delete .delete_all_pool_data }}
# Wait for manage_pool() to finish for this pool before trying to delete the pool
wait_for_pid $MANAGE_POOL_PID
# If delete is set to true and delete_all_pool_data is also true, delete the pool
if [[ "true" == "{{ .delete }}" ]] &&
[[ "true" == "{{ .delete_all_pool_data }}" ]]; then

View File

@ -26,4 +26,5 @@ ceph-client:
- 0.1.23 Helm 3 - Fix Job labels
- 0.1.24 Performance optimizations for the ceph-rbd-pool job
- 0.1.25 Update htk requirements
- 0.1.26 Fix ceph-rbd-pool deletion race
...