Skip to content

Commit 7781066

Browse files
committed
EH: CS-1261 qrsh -verbose shall log which transport client it uses and where the information comes from
1 parent 202644d commit 7781066

File tree

3 files changed

+14
-1
lines changed

3 files changed

+14
-1
lines changed

source/clients/qsh/msg_qsh.h

+4
Original file line numberDiff line numberDiff line change
@@ -77,5 +77,9 @@
7777
#define MSG_QSH_UNMATCHED_C _MESSAGE(17037, _("unmatched quote %c."))
7878
#define MSG_QSH_ERRORRUNNINGIJSSERVER_S _MESSAGE(17038, _("error running IJS server: " SFQ))
7979
#define MSG_QSH_ERRORWHILEWAITINGFORBUILTINIJSCONNECTION_S _MESSAGE(17039, _("error while waiting for builtin IJS connection: " SFQ)) \
80+
81+
#define MSG_QSH_RSH_CLIENT_FROM_ENVIRONMENT_S _MESSAGE(17040, _("Got rsh client name from environment: " SFN))
82+
#define MSG_QSH_RSH_CLIENT_FROM_QMASTER_SS _MESSAGE(17041, _("Got " SFN " client name from global/local config: " SFN))
83+
#define MSG_QSH_RSH_NO_CONFIG_USING_DEFAULT_SS _MESSAGE(17042, _("No " SFN " client configured in global/local config, using default: " SFN))
8084
\
8185
// clang-format on

source/clients/qsh/ocs_qsh.cc

+7
Original file line numberDiff line numberDiff line change
@@ -962,6 +962,8 @@ get_client_name(int is_rsh, int is_rlogin, int inherit_job)
962962
client_name = getenv("SGE_RSH_COMMAND");
963963
if (client_name != nullptr && strlen(client_name) > 0) {
964964
DPRINTF("rsh client name: %s\n", client_name);
965+
VERBOSE_LOG((stderr, MSG_QSH_RSH_CLIENT_FROM_ENVIRONMENT_S, client_name));
966+
VERBOSE_LOG((stderr, "\n"))
965967
if (strcasecmp(client_name, "builtin") == 0) {
966968
g_new_interactive_job_support = true;
967969
}
@@ -1013,6 +1015,7 @@ get_client_name(int is_rsh, int is_rlogin, int inherit_job)
10131015
char default_buffer[SGE_PATH_MAX];
10141016
dstring default_dstring;
10151017

1018+
// @todo 1262 there is no utilbin/arch/rsh any more
10161019
sge_dstring_init(&default_dstring, default_buffer, SGE_PATH_MAX);
10171020
sge_dstring_sprintf(&default_dstring, "%s/utilbin/%s/%s",
10181021
sge_root, sge_get_arch(),
@@ -1022,8 +1025,12 @@ get_client_name(int is_rsh, int is_rlogin, int inherit_job)
10221025
/* try to find telnet in PATH */
10231026
client_name = strdup(session_type);
10241027
}
1028+
VERBOSE_LOG((stderr, MSG_QSH_RSH_NO_CONFIG_USING_DEFAULT_SS, session_type, client_name));
1029+
VERBOSE_LOG((stderr, "\n"))
10251030
} else {
10261031
client_name = strdup(client_name);
1032+
VERBOSE_LOG((stderr, MSG_QSH_RSH_CLIENT_FROM_QMASTER_SS, session_type, client_name));
1033+
VERBOSE_LOG((stderr, "\n"))
10271034
}
10281035

10291036
if (strcasecmp(client_name, "builtin") == 0) {

source/daemons/execd/exec_job.cc

+3-1
Original file line numberDiff line numberDiff line change
@@ -910,7 +910,8 @@ int sge_exec_job(lListElem *jep, lListElem *jatep, lListElem *petep, char *err_s
910910
str_buffer = sge_dstring_sprintf(&dstr_buffer, "%s/%s/%s", execd_spool_dir, active_dir_buffer, PE_HOSTFILE);
911911
var_list_set_string(&environmentList, "PE_HOSTFILE", str_buffer);
912912
}
913-
/* for tightly integrated jobs, also set the rsh_command SGE_RSH_COMMAND */
913+
// for tightly integrated parallel jobs, also set the rsh_command SGE_RSH_COMMAND
914+
// it will be read by qrsh -inherit in the job script
914915
pe = lGetObject(jatep, JAT_pe_object);
915916
if (pe != nullptr && lGetBool(pe, PE_control_slaves)) {
916917
const char *mconf_string = mconf_get_rsh_command();
@@ -920,6 +921,7 @@ int sge_exec_job(lListElem *jep, lListElem *jatep, lListElem *petep, char *err_s
920921
char default_buffer[SGE_PATH_MAX];
921922
dstring default_dstring;
922923

924+
// @todo CS-1262 there is no utilbin/arch/rsh any more
923925
sge_dstring_init(&default_dstring, default_buffer, SGE_PATH_MAX);
924926
sge_dstring_sprintf(&default_dstring, "%s/utilbin/%s/rsh", sge_root, arch);
925927
var_list_set_string(&environmentList, "SGE_RSH_COMMAND", sge_dstring_get_string(&default_dstring));

0 commit comments

Comments
 (0)