]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
shrink-osd: fix regression because of a wrong regex
authorPer Abildgaard Toft <per@minfejl.dk>
Wed, 20 Oct 2021 07:45:16 +0000 (09:45 +0200)
committerGuillaume Abrioux <gabrioux@redhat.com>
Thu, 21 Oct 2021 10:38:25 +0000 (12:38 +0200)
968891f4498da9625acfdd34bfb01fe445d1eef2 introduced a regression.
The regex is wrong because it doesn't allow to shrink osds with id
greater than 9

Fixes: #6950
Signed-off-by: Per Abildgaard Toft <per@minfejl.dk>
(cherry picked from commit 84118a3063e38ed9d274cca90d115809353819b4)

infrastructure-playbooks/shrink-osd.yml

index 75ad7a4a2c7cb670c01e23f06354d452bba9eae7..42d96dddd7203a9befde9ede58604ac76ed89a88 100644 (file)
@@ -58,7 +58,7 @@
       fail:
         msg: "The id {{ item }} has wrong format, please pass the number only"
       with_items: "{{ osd_to_kill.split(',') }}"
-      when: not item is regex("^\d$")
+      when: not item is regex("^\d+$")
 
   tasks:
     - import_role: