Pip 20.3 added support for PEP 600, i.e. manylinux wheels using platform
tags of the form "manylinux_${GLIBCMAJOR}_${GLIBCMINOR}_${ARCH}". Fix
installation of dependencies like pysam 0.20.0 wheels, which otherwise need
to be built from source and can fail as reported by @assuntad23 in
https://gist.github.com/assuntad23/3022db63a6878f044a209961dd40e592
Also:
- Install `wheel` to fix warning like `Using legacy setup.py install for
beaker, since package 'wheel' is not installed.`
- Drop unnecessary `defaults` channel from conda commands.
- Fix "SC2223: This default assignment may cause DoS due to globbing. Quote
it." errors reported by `shellcheck -x` .
We do need to include some kind of worker id in the server_name. If we
don't do this and we start with multiple workers the internal
QueueWorker won't work and multiple processes can pick up the same job
if the web process is also a job handler.
their own means of setting a log file. Read the supervisor log if it
exists and the daemon log does not, since failure to start Galaxy will
prevent creation of the daemon log file.
When running first startup in CI, attempt to read log files from
multiple places to make debugging different types of failures possible.
Otherwise, if a virtualenv is active on top of conda base env (e.g. when
running py37-first_startup tox test in TravisCI), the wrong `activate`
script is sourced.
Also fix `CONDA_PREFIX` environment variable definition when using a shell
not supported by conda.
Since at least version 3.7.4 of the `python` package from the `defaults`
conda channel, `python -V` doesn't reveal its origin any more.
Also some fixes suggested by `shellcheck`.
- Use `conda_activate`, which works also under dash
- Run `conda_activate` also when `$GALAXY_CONDA_ENV` already exists
- Run `virtualenv` when the conda env is active but `$GALAXY_VIRTUAL_ENV`
does not exist
- Update the default for `GALAXY_CONDA_ENV` in
scripts/common_startup_functions.sh
Follow-up on https://github.com/galaxyproject/galaxy/pull/6975 .
and starting Galaxy with `APP_WEBSERVER=gunicorn sh run.sh`.
Additional gunicorn cmdline arguments can be passed using
`GUNICORN_CMD_ARGS`. In a first pass this will allow
running planemo {server, test} under python 3, as Paste
has some problems under python 3:
```
galaxy.web.stack INFO 2018-09-29 22:16:00,216 Galaxy server instance 'main' is running
Traceback (most recent call last):
File "./scripts/paster.py", line 27, in <module>
serve.run()
File "/tmp/tmpv5tow6c8/galaxy-dev/lib/galaxy/util/pastescript/serve.py", line 1055, in run
invoke(command, command_name, options, args[1:])
File "/tmp/tmpv5tow6c8/galaxy-dev/lib/galaxy/util/pastescript/serve.py", line 1061, in invoke
exit_code = runner.run(args)
File "/tmp/tmpv5tow6c8/galaxy-dev/lib/galaxy/util/pastescript/serve.py", line 226, in run
result = self.command()
File "/tmp/tmpv5tow6c8/galaxy-dev/lib/galaxy/util/pastescript/serve.py", line 676, in command
serve()
File "/tmp/tmpv5tow6c8/galaxy-dev/lib/galaxy/util/pastescript/serve.py", line 653, in serve
server(app)
File "/tmp/tmpv5tow6c8/galaxy-dev/lib/galaxy/util/pastescript/loadwsgi.py", line 232, in server_wrapper
**context.local_conf)
File "/tmp/tmpv5tow6c8/galaxy-dev/lib/galaxy/util/pastescript/loadwsgi.py", line 90, in fix_call
val = callable(*args, **kw)
File "/home/travis/.planemo/gx_venv_3_release_18.09/lib/python3.6/site-packages/paste/httpserver.py", line 1353, in server_runner
for name, value in kwargs.items():
RuntimeError: dictionary changed size during iteration
```
That said gunicorn is a nice pure-python alternative to paste going
forward.
1) galaxy.yml
2) galaxy.ini
3) universe_wsgi.ini
Also:
- properly quote variables which may contain spaces
- no need to pass the config file to `./scripts/manage_tool_dependencies.py`
- simplify `scripts/maintenance.sh` by moving the `cd` up and reusing
functions from `scripts/common_startup_functions.sh`
to store --pid-file and --log-file options of `./scripts/paster.py` .
https://github.com/galaxyproject/galaxy/pull/6239 fixed 3 bugs:
- `GALAXY_RUN_ALL=1 ./run.sh` was reusing the same pid and log files for
all Galaxy processes;
- `./run.sh restart` was always using `paster.pid` and `paster.log` instead
of the configured files
- `./run.sh status` was always using `paster.pid`
but also introduced a regression, i.e. the plain `./run.sh` started
writing to the log file instead of the standard output (console).
This fixes the regression by using a separate variable for these options
instead of conflating them in `paster_args` or `server_args`.
This avoids setting log and pid file in paster_args so that with
GALAXY_RUN_ALL they can be set individually, but ensures they are set
when running paster otherwise.