#383: SimFactory 1 does not create source directory on login ------------------------+--------------------------------------------------- Reporter: hinder | Owner: mthomas Type: defect | Status: new Priority: major | Milestone: ET_2011_05 Component: SimFactory | Version: Keywords: | ------------------------+--------------------------------------------------- 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.
#383: SimFactory 1 does not create source directory on login -------------------------+-------------------------------------------------- Reporter: hinder | Owner: mthomas Type: defect | Status: new Priority: major | Milestone: ET_2011_05 Component: SimFactory | Version: Resolution: | Keywords: -------------------------+--------------------------------------------------
Comment (by eschnett):
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).
#383: SimFactory 1 does not create source directory on login -------------------------+-------------------------------------------------- Reporter: hinder | Owner: mthomas Type: defect | Status: new Priority: major | Milestone: ET_2011_05 Component: SimFactory | Version: Resolution: | Keywords: -------------------------+--------------------------------------------------
Comment (by knarf):
Right - the existence of a remote source tree shouldn't be required to login to that machine.
#383: SimFactory 1 does not create source directory on login -------------------------+-------------------------------------------------- Reporter: hinder | Owner: mthomas Type: defect | Status: new Priority: major | Milestone: ET_2011_05 Component: SimFactory | Version: Resolution: | Keywords: -------------------------+--------------------------------------------------
Comment (by hinder):
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.
#383: SimFactory 1 does not create source directory on login -------------------------+-------------------------------------------------- Reporter: hinder | Owner: mthomas Type: defect | Status: new Priority: major | Milestone: ET_2011_05 Component: SimFactory | Version: Resolution: | Keywords: -------------------------+--------------------------------------------------
Comment (by knarf):
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.
#383: SimFactory 1 does not create source directory on login -------------------------+-------------------------------------------------- Reporter: hinder | Owner: mthomas Type: defect | Status: new Priority: major | Milestone: ET_2011_05 Component: SimFactory | Version: Resolution: | Keywords: -------------------------+--------------------------------------------------
Comment (by hinder):
The only error was that the directory didn't exist on login. I think login should just create the directory.
#383: SimFactory 1 does not create source directory on login -------------------------+-------------------------------------------------- Reporter: hinder | Owner: mthomas Type: defect | Status: new Priority: major | Milestone: ET_2011_05 Component: SimFactory | Version: Resolution: | Keywords: -------------------------+--------------------------------------------------
Comment (by mthomas):
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.
#383: SimFactory 1 does not create source directory on login -------------------------+-------------------------------------------------- Reporter: hinder | Owner: mthomas Type: defect | Status: new Priority: major | Milestone: ET_2011_05 Component: SimFactory | Version: Resolution: | Keywords: -------------------------+--------------------------------------------------
Comment (by eschnett):
Ian, do you like this solution?
#383: SimFactory 1 does not create source directory on login -------------------------+-------------------------------------------------- Reporter: hinder | Owner: mthomas Type: defect | Status: review Priority: major | Milestone: ET_2011_05 Component: SimFactory | Version: Resolution: | Keywords: -------------------------+-------------------------------------------------- Changes (by knarf):
* status: new => review
#383: SimFactory 1 does not create source directory on login -------------------------+-------------------------------------------------- Reporter: hinder | Owner: mthomas Type: defect | Status: review Priority: major | Milestone: ET_2011_11 Component: SimFactory | Version: Resolution: | Keywords: -------------------------+-------------------------------------------------- Changes (by knarf):
* milestone: ET_2011_05 => ET_2011_11
Comment:
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.
#383: SimFactory 1 does not create source directory on login -------------------------+-------------------------------------------------- Reporter: hinder | Owner: mthomas Type: defect | Status: review Priority: major | Milestone: ET_2011_11 Component: SimFactory | Version: Resolution: | Keywords: -------------------------+--------------------------------------------------
Comment (by knarf):
A similar patch has now been appplied to the python version.
#383: SimFactory 1 does not create source directory on login -------------------------+-------------------------------------------------- Reporter: hinder | Owner: mthomas Type: defect | Status: closed Priority: major | Milestone: ET_2011_11 Component: SimFactory | Version: Resolution: fixed | Keywords: -------------------------+-------------------------------------------------- Changes (by eschnett):
* status: review => closed * resolution: => fixed
Comment:
Applied.
trac@lists.einsteintoolkit.org