Skip to content

Commit 8b08b86

Browse files
committed
[irods/irods#7229,irods/irods#7996,#235] iRODS 5: Replace use of irodsctl.
irodsctl was removed in iRODS 5. This commit replaces the testing environment's use of irodsctl with the python code invoked via irodsctl.
1 parent 575b5fd commit 8b08b86

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

irods_testing_environment/irods_setup.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -415,13 +415,13 @@ def restart_rsyslog(container):
415415

416416

417417
def stop_irods(container):
418-
irodsctl = os.path.join(context.irods_home(), 'irodsctl')
419-
return execute.execute_command(container, f'{irodsctl} stop', user='irods')
418+
cmd = "python3 -c 'from scripts.irods.controller import IrodsController; IrodsController().stop()'"
419+
return execute.execute_command(container, cmd, user='irods', workdir=context.irods_home())
420420

421421

422422
def restart_irods(container):
423-
irodsctl = os.path.join(context.irods_home(), 'irodsctl')
424-
return execute.execute_command(container, f'{irodsctl} restart', user='irods')
423+
cmd = "python3 -c 'from scripts.irods.controller import IrodsController; IrodsController().restart()'"
424+
return execute.execute_command(container, cmd, user='irods', workdir=context.irods_home())
425425

426426

427427
def setup_irods_server(container, setup_input):

irods_testing_environment/ssl_setup.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,8 @@ def configure_ssl_on_server(container,
104104
chain_file = os.path.join(context.irods_config(), 'chain.pem')
105105
cert_file = os.path.join(context.irods_config(), 'server.crt')
106106

107-
irodsctl = os.path.join(context.irods_home(), 'irodsctl')
108-
if execute.execute_command(container, '{} stop'.format(irodsctl), user='irods') is not 0:
107+
stop_cmd = "python3 -c 'from scripts.irods.controller import IrodsController; IrodsController().stop()'"
108+
if execute.execute_command(container, stop_cmd, user='irods', workdir=context.irods_home()) is not 0:
109109
raise RuntimeError(
110110
'failed to stop iRODS server before SSL configuration [{}]'
111111
.format(container.name))
@@ -142,7 +142,8 @@ def configure_ssl_on_server(container,
142142
negotiation_key.configure_ssl_in_server(container, 'CS_NEG_REQUIRE')
143143

144144
# start the server again
145-
if execute.execute_command(container, '{} start'.format(irodsctl), user='irods') is not 0:
145+
start_cmd = "python3 -c 'from scripts.irods.controller import IrodsController; IrodsController().start()'"
146+
if execute.execute_command(container, start_cmd, user='irods', workdir=context.irods_home()) is not 0:
146147
raise RuntimeError(
147148
'failed to start iRODS server after SSL configuration [{}]'
148149
.format(container.name))

0 commit comments

Comments
 (0)