Skip to content

Commit

Permalink
add rgw_torrent_flag to get the torrent for files
Browse files Browse the repository at this point in the history
Signed-off-by: Tejas Chandramouli <[email protected]>
  • Loading branch information
TejasC88 committed Oct 8, 2024
1 parent d20fbac commit 0709ddd
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions rgw/v2/tests/s3_swift/test_policy_torrent.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import argparse
import json
import logging
import time
import traceback

import botocore.exceptions as boto3exception
Expand All @@ -33,6 +34,7 @@
from v2.utils.log import configure_logging
from v2.utils.test_desc import AddTestInfo
from v2.utils.utils import HttpResponseParser
from v2.utils.utils import RGWService

log = logging.getLogger()

Expand All @@ -52,6 +54,7 @@ def test_exec(config, ssh_con):
io_info_initialize = IOInfoInitialize()
basic_io_structure = BasicIOInfoStructure()
io_info_initialize.initialize(basic_io_structure.initial())
rgw_service = RGWService()

# create user
config.user_count = 2
Expand Down Expand Up @@ -91,6 +94,15 @@ def test_exec(config, ssh_con):
rgw_tenant1_user1,
tenant1_user1_info,
)
rgw_service_name = utils.exec_shell_cmd("ceph orch ls | grep rgw").split(" ")[0]
utils.exec_shell_cmd(
f"ceph config set client.{rgw_service_name} rgw_torrent_flag true"
)
srv_restarted = rgw_service.restart(ssh_con)
time.sleep(20)
if srv_restarted is False:
raise TestExecError("RGW service restart failed")
log.info("RGW Torrent flag enabled and service restarted")

if config.test_ops.get("upload_type") == "normal":
for oc, size in list(config.mapped_sizes.items()):
Expand Down

0 comments on commit 0709ddd

Please sign in to comment.