Commit Graph
17762 Commits
Author SHA1 Message Date
Nate Coraor e7b7bee82e Merge pull request #6293 from nsoranzo/release_18.05_strip_slurm_warning
[18.05] Strip a spurious Slurm warning from job stderr
2018-06-11 09:05:46 -04:00
Nicola Soranzo 12f51a4789 Merge pull request #6304 from mvdbeek/sleep_more
[18.05] Increase sleep if encountering (DB locking) exception
2018-06-08 14:28:15 +01:00
mvdbeek 753ecd625c Increase sleep if encountering exception 2018-06-08 11:07:51 +02:00
Nicola Soranzo 711070dc4c Merge branch 'release_18.01' into release_18.05 2018-06-07 10:28:42 +01:00
Martin Cech 3007c93d7c Merge pull request #6266 from jmchilton/from_param_fixes_backport
[18.01] Backport fixes for collection output actions.
2018-06-06 16:39:55 -05:00
Nicola Soranzo 2b8beb69c4 Merge branch 'release_18.01' into release_18.05 2018-06-06 15:58:08 +01:00
Nicola Soranzo 5a0f98802c Strip a spurious Slurm warning from job stderr
Reason for the Slurm warning
----------------------------

The Linux kernel memory controller (responsible for the memory cgroup) may
run out of cgroup subsystem state (CSS) IDs. When a cgroup is created it is
assigned a CSS ID to manage its state. Upon removal of the cgroup the
corresponding state information (e.g. cache entries) may still exist and
therefore the CSS ID is still held. When multiple frequent short-lived jobs
are run on a cluster node, the number of available CSS IDs becomes exhausted
and creating a new memory cgroup results in a ENOSPC ("No space left on
device"), which is reported by SLURM with the message "unable to add
task[pid=<PID>] to memory cg '(null)'" (even if jobs run fine).

There is a bugfix for the kernel that releases the CSS ID upon cgroup
destruction, but it appears to be only available after Linux 4.4. We use
CentOS 7, which is based on Linux 3.10. The only temporary solutions is to
reboot the affected cluster node.

Thanks to @tuxtobin for the detailed analysis above.

Reason for this patch
---------------------

Many tools rely on an empty stderr to determine if the job was successful,
either because they were never updated to use `<stdio>`/`detect_errors`, or
because the underlying tool returns a non-zero exit code when successful,
e.g. `tranalign` from
https://toolshed.g2.bx.psu.edu/view/devteam/emboss_5/832c20329690 .
Even using a `<regex>` inside `<stdio>` would not work because the Slurm
warning contains the word `error`.
2018-06-06 14:34:02 +01:00
mvdbeek bc8254faec Do not adapt target collection to child collection type
Otherwise mapping over list:list:pair to a pair input breaks
at https://github.com/galaxyproject/galaxy/blob/21b44bf348ae10d170ab96a3b6f30bf9dbbd5a4a/lib/galaxy/dataset_collections/subcollections.py#L12.

This and the previous commit should fix
https://github.com/galaxyproject/tools-iuc/issues/1563.
2018-06-04 07:00:38 -04:00
mvdbeek 49a1be4f1d Allow from_param to reference a child collection
This is necessary when mapping over a collection over an input
that is referenced in the output section, like so:
```
...
<when value="paired_collection">
    <action type="format">
        <option type="from_param" name="library.input_1" param_attribute="reverse.ext" />
    </action>
</when>
...
```
2018-06-04 07:00:36 -04:00
Nicola Soranzo c9daa60e91 Look for config file inside galaxy.dependencies.optional()
Also don't fail if no config file is found, just print a message on
stderr.
This allows the removal of the code to set `GALAXY_CONFIG_FILE` from
`scripts/common_startup.sh` .
2018-06-02 03:14:38 +01:00
Dannon Baker 692465d4ec Standard quotes. 2018-05-31 16:43:26 -04:00
Dannon Baker c0c8aad528 Fix history shared with me 'view' link 2018-05-31 16:42:11 -04:00
Björn Grüning c9641e1f13 Merge pull request #6227 from jmchilton/collection_type_source_regression
[18.05] Fix broken collection_type_source tool and test.
2018-05-27 07:48:02 +02:00
Martin Cech 221897be04 Merge pull request #6177 from guerler/remove_defunct_link
[18.05] Remove defunct sharing column link
2018-05-26 09:55:47 -05:00
Dannon e91f91b5f2 Merge pull request #6222 from mvdbeek/fix_optional_input
[18.05] Fix optional="True" inputs
2018-05-25 14:58:54 -04:00
ValentinChCloud 2d0c1478f9 Correct api/tools/{tool_id}/build 2018-05-25 16:18:25 +00:00
John Chilton 02feb17350 Fix broken collection_type_source tool and test.
The tool wouldn't load after 8af243c176 and that caused the relevant tests to "SKIP" instead of failing outright.

./run_tests.sh -api test/api/test_tools.py:ToolsTestCase.test_map_over_collection_type_source
2018-05-25 11:10:39 -04:00
mvdbeek 9df6309366 Fix optional input in DrillDownSelectToolParameter.from_json() as well
Thanks for catching that @nsoranzo
2018-05-25 14:32:06 +02:00
mvdbeek 3683639be9 Revert "Refactor code for clarity"
This reverts commit 91e97b6096.

The commit to revert causes
https://github.com/galaxyproject/galaxy/issues/6219, where the
`optional="True"` flag is not repected anymore. This is because we raise
an exception before checking that `value` may be legitimately `None`.
2018-05-25 12:25:23 +02:00
Martin Cech ce362e60ab Update version to 18.05 2018-05-23 14:44:54 -04:00
Martin Cech ec5924dd64 Merge pull request #6204 from jmchilton/password_fixes
[18.05] More password encoding handling fixes.
2018-05-23 13:08:22 -05:00
Nate Coraor a301d24016 Fix for loading container resolvers config file 2018-05-23 13:49:17 -04:00
John Chilton 55f7280d79 More password encoding handling fixes.
Fix handling comparison of older hashes in Python 2 and fix the hanlding of both for Python 3.

The previous iteration gave me some errors in Python 3, I brought in and adapted @mvdbeek's Python 3 fixes to fix these:

```
======================================================================
ERROR: test_security_passwords.test_hash_and_check
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/john/workspace/galaxy-lib/.tox/py34/lib/python3.4/site-packages/nose/case.py", line 198, in runTest
    self.test(*self.arg)
  File "/Users/john/workspace/galaxy-lib/tests/test_security_passwords.py", line 12, in test_hash_and_check
    simple_pass_hash = passwords.hash_password(simple_pass)
  File "/Users/john/workspace/galaxy-lib/galaxy/security/passwords.py", line 21, in hash_password
    return hash_password_PBKDF2(password)
  File "/Users/john/workspace/galaxy-lib/galaxy/security/passwords.py", line 44, in hash_password_PBKDF2
    hashed = pbkdf2_bin(smart_str(password), salt, COST_FACTOR, KEY_LENGTH, getattr(hashlib, HASH_FUNCTION))
  File "/Users/john/workspace/galaxy-lib/galaxy/security/passwords.py", line 78, in pbkdf2_bin
    rv = u = _pseudorandom(salt + _pack_int(block))
  File "/Users/john/workspace/galaxy-lib/galaxy/security/passwords.py", line 75, in _pseudorandom
    return [ord(_) for _ in h.digest()]
  File "/Users/john/workspace/galaxy-lib/galaxy/security/passwords.py", line 75, in <listcomp>
    return [ord(_) for _ in h.digest()]
TypeError: ord() expected string of length 1, but int found

======================================================================
ERROR: test_security_passwords.test_hash_consistent
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/john/workspace/galaxy-lib/.tox/py34/lib/python3.4/site-packages/nose/case.py", line 198, in runTest
    self.test(*self.arg)
  File "/Users/john/workspace/galaxy-lib/tests/test_security_passwords.py", line 38, in test_hash_consistent
    assert passwords.check_password(simple_pass, simple_pass_hash)
  File "/Users/john/workspace/galaxy-lib/galaxy/security/passwords.py", line 30, in check_password
    if check_password_PBKDF2(guess, hashed):
  File "/Users/john/workspace/galaxy-lib/galaxy/security/passwords.py", line 53, in check_password_PBKDF2
    hashed_guess = pbkdf2_bin(smart_str(guess), salt, int(cost_factor), KEY_LENGTH, getattr(hashlib, hash_function))
  File "/Users/john/workspace/galaxy-lib/galaxy/security/passwords.py", line 78, in pbkdf2_bin
    rv = u = _pseudorandom(salt + _pack_int(block))
TypeError: Can't convert 'bytes' object to str implicitly
```

Added tests that all now pass in Python 3 - including generating some passwords in Python 3 and verifying they pass when checked in Python 2 and vice versa.
2018-05-23 13:01:05 -04:00
John Chilton a8e0eda44d Merge pull request #6175 from dannon/password_fixes
[18.05] Allow non-ascii chars in pbkdf2 passwords
2018-05-23 12:04:53 -04:00
Nicola Soranzo 44e57ba8b4 Merge pull request #6196 from jmchilton/fix_metadata
[18.05] Fix data_source.py for upload changes in 18.05 release cycle.
2018-05-23 11:07:22 +01:00
guerler 6702fa45cd Remove defunct sharing column link 2018-05-22 16:19:44 -04:00
Martin Cech a5297af190 Merge branch 'release_18.01' into release_18.05 2018-05-22 14:45:56 -04:00
John Chilton 65c1cd761c Fix data_source.py for upload changes in 18.05 release cycle.
handle_uploaded_dataset_file was used by tools external to ``lib/`` include data_source.py and potentially tools in the tool shed. This restores the interface as a wrapper around a new method handle_uploaded_dataset_file_internal.

Broken in https://github.com/galaxyproject/galaxy/commit/ef6f7f62ab679928045c816a3cb719fb3bcea507 I believe.
2018-05-22 13:21:41 -04:00
Nicola Soranzo 01d2a5c2ae Fix parsing of scontrol show job
Fix the following traceback:
```
galaxy.jobs.runners.slurm ERROR 2018-05-22 13:01:07,050 (1024816/14094939) Failure in SLURM _complete_terminal_job(), job final state will be: failed
Traceback (most recent call last):
  File "/tgac/services/galaxy/prod/galaxy/lib/galaxy/jobs/runners/slurm.py", line 86, in _complete_terminal_job
    slurm_state = _get_slurm_state()
  File "/tgac/services/galaxy/prod/galaxy/lib/galaxy/jobs/runners/slurm.py", line 81, in _get_slurm_state
    job_info_dict = dict([out_param.split('=', 1) for out_param in stdout.split()])
ValueError: dictionary update sequence element #52 has length 1; 2 is required
```
2018-05-22 15:51:26 +01:00
John Chilton b931356ef3 Fix sphinx. 2018-05-22 06:24:59 -04:00
Martin Cech 805854aa6b Merge pull request #6183 from jmchilton/subprocess32_rev
[18.05] Rev subprocess32 dependency - that older version is not compatible with manylinux.
2018-05-21 13:29:11 -05:00
Dannon 92ebf28508 Merge pull request #6184 from erasche/gdpr
[18.05] extraneous self causing bug reporter to fail
2018-05-21 12:29:37 -04:00
Helena Rasche f07ba17241 extraneous self 2018-05-21 18:23:39 +02:00
John Chilton f561504689 Rev subprocess32 dependency - that older version is not compatible with manylinux.
https://github.com/google/python-subprocess32/issues/12
2018-05-21 12:01:44 -04:00
Dannon Baker 84c59917e6 Allow non-ascii chars in passwords. 2018-05-18 11:35:34 -04:00
Dannon Baker c6ce1342df More standard spacing in additional config comments just added. 2018-05-18 11:41:21 +01:00
Dannon Baker c8ecb0b38d Add sample commentary to the stub in config manage, xref a88e19064a 2018-05-18 11:40:26 +01:00
Nicola Soranzo 5d6bc5721a Merge branch 'release_18.01' into release_18.05 2018-05-18 10:29:53 +01:00
guerler 240ad36e20 Fix dataset access validation when attempting job reruns 2018-05-18 09:50:54 +02:00
guerler 3aace5d60e Fix dataset access validation when attempting job reruns 2018-05-18 02:19:24 -04:00
John Chilton 6cfe5880e1 [18.01] Fix structured_like unqualified references + test.
Update tool XSD to encourage using fully qualified inputs.

Reorganized the existing tests for consistency with other test tools I think.

(Rebased with fixes, including XSD fixes from @nsoranzo.)
2018-05-17 16:50:40 -04:00
Martin Cech 10a2e68b82 Merge pull request #6152 from martenson/compliance-rename
[18.05] rename the config option to enable_beta_gdpr
2018-05-17 10:05:25 -05:00
Dannon 7029cb936a Merge pull request #6149 from mvdbeek/fix_stuck_jobs_when_paramiko_fails
[18.05] Use RetryActionExecutor when executing commands via paramiko
2018-05-16 18:14:35 -04:00
Martin Cech 5c455c4472 Merge pull request #6144 from jmchilton/allow_implicit_conversion
[18.05] Fix tool build API for implicit collection conversion.
2018-05-16 16:44:49 -05:00
Martin Cech fe37996de3 rename the config option to enable_gdpr_beta
to reflect the information that we do not guarantee compliance
2018-05-16 12:38:46 -05:00
mvdbeek d2dc22d97f Use RetryActionExecutor when executing commands via paramiko
This should work around issues like

```
galaxy.jobs.runners ERROR 2018-05-16 10:15:55,522 [p:13768,w:0,m:1] [ShellRunner.work_thread-3] (34130) Unhandled exception calling queue_job
Traceback (most recent call last):
  File "lib/galaxy/jobs/runners/__init__.py", line 112, in run_next
    method(arg)
  File "lib/galaxy/jobs/runners/cli.py", line 94, in queue_job
    chmod_out = shell.execute("chmod +x %s" % tool_script)
  File "lib/galaxy/jobs/runners/util/cli/shell/rsh.py", line 77, in execute
    self.connect()
  File "lib/galaxy/jobs/runners/util/cli/shell/rsh.py", line 69, in connect
    timeout=self.timeout)
  File "/bioinfo/guests/mvandenb/galaxy/.venv/local/lib/python2.7/site-packages/paramiko/client.py", line 424, in connect
    passphrase,
  File "/bioinfo/guests/mvandenb/galaxy/.venv/local/lib/python2.7/site-packages/paramiko/client.py", line 714, in _auth
    raise saved_exception
SSHException: not a valid OPENSSH private key file
```

that can intermittently occur with rapid submission of many small jobs.
2018-05-16 14:18:50 +02:00
Nicola Soranzo b114b1d6ba Merge branch 'release_18.01' into release_18.05 2018-05-16 11:27:16 +01:00
Martin Cech 3a9a46f772 Merge pull request #6069 from erasche/gdpr
[18.05] GDPR Compliance Mode
2018-05-15 20:40:20 -05:00
Martin Cech ec83035c2a Merge pull request #6007 from natefoo/slurm-oom
[18.01] Handle Slurm 17.11's OUT_OF_MEMORY job state
2018-05-15 19:59:39 -05:00
John Chilton 11a31a1ae7 Update tool build API for implicit collection conversion. 2018-05-15 13:35:53 -04:00