API fix for casadm standby init

Cache line size parameter is handled inconsistently in standby init and
start cache methods.

This patch fixes this inconsistency so both methods accept a proper
CacheLineSize object.

Some of the existing tests needed fixing as well, as included in this
patch.

Signed-off-by: Krzysztof Majzerowicz-Jaszcz <krzysztof.majzerowicz-jaszcz@intel.com>
This commit is contained in:
Krzysztof Majzerowicz-Jaszcz
2022-07-05 20:17:08 +02:00
parent e82b07746e
commit 09d36d5e11
5 changed files with 20 additions and 16 deletions

View File

@@ -100,7 +100,7 @@ def test_functional_activate_twice_round_trip(filesystem):
):
secondary_node.cache = casadm.standby_init(
cache_dev=secondary_node.raid,
cache_line_size=str(cls.value.value // 1024),
cache_line_size=cls,
cache_id=cache_id,
force=True,
)
@@ -270,7 +270,7 @@ def test_functional_activate_twice_new_host(filesystem):
):
secondary_node.cache = casadm.standby_init(
cache_dev=secondary_node.raid,
cache_line_size=str(cls.value.value // 1024),
cache_line_size=cls,
cache_id=cache_id,
force=True,
)
@@ -545,7 +545,7 @@ def new_failover_instance(new_secondary_node, drbd_resource, *, autoload):
):
new_secondary_node.cache = casadm.standby_init(
cache_dev=new_secondary_node.raid,
cache_line_size=str(cls.value.value // 1024),
cache_line_size=cls,
cache_id=cache_id,
force=True,
)