Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dolphinnext not compatible with fish #280

Open
sguizard opened this issue Jun 23, 2020 · 2 comments
Open

dolphinnext not compatible with fish #280

sguizard opened this issue Jun 23, 2020 · 2 comments

Comments

@sguizard
Copy link

sguizard commented Jun 23, 2020

Bug description
Dolphinnext cannot validate ssh connection and submit jobs if the user's shell is fish and not bash.

To Reproduce

  1. Connect to your HPC (remote)
  2. change your default shell to fish (chsh -s /usr/bin/fish <USER>)
    3a. Try validate a ssh connection will creating a new environement run
    3b. Try to run any pipeline

Expected behavior
From your local workstation (hosting dolphinnext)
==> 3a. Validation failed
==> 3b. /etc/profile (line 13): Unsupported use of '='. In fish, please use 'set PS1 '# ''.
from sourcing file /etc/profile
source: Error while reading file '/etc/profile'

ssh -oStrictHostKeyChecking=no -q -oChallengeResponseAuthentication=no -oBatchMode=yes -oPasswordAuthentication=no -oConnectTimeout=3  -p 22 -i /export/.dolphinnext/.ssh/1_2_ssh_pri.pky [email protected] "mkdir -p /tmp/test/run3 && echo 'INFO: Run directory created.'" 2>&1
INFO: Run directory created.
rsync -e 'ssh -oStrictHostKeyChecking=no -q -oChallengeResponseAuthentication=no -oBatchMode=yes -oPasswordAuthentication=no -oConnectTimeout=3  -p 22 -i /export/.dolphinnext/.ssh/1_2_ssh_pri.pky' ../tmp/pub/fhZ19HmnOyu9QqG5n1rgJ3J3Wik5Qh/run.tar.gz [email protected]:/tmp/test/run3  2>&1
ssh -oStrictHostKeyChecking=no -q -oChallengeResponseAuthentication=no -oBatchMode=yes -oPasswordAuthentication=no -oConnectTimeout=3  -p 22 -i /export/.dolphinnext/.ssh/1_2_ssh_pri.pky [email protected] " test  -f '/tmp/test/run3/run.tar.gz' && echo 'INFO: Run package exists.'" 2>&1
INFO: Run package exists.
ssh -oStrictHostKeyChecking=no -q -oChallengeResponseAuthentication=no -oBatchMode=yes -oPasswordAuthentication=no -oConnectTimeout=3  -p 22 -i /export/.dolphinnext/.ssh/1_2_ssh_pri.pky [email protected] "source /etc/profile && tar xf /tmp/test/run3/run.tar.gz -C /tmp/test/run3 && rm /tmp/test/run3/run.tar.gz && bash /tmp/test/run3/.dolphinnext.init" >> ../tmp/pub/fhZ19HmnOyu9QqG5n1rgJ3J3Wik5Qh/run/serverlog.txt 2>&1 & echo $! &
 cp /tmp/test/run3/log.txt /tmp/test/run3/log.txt.3 2>/dev/null || true && >/tmp/test/run3/log.txt && mv /tmp/test/run3/timeline.html /tmp/test/run3/timeline.html.3 2>/dev/null || true && mv /tmp/test/run3/trace.txt /tmp/test/run3/trace.txt.3 2>/dev/null || true && mv /tmp/test/run3/dag.html /tmp/test/run3/dag.html.3 2>/dev/null || true && mv /tmp/test/run3/report.html /tmp/test/run3/report.html.3 2>/dev/null || true && mv /tmp/test/run3/.nextflow.log /tmp/test/run3/.nextflow.log.3 2>/dev/null || true && mv /tmp/test/run3/err.log /tmp/test/run3/err.log.3 2>/dev/null || true && mv /tmp/test/run3/out.log /tmp/test/run3/out.log.3 2>/dev/null || true && cp /tmp/test/run3/initialrun/initial.log /tmp/test/run3/initialrun/initial.log.3 2>/dev/null || true && >/tmp/test/run3/initialrun/initial.log && mv /tmp/test/run3/initialrun/timeline.html /tmp/test/run3/initialrun/timeline.html.3 2>/dev/null || true && mv /tmp/test/run3/initialrun/trace.txt /tmp/test/run3/initialrun/trace.txt.3 2>/dev/null || true && mv /tmp/test/run3/initialrun/dag.html /tmp/test/run3/initialrun/dag.html.3 2>/dev/null || true && mv /tmp/test/run3/initialrun/report.html /tmp/test/run3/initialrun/report.html.3 2>/dev/null || true && mv /tmp/test/run3/initialrun/.nextflow.log /tmp/test/run3/initialrun/.nextflow.log.3 2>/dev/null || true && mv /tmp/test/run3/initialrun/err.log /tmp/test/run3/initialrun/err.log.3 2>/dev/null || true && mv /tmp/test/run3/initialrun/out.log /tmp/test/run3/initialrun/out.log.3 2>/dev/null || true &&  mkdir -p /tmp/test/run3/.dolphinnext/uuid && touch /tmp/test/run3/.dolphinnext/uuid/fhZ19HmnOyu9QqG5n1rgJ3J3Wik5Qh && cd /tmp/test/run3 && printf '#!/bin/bash \n#SBATCH -o /tmp/test/run3/.dolphinnext.log\n#SBATCH -e /tmp/test/run3/err.log\n#SBATCH --job-name=test\n#SBATCH --partition=mainq\nexport NXF_VER=19.10.0 && export NXF_ANSI_LOG=false && echo "Cluster Env" && NXF_SINGULARITY_CACHEDIR="${NXF_SINGULARITY_CACHEDIR:-$HOME/.dolphinnext/singularity}" && export NXF_SINGULARITY_CACHEDIR=$NXF_SINGULARITY_CACHEDIR &&  rm -rf /tmp/test/report3 &&  cd /tmp/test/run3 && nextflow /tmp/test/run3/nextflow.nf     -with-report -with-trace -with-timeline > /tmp/test/run3/log.txt  && rm -rf /tmp/test/run3/work'> /tmp/test/run3/.dolphinnext.run && sbatch /tmp/test/run3/.dolphinnext.run
/etc/profile (line 13): Unsupported use of '='. In fish, please use 'set PS1 '# ''.
from sourcing file /etc/profile
source: Error while reading file '/etc/profile'

Temporary FIX
chsh -s /bin/bash <USER> on HPC

OS (both local and remote machines)

lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 18.04.4 LTS
Release:	18.04
Codename:	bionic
@onuryukselen
Copy link
Member

Hi, could you try adding chsh -s /bin/bash <USER> in the run command section of your run environment? This command will be executed before executing other commands.

@sguizard
Copy link
Author

sguizard commented Jun 24, 2020

Hi,

I don't think it's the solution for two reasons :

  1. this command ask for the user password, and I don't to have my password wrote in clear anywhere :)
  2. this command change the default login shell of the user, so instead of executing this command each time a pipeline is started, it's would be simpler to just run the command once for all. But, I really love fish don't really want to go back to bash.

One solution, I guess, would be to explicitly run the command with bash with it's -c option :

ssh <ALL OPTIONS> [email protected] "bash -c 'source /etc/profile && tar xf /tmp/test/run3/run.tar.gz -C /tmp/test/run3 && rm /tmp/test/run3/run.tar.gz && bash /tmp/test/run3/.dolphinnext.init'" >> ../tmp/pub/fhZ19HmnOyu9QqG5n1rgJ3J3Wik5Qh/run/serverlog.txt 2>&1 & echo $! &

I hope it help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants