-
Notifications
You must be signed in to change notification settings - Fork 94
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
symlink dirs: check for existing link target? #4888
Comments
This causes the (venv) oliverh@w-nwp01:~/cylc-src/foo$ ls
flow.cylc rose-suite.conf
(venv) oliverh@w-nwp01:~/cylc-src/foo$ cylc install
INSTALLED foo/run1 from /scale_wlg_persistent/filesets/home/oliverh/cylc-src/foo
(venv) oliverh@w-nwp01:~/cylc-src/foo$ rm -rf ~/cylc-run/foo
(venv) oliverh@w-nwp01:~/cylc-src/foo$ cylc install
INSTALLED foo/run1 from /scale_wlg_persistent/filesets/home/oliverh/cylc-src/foo
PluginError: Error in plugin cylc.post_install.rose_opts
AttributeError: 'Values' object has no attribute 'clear_rose_install_opts' The AttributeError has something to do with |
Reproduced, complete with the Cylc Rose Error message. Explanation of the Cylc Rose message and unhandled situation if conf_filepath.is_file():
if opts.clear_rose_install_opts:
conf_filepath.unlink()
else:
...
How do we want this to behave? I think that if It looks like the Cylc Rose problem arises from the absence of the option |
This sounds reasonable to me. |
I think the symlink dir issue is a consequence of #4790? These two could likely be addressed together. |
I think they are slightly different. #4790 includes the case where the directory already exists (either as a directory or a symlink). We need to allow this in some cases. |
I've just had a thought - this should only apply for the run dir symlink, right? If e.g. the log dir symlink target exists, that shouldn't be a problem? |
In my view it should apply to any symlink target. |
Now:
blah/run1
)rm -rf ~/cylc-run
orrm -rf ~/cylc-run/blah
blah/run1
)Result:
rm
does not follow symlinks).Of course, this is one of the two reasons we should use
cylc clean
and notrm -rf
(clean up job hosts, and clean up symlinked run dirs). But some users won't be aware of that, or will likely revert to usingrm -rf
sometimes without being aware of the consequences.I think
cylc install
should abort if it finds the target of a new symlinked dir already exists, to ensure that run directories contain only the expected files (and those generated at run time).(I can't think of any good reason why an existing target should be allowed - agree?)
The text was updated successfully, but these errors were encountered: