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

Exhaustive printing by remote frontend #2978

Closed
ezpzbz opened this issue Jun 7, 2019 · 4 comments
Closed

Exhaustive printing by remote frontend #2978

ezpzbz opened this issue Jun 7, 2019 · 4 comments

Comments

@ezpzbz
Copy link
Member

ezpzbz commented Jun 7, 2019

I am trying to configure and use a remote front end in our HPC facility which prints exhaustive log to the screen upon connection. We tried to use the solution provided under the issue #1890 but apparently putting either of guards (both in .bashrc and .bash_profile) does not solve the issue.

The non-interactive shell by executing ssh <host> " bash --login -c 'ls' " still prints out the welcome message:

                   __                             _                       cesnet
 __ __ ___    ___ |  |_  ___ _   ___  ___  _ __  | |_  _ __  _   _  _ __ ___
|  \_ ` _ \ /  _ \|  __|/  _` | / __|/ _ \| \_ \ | __|| \__|| | | || \_ ` _ \
|  | | | | |   __/|  |_|  (_| || (__|  __/| | | || |_ | |   | |_| || | | | | |
|__| |_| |_|\____| \___|\___,_| \___|\___||_| |_| \__||_|    \__,_||_| |_| |_|
 _   _       _   _       _
|_| |_|  _  |_| |_|  _  |_|
        |_|         |_|


 Your Home Directories
 ----------------------
  Size  Avail  S.Quota   Used Directory
  175T   142T       1G    48k /storage/brno11-elixir/home/pezhman
  1.8P   789T     none    46G /storage/brno1-cerit/home/pezhman
  110T    37T      31G    18G /storage/brno2/home/pezhman
  932T   102T     none    38G /storage/brno3-cerit/home/pezhman
  262T   100T     209G    46G /storage/brno6/home/pezhman
   88T    32T     102G   232k /storage/brno8/home/pezhman
  262T   111T       3T   897G /storage/brno9-ceitec/home/pezhman
   60T    26T     102G   204k /storage/budejovice1/home/pezhman
   30T    25T      10G    64k /storage/liberec3-tul/home/pezhman
  352T    60T       3T   160k /storage/plzen1/home/pezhman
  100T    37T     524G   224k /storage/praha1/home/pezhman
  142T    90T       1G    68k /storage/praha5-elixir/home/pezhman

 CPUs
 -----
  Free   Used    Total        Centre
  1021   4469     5490        CERIT
   873   8101     8974        META


 Contact
 --------
  E-mail:	meta@cesnet.cz
  Web:		http://www.metacentrum.cz/

Linux skirit.ics.muni.cz 4.9.0-8-amd64 #1 SMP Debian 4.9.110-3+deb9u4 (2018-08-21) x86_64
badiei_lang_comment
dir_BTC_tBu.gjf.sh.infout
gaussian_submit_maker.sh
halogen_bonds
HenryCoefficient-master
lmp_knl
logfile
PEGrid-master
raspashared
script-test
script-test2
shared
test
xyzopt.xyz
zeo

The current fix for this issue proposed by @ltalirz is to change the the following line:
https://github.com/aiidateam/aiida_core/blob/521b77824c0e066f5ba0f58045b98f7a0269b9ef/aiida/transports/plugins/ssh.py#L1128

and remove the -l.

@ltalirz
Copy link
Member

ltalirz commented Jun 8, 2019

@giovannipizzi This was a case where

  • the user could really not do anything to stop printing the welcome message (we put both guards in both .bashrc and .bash_profile)
  • the welcome message was printed only for login shells (interestingly, also for non-interactive login shells, which is probably a misconfiguration on the side of the computing centre)

One way of offering a solution would be to add the type of shell (login vs. no-login) as a variable to the computer

@espenfl
Copy link
Contributor

espenfl commented Jun 13, 2019

Adding a bit to this. This is also rather typical configuration these days (except possibly the misconfiguration of the non-interactive shell) It is used as a messaging channel to the users. Turns out to be far more effective than anything else. We cannot expect this to go away anytime soon.

Given that it seems we have two clear cut cases: offering novice users an expected behavior and offering more experienced users compliance, I would suggest considering to add an option to remove the -l for the computer config. Default should be the current config. When developing we also get a lot of garbage due to this when we use run to check something. Of course, for the clusters that do this for the non-interactive, we cannot do much, but then the users should open an issue with them.

@ltalirz
Copy link
Member

ltalirz commented Jun 13, 2019

@espenfl Just to clarify: AiiDA has no issues, if this "welcome message" is shown only for interactive shells (which is e.g. the case at all supercomputing centers I'm interacting with).
For some reason, the cluster in question kept printing this message for non-interactive shells (if they were login shells).

Anyhow, I don't see a problem with making this configurable in the computer setup configuration step. Would welcome a PR for this.
@giovannipizzi Do you agree?

P.S. As for where to put this information (setup vs configuration) it's not entirely straightforward.
Since it is related to the ssh connection one might think it should go in the configuration but it is also a (maybe not super important) part of the provenance, since it can determine which environment variables are active etc. @giovannipizzi What do you think?

@sphuber
Copy link
Contributor

sphuber commented Jul 23, 2020

This is fixed in #4271 . When configuring a computer, you can now set use_login_shell=False and the -l flag will no longer be used

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

No branches or pull requests

4 participants