Tim Pierce [Tue, 11 Nov 2014 20:59:23 +0000 (15:59 -0500)]
4294: additional unit tests
test_server_calc_returns_min_nodes_for_one_job
* Ensures that the @ServerCalculator@ still returns a wishlist with
_min_nodes_ when there is a job in the queue.
test_server_calc_more_jobs_than_min_nodes
* Tests that when the job queue has between _min_nodes_ and _max_nodes_ in
it, @ServerCalculator@ returns a wishlist exactly as long as the job
queue.
Tim Pierce [Tue, 11 Nov 2014 16:04:19 +0000 (11:04 -0500)]
3857: code review feedback
* Set default timeouts to (20, 300) for proxies and (2, 300) for all
else.
* KeepService:
** Removed unused 'timeout' argument to __init__()
** Trimmed unnecessary exceptions in last_status()
* Tests:
** test_collections.py: changed mock_api_call return value back to
fake_httplib2_response
** Flattened test layers to eliminate KeepClientRetryGetTestMixin and
KeepClientRetryPutTestMixin
** Moved proxy timeout tests to
KeepClientServiceTestCase.test_proxy_get_request and
.test_proxy_put_request
* Removed excess blank lines in docstrings
Tim Pierce [Fri, 7 Nov 2014 14:37:24 +0000 (09:37 -0500)]
4294: added min_nodes config parameter
Added min_nodes configuration setting. The job queue will return a
wishlist with at least min_nodes elements in it, and the node manager
daemon will avoid shutting down a node if it would bring the total below
min_nodes.
* arvnodeman.config sets default min_nodes to 0.
* NodeManagerDaemonActor:
** _nodes_wanted returns at least enough to keep the node count above
min_nodes
** _nodes_excess will not allow the node count to drop below min_nodes
* jobqueue.ServerCalculator.servers_for_queue returns a list with at least
min_nodes elements
* added test cases:
** NodeManagerDaemonActorTestCase.test_shutdown_declined_below_min_nodes
** ServerCalculatorTestCase.test_server_calc_returns_at_least_min_nodes
Added unit tests to check that KeepClient.get and KeepClient.put use the
default 'timeout' setting when talking directly to a Keep server, and
the 'proxy_timeout' setting when communicating with a proxy.
Earlier we refactored our API token loading code to load User.current
to check that it was valid. This approach doesn't work when we're
presenting shared Collections, because the token usually won't be
scoped to get user information. Skip the check for this specific
case.
Peter Amstutz [Thu, 6 Nov 2014 16:37:49 +0000 (11:37 -0500)]
4310: Fix race condition between testing for tag and setting tag by reversing
order of operations: try to set the tag, and only test for it if there is an
error.
Tim Pierce [Thu, 6 Nov 2014 16:02:50 +0000 (11:02 -0500)]
4088: code review feedback
* Modified styling for "Select all" and "Unselect all"
* "filename filter" -> "filename regex"
* Changed refutations to assertions to avoid running afoul of AJAX race
conditions
* Refactored checkbox assertions into a helper
Ward Vandewege [Thu, 6 Nov 2014 15:23:11 +0000 (10:23 -0500)]
Update the behavior of the auto_admin_user configuration field a bit to
make it more intuitive: the first user created with an e-mail address
that matches auto_admin_user will now become admin, regardless of the
presence of other admin users. Any subsequent accounts created with that
e-mail address will no longer become admin.
Tim Pierce [Wed, 5 Nov 2014 21:24:57 +0000 (16:24 -0500)]
3857: replaced httplib2 with 'requests'
Replaced httplib2 with the 'requests' library in modules that use it to
call Keep:
* arvados.collection
* arvados.keep
* arvados.retry
* arvados.stream
Brett Smith [Fri, 31 Oct 2014 17:59:59 +0000 (13:59 -0400)]
4357: Node Manager boots new nodes when up nodes are busy.
The key part of this commit is the change to _nodes_wanted.
Everything else provides the information to make that calculation.
This changes the daemon test to use real monitor actors, rather than a
mock. This hurts test isolation a bit, but it's really tricky to mock
individual monitors otherwise. Because monitors only communicate with
the daemon itself, this seems like a worthwhile trade-off; it doesn't
introduce external dependencies or noticeably increase test time.
Peter Amstutz [Tue, 4 Nov 2014 15:35:09 +0000 (10:35 -0500)]
4084: Remove "no-auto-reload" css class hint, tabs no longer reload on click by
default so it is not necessary to have a class to suppress that behavior.
Peter Amstutz [Mon, 3 Nov 2014 21:15:31 +0000 (16:15 -0500)]
4084: Only load tab on switch if it doesn't have "pane-loaded" class. Increase
default throttle to 15 sec instead of 3 (but refresh panels can set their own
throttle time.)
Peter Amstutz [Mon, 3 Nov 2014 20:06:09 +0000 (15:06 -0500)]
4031: Improve provenance graph tests for readability, use fixtures instead of
hardcoded hashes. Improve efficiency of matching collections in search_edges.
Remove spurious debug code.