]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commit
Do not pass NoneType as argument to ceph_crush_rule
authorDmitriy Rabotyagov <dmitriy.rabotyagov@cleura.com>
Wed, 25 Oct 2023 11:47:19 +0000 (13:47 +0200)
committerGuillaume Abrioux <gabrioux@ibm.com>
Mon, 11 Mar 2024 14:48:19 +0000 (15:48 +0100)
commit310ce9e441736f40691a7b6f4939c08dfc8a63a8
tree564c8b8ce677fb57a5722f1c94968b346f645851
parentb904d269821c56e38a0df0b510c081dd0bf3ed64
Do not pass NoneType as argument to ceph_crush_rule

With ansible-core 2.15 it is not possible to pass argument of unexpected
type, as otherwise module will fail with:
`'None' is not a string and conversion is not allowed`

With that we want to only get all existing crush rules, so we can simply
supply an empty string as a name argument, which would satisfy
requirements and have same behaviour for previous ansible versions.

Alternative approach would be to stop making `name` as a required
argument to the module and use empty string as default value
when info state is used.

Signed-off-by: Dmitriy Rabotyagov <noonedeadpunk@gmail.com>
(cherry picked from commit b6102975549d8f870b0c20a01edda59d6ceac422)
library/ceph_crush_rule.py
roles/ceph-facts/tasks/get_def_crush_rule_name.yml
tests/library/test_ceph_crush_rule.py