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

Make conda install and resolver status more robust #2789

Merged
merged 4 commits into from Aug 15, 2016

Conversation

Projects
None yet
3 participants
@mvdbeek
Copy link
Member

commented Aug 15, 2016

This should help prevent part of what went wrong in #2783.

@mvdbeek mvdbeek added this to the 16.07 milestone Aug 15, 2016

mvdbeek added some commits Aug 15, 2016

Make conda install and resolver status more robust
We disable the conda resolver if conda_exec is not found and we are
unable to install conda. Skip installing conda if it won't be used
(because conda exec is outside of conda_prefix).
Install conda if conda_prefix is an empty directory.
log.warning("Skipping installation of Conda into conda_prefix '%s', "
"since conda_exec '%s' is set to a path outside of conda_prefix.",
conda_context.conda_prefix, conda_context.conda_exec)
return False

This comment has been minimized.

Copy link
@nsoranzo

nsoranzo Aug 15, 2016

Member

I think that both is_conda_installed() and can_install_conda() should be methods of the CondaContext class.

This comment has been minimized.

Copy link
@mvdbeek

mvdbeek Aug 15, 2016

Author Member

That makes sense (and we can use this to provide admins more info about a resolvers status)

@mvdbeek mvdbeek force-pushed the mvdbeek:is_conda_installed branch from ecf3d6a to 30a14e3 Aug 15, 2016

@nsoranzo

This comment has been minimized.

Copy link
Member

commented Aug 15, 2016

👍

@bgruening

This comment has been minimized.

Copy link
Member

commented Aug 15, 2016

Nice one. Thanks a lot!

@bgruening bgruening merged commit 40f8589 into galaxyproject:release_16.07 Aug 15, 2016

4 checks passed

api test Build finished. 224 tests run, 0 skipped, 0 failed.
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
framework test Build finished. 111 tests run, 0 skipped, 0 failed.
Details
toolshed test Build finished. 582 tests run, 0 skipped, 0 failed.
Details
if auto_init:
if install_conda(conda_context):
if conda_context.can_install_conda():

This comment has been minimized.

Copy link
@mvdbeek

mvdbeek Aug 22, 2016

Author Member

Damnit, this causes a race condition when starting with a multi-handler setup :/.
If you have no conda installation in conda_prefix, all handlers will attempt to install conda at the same time (which fails because _conda/ is not empty), and so n-1 handler will have conda deactivated the first time you try to install conda at startup. Any idea what to do here, @bgruening @jmchilton @nsoranzo ? Maybe a lockfile?

@mvdbeek mvdbeek deleted the mvdbeek:is_conda_installed branch Nov 23, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.