Skip to content

Commit

Permalink
Merge pull request #19035 from mckellyln/library_path_fix
Browse files Browse the repository at this point in the history
HPCC-32512 Fix LD_LIBRARY_PATH for internal ssh cmd from frunssh and rsync

Reviewed-by: Jake Smith <[email protected]>
Reviewed-by: Gavin Halliday <[email protected]>
Merged-by: Gavin Halliday <[email protected]>
  • Loading branch information
ghalliday authored Aug 23, 2024
2 parents 915aa6b + e75fc2b commit a2790d3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions common/remote/rmtssh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,8 @@ class CFRunSSH: public CInterface, implements IFRunSSH
printf("%s\n",cmdline.str());
else {
Owned<IPipeProcess> pipe = createPipeProcess();
// reset LD_LIBRARY_PATH here so ssh cmd itself doesn't use HPCC libssl/crypto as they may be different
pipe->setenv("LD_LIBRARY_PATH", ":");
if (pipe->run((verbose&&!usepssh)?"FRUNSSH":NULL,cmdline.str(),workdir,
useplink, // for some reason plink needs input handle
true,true)) {
Expand Down
3 changes: 2 additions & 1 deletion initfiles/bin/init_thorslave.in
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@ start_slaves()
rsync_att=3
rsync_stat=1
while [[ $rsync_stat -ne 0 && $rsync_att -gt 0 ]] ; do
rsync -e "ssh -o LogLevel=QUIET -o StrictHostKeyChecking=no" --timeout=60 $master:$instancedir/slaves $slavesfname
# reset LD_LIBRARY_PATH here so ssh cmd doesn't use HPCC libssl/crypto as they may be different
LD_LIBRARY_PATH=: rsync -e "ssh -o LogLevel=QUIET -o StrictHostKeyChecking=no" --timeout=60 $master:$instancedir/slaves $slavesfname
rsync_stat=$?
((rsync_att--))
log "rsync returns ${rsync_stat}"
Expand Down

0 comments on commit a2790d3

Please sign in to comment.