SimFactory 1 does not create source directory on login

Issue #383 closed
Ian Hinder created an issue

If I run "sim login <machine>" to a machine where the remote source directory does not exist, the login fails with

bash: line 0: cd: /nics/d/home/hinder/Cactus/etrelease: No such file or directory Connection to kraken-gsi2.nics.teragrid.org closed.

If I run a "sim sync" first, then a subsequent sim login works correctly.

I propose that simfactory should create the required directories before logging in.

Keyword:

Comments (12)

  1. Erik Schnetter
    • removed comment

    Creating the directory would allow people to log in, but would still not allow people to execute any simfactory commands there (since simfactory is not yet available on the remote system).

  2. Frank Löffler
    • removed comment

    Right - the existence of a remote source tree shouldn't be required to login to that machine.

  3. Ian Hinder reporter
    • removed comment

    We could insist that all commands except sync need a sync to have been performed first. In which case we should give an error message along the lines of "No remote simfactory installation found. Please run sim sync before attempting to access a remote system using simfactory." However, since login is easy to support, it might be a good idea for login to be allowed even without a remote source directory being present.

  4. Frank Löffler
    • removed comment

    Indeed. It would be extremely useful to be able to use 'sim login', e.g. to debug problems with a sync itself. Why does 'login' depend on a sync anyway? Is it because it might automatically 'put you' in the right directory? If so, then this could be caught and commented on with a warning in case the directory didn't exist - instead of an error and no remote shell in the end.

  5. Ian Hinder reporter
    • removed comment

    The only error was that the directory didn't exist on login. I think login should just create the directory.

  6. anonymous
    • removed comment

    I uploaded a small patch that changes sim_login from using

    my $cmd = "cd $path && \$SHELL -l"; to

    my $cmd = "cd $path || echo \"could not change to directory $path\"; \$SHELL -l";

    This makes it fail gracefully when it can't change to the correct directory. I can change it so it attempts to make the directory, but this seems better because I don't think it's right to attempt to make the path if sourcebasedir is wrong.

  7. Frank Löffler

    Ian will not have time until the release. I believe it's now fixed, but I will just delay the ticket for after the release for Ian to still have a look and opportunity for input.

  8. Log in to comment