mirror of
https://github.com/ceph/ceph
synced 2026-08-02 07:03:18 +00:00
qa: check immutable object cache content
fix check immutable cache does not work Signed-off-by: Yin Congmin <congmin.yin@intel.com>
This commit is contained in:
parent
3713645324
commit
f18aca8746
@ -32,16 +32,22 @@ def immutable_object_cache(ctx, config):
|
||||
try:
|
||||
yield
|
||||
finally:
|
||||
log.info("cleanup immutable object cache")
|
||||
log.info("check and cleanup immutable object cache")
|
||||
for client, client_config in config.items():
|
||||
client_config = client_config if client_config is not None else dict()
|
||||
(remote,) = ctx.cluster.only(client).remotes.keys()
|
||||
cache_path = client_config.get('immutable object cache path', '/tmp/ceph-immutable-object-cache')
|
||||
ls_command = '"$(ls {} )"'.format(cache_path)
|
||||
remote.run(
|
||||
args=[
|
||||
'test', '-n', run.Raw(ls_command),
|
||||
]
|
||||
)
|
||||
remote.run(
|
||||
args=[
|
||||
'sudo', 'killall', '-s', '9', 'ceph-immutable-object-cache', run.Raw('||'), 'true',
|
||||
]
|
||||
)
|
||||
cache_path = client_config.get('immutable object cache path', '/tmp/ceph-immutable-object-cache')
|
||||
remote.run(
|
||||
args=[
|
||||
'sudo', 'rm', '-rf', cache_path, run.Raw('||'), 'true',
|
||||
|
||||
Loading…
Reference in New Issue
Block a user