[ARVADOS] updated: a8eec5a3443447ad7a31bd286ae7beabb8ca9e9d

Git user git at public.curoverse.com
Mon Nov 28 14:45:47 EST 2016


Summary of changes:
 .gitignore                                         |   3 +
 .../app/controllers/application_controller.rb      |  24 +-
 .../app/controllers/collections_controller.rb      |  13 +-
 .../app/controllers/projects_controller.rb         |  27 +-
 .../controllers/work_unit_templates_controller.rb  |   6 +-
 .../app/controllers/work_units_controller.rb       |  12 +-
 apps/workbench/app/models/arvados_base.rb          |   6 +-
 .../app/views/projects/_show_dashboard.html.erb    |  16 +-
 .../app/views/projects/_show_processes.html.erb    |   5 +
 .../app/views/projects/_show_workflows.html.erb    |   5 +
 apps/workbench/app/views/projects/show.html.erb    |  16 +-
 .../test/controllers/disabled_api_test.rb          |  66 ++++
 .../test/integration/application_layout_test.rb    |   2 +-
 .../test/integration/pipeline_instances_test.rb    |   2 +-
 apps/workbench/test/integration/projects_test.rb   |   2 +-
 apps/workbench/test/integration/work_units_test.rb |   2 +-
 apps/workbench/test/performance/browsing_test.rb   |   2 +-
 apps/workbench/test/unit/disabled_api_test.rb      |  15 +
 build/run-build-packages.sh                        |   4 +-
 doc/_config.yml                                    |  83 +++--
 .../_container_runtime_constraints.liquid          |   1 -
 .../_container_scheduling_parameters.liquid        |   7 +
 doc/_includes/_crunch1only_begin.liquid            |   2 +
 doc/_includes/_crunch1only_end.liquid              |   1 +
 doc/_includes/_notebox_begin_warning.liquid        |   2 +
 doc/_includes/_pipeline_deprecation_notice.liquid  |   2 +-
 doc/_layouts/default.html.liquid                   |   2 +-
 doc/api/authentication.html.textile.liquid         |  40 ---
 doc/api/crunch-scripts.html.textile.liquid         |   5 +-
 doc/api/execution.html.textile.liquid              |  27 ++
 doc/api/index.html.textile.liquid                  |  44 +--
 doc/api/methods.html.textile.liquid                | 120 +++----
 .../api_client_authorizations.html.textile.liquid  |  54 +++-
 doc/api/methods/api_clients.html.textile.liquid    |  40 ++-
 .../methods/authorized_keys.html.textile.liquid    |  43 ++-
 doc/api/methods/collections.html.textile.liquid    |  55 +++-
 .../methods/container_requests.html.textile.liquid | 105 +++++--
 doc/api/methods/containers.html.textile.liquid     |  81 ++++-
 doc/api/methods/groups.html.textile.liquid         |  47 +--
 doc/api/methods/humans.html.textile.liquid         |  39 ++-
 doc/api/methods/job_tasks.html.textile.liquid      |  55 +++-
 doc/api/methods/jobs.html.textile.liquid           | 101 ++++--
 doc/api/methods/keep_disks.html.textile.liquid     |  52 ++-
 doc/api/methods/keep_services.html.textile.liquid  |  52 +--
 doc/api/methods/links.html.textile.liquid          |  69 ++--
 doc/api/methods/logs.html.textile.liquid           |  49 ++-
 doc/api/methods/nodes.html.textile.liquid          |  50 ++-
 .../methods/pipeline_instances.html.textile.liquid |  44 ++-
 .../methods/pipeline_templates.html.textile.liquid | 182 ++++++++++-
 doc/api/methods/repositories.html.textile.liquid   |  45 ++-
 doc/api/methods/specimens.html.textile.liquid      |  41 ++-
 doc/api/methods/traits.html.textile.liquid         |  40 ++-
 doc/api/methods/users.html.textile.liquid          |  67 ++--
 .../methods/virtual_machines.html.textile.liquid   |  52 +--
 doc/api/methods/workflows.html.textile.liquid      |  44 ++-
 doc/api/permission-model.html.textile.liquid       | 143 +++------
 doc/api/requests.html.textile.liquid               | 349 +++++++++++++++++++++
 doc/api/resources.html.textile.liquid              |  46 ++-
 doc/api/schema/ApiClient.html.textile.liquid       |  24 --
 .../ApiClientAuthorization.html.textile.liquid     |  29 --
 doc/api/schema/AuthorizedKey.html.textile.liquid   |  24 --
 doc/api/schema/Collection.html.textile.liquid      |  39 ---
 doc/api/schema/Container.html.textile.liquid       |  59 ----
 .../schema/ContainerRequest.html.textile.liquid    |  70 -----
 doc/api/schema/Group.html.textile.liquid           |  25 --
 doc/api/schema/Human.html.textile.liquid           |  19 --
 doc/api/schema/Job.html.textile.liquid             |  69 ----
 doc/api/schema/JobTask.html.textile.liquid         |  47 ---
 doc/api/schema/KeepDisk.html.textile.liquid        |  31 --
 doc/api/schema/KeepService.html.textile.liquid     |  24 --
 doc/api/schema/Link.html.textile.liquid            |  83 -----
 doc/api/schema/Log.html.textile.liquid             |  33 --
 doc/api/schema/Node.html.textile.liquid            |  28 --
 .../schema/PipelineInstance.html.textile.liquid    |  26 --
 .../schema/PipelineTemplate.html.textile.liquid    | 161 ----------
 doc/api/schema/Repository.html.textile.liquid      |  25 --
 doc/api/schema/Specimen.html.textile.liquid        |  22 --
 doc/api/schema/Trait.html.textile.liquid           |  22 --
 doc/api/schema/User.html.textile.liquid            |  30 --
 doc/api/schema/VirtualMachine.html.textile.liquid  |  21 --
 doc/api/schema/Workflow.html.textile.liquid        |  23 --
 doc/api/storage.html.textile.liquid                | 170 ++++++++++
 doc/api/tokens.html.textile.liquid                 |  63 ++++
 doc/images/Arvados_Permissions.svg                 |   4 +
 doc/images/Crunch_dispatch.svg                     |   4 +
 doc/images/Keep_manifests.svg                      |   4 +
 doc/images/Keep_reading_writing_block.svg          |   4 +
 doc/images/Keep_rendezvous_hashing.svg             |   4 +
 doc/images/Session_Establishment.svg               |   4 +
 .../install-prerequisites.html.textile.liquid      |   4 +-
 doc/install/install-keep-web.html.textile.liquid   |   2 +-
 doc/install/install-keepproxy.html.textile.liquid  |   2 +-
 doc/sdk/cli/install.html.textile.liquid            |   1 -
 doc/sdk/go/example.html.textile.liquid             |  76 +++++
 doc/sdk/go/index.html.textile.liquid               |  15 +-
 doc/sdk/index.html.textile.liquid                  |  13 +-
 doc/sdk/java/example.html.textile.liquid           |  78 +++++
 doc/sdk/java/index.html.textile.liquid             |  11 +-
 doc/sdk/perl/example.html.textile.liquid           |  81 +++++
 doc/sdk/perl/index.html.textile.liquid             |  59 +---
 doc/sdk/python/events.html.textile.liquid          |   2 +-
 doc/sdk/python/example.html.textile.liquid         |  51 +++
 doc/sdk/python/sdk-python.html.textile.liquid      |   3 +-
 doc/sdk/ruby/example.html.textile.liquid           |  75 +++++
 doc/sdk/ruby/index.html.textile.liquid             |  74 +----
 doc/user/cwl/cwl-runner.html.textile.liquid        |   9 +-
 .../reference/job-pipeline-ref.html.textile.liquid |   2 +-
 doc/user/topics/arv-run.html.textile.liquid        |   4 +
 ...nning-pipeline-command-line.html.textile.liquid |   4 +
 .../running-external-program.html.textile.liquid   |   4 +-
 ...tutorial-pipeline-workbench.html.textile.liquid |   4 +
 .../tutorial-submit-job.html.textile.liquid        |   4 +-
 sdk/cli/bin/arv-run-pipeline-instance              |   2 +
 sdk/cli/bin/crunch-job                             |   6 +-
 sdk/cwl/arvados_cwl/__init__.py                    | 140 ++++++---
 sdk/cwl/arvados_cwl/arvcontainer.py                |  18 +-
 sdk/cwl/arvados_cwl/arvdocker.py                   |   5 +-
 sdk/cwl/arvados_cwl/arvjob.py                      |  48 ++-
 sdk/cwl/arvados_cwl/arvworkflow.py                 |  14 +-
 sdk/cwl/arvados_cwl/crunch_script.py               |   7 +-
 sdk/cwl/arvados_cwl/pathmapper.py                  |  38 +--
 sdk/cwl/arvados_cwl/runner.py                      |  27 +-
 sdk/cwl/setup.py                                   |   2 +-
 sdk/cwl/tests/test_container.py                    |  23 +-
 sdk/cwl/tests/test_make_output.py                  |  18 +-
 sdk/cwl/tests/test_submit.py                       | 170 ++++++++--
 sdk/go/arvados/container.go                        |  38 ++-
 sdk/go/httpserver/id_generator.go                  |  31 ++
 sdk/go/httpserver/request_limiter.go               |  26 +-
 sdk/python/arvados/arvfile.py                      |   2 +-
 sdk/python/tests/test_events.py                    |  57 ++--
 .../arvados/v1/collections_controller.rb           |   2 +-
 .../arvados/v1/container_requests_controller.rb    |   1 +
 .../arvados/v1/containers_controller.rb            |   1 +
 services/api/app/models/container.rb               |  11 +-
 services/api/app/models/container_request.rb       |  37 ++-
 ...43147_add_scheduling_parameters_to_container.rb |   6 +
 ...add_output_and_log_uuid_to_container_request.rb |  22 ++
 ..._log_uuids_to_container_request_search_index.rb |  21 ++
 services/api/db/structure.sql                      |  18 +-
 .../arvados/v1/collections_controller_test.rb      |  43 +++
 .../v1/container_requests_controller_test.rb       |  22 ++
 services/api/test/unit/container_request_test.rb   |  44 ++-
 services/arv-git-httpd/main.go                     |   2 +-
 .../crunch-dispatch-slurm/crunch-dispatch-slurm.go |   6 +-
 .../crunch-dispatch-slurm_test.go                  |   2 +-
 services/keep-web/main.go                          |   2 +-
 services/keepproxy/keepproxy.go                    |   2 +-
 services/keepstore/azure_blob_volume.go            |   2 +-
 services/keepstore/azure_blob_volume_test.go       |   2 +-
 services/keepstore/bufferpool.go                   |   3 +-
 services/keepstore/config.go                       |  22 +-
 services/keepstore/config_test.go                  |   2 +-
 services/keepstore/count.go                        |  44 +++
 services/keepstore/handler_test.go                 |   2 +-
 services/keepstore/handlers.go                     |  91 ++++--
 services/keepstore/keepstore.go                    |  15 +-
 services/keepstore/logging_router.go               |  60 +++-
 services/keepstore/pull_worker.go                  |   3 +-
 services/keepstore/s3_volume.go                    | 127 +++++++-
 services/keepstore/s3_volume_test.go               | 128 +++++++-
 services/keepstore/trash_worker.go                 |   2 +-
 services/keepstore/usage.go                        |   4 +
 services/keepstore/volume.go                       |  45 ++-
 services/keepstore/volume_unix.go                  |  10 +-
 tools/arvbox/lib/arvbox/docker/Dockerfile.base     |  50 ++-
 tools/arvbox/lib/arvbox/docker/common.sh           |  10 +-
 .../lib/arvbox/docker/service/ready/run-service    |   4 +-
 168 files changed, 3637 insertions(+), 2181 deletions(-)
 create mode 100644 apps/workbench/app/views/projects/_show_processes.html.erb
 create mode 100644 apps/workbench/app/views/projects/_show_workflows.html.erb
 create mode 100644 apps/workbench/test/controllers/disabled_api_test.rb
 create mode 100644 apps/workbench/test/unit/disabled_api_test.rb
 create mode 100644 doc/_includes/_container_scheduling_parameters.liquid
 create mode 100644 doc/_includes/_crunch1only_begin.liquid
 create mode 100644 doc/_includes/_crunch1only_end.liquid
 create mode 100644 doc/_includes/_notebox_begin_warning.liquid
 delete mode 100644 doc/api/authentication.html.textile.liquid
 create mode 100644 doc/api/execution.html.textile.liquid
 create mode 100644 doc/api/requests.html.textile.liquid
 delete mode 100644 doc/api/schema/ApiClient.html.textile.liquid
 delete mode 100644 doc/api/schema/ApiClientAuthorization.html.textile.liquid
 delete mode 100644 doc/api/schema/AuthorizedKey.html.textile.liquid
 delete mode 100644 doc/api/schema/Collection.html.textile.liquid
 delete mode 100644 doc/api/schema/Container.html.textile.liquid
 delete mode 100644 doc/api/schema/ContainerRequest.html.textile.liquid
 delete mode 100644 doc/api/schema/Group.html.textile.liquid
 delete mode 100644 doc/api/schema/Human.html.textile.liquid
 delete mode 100644 doc/api/schema/Job.html.textile.liquid
 delete mode 100644 doc/api/schema/JobTask.html.textile.liquid
 delete mode 100644 doc/api/schema/KeepDisk.html.textile.liquid
 delete mode 100644 doc/api/schema/KeepService.html.textile.liquid
 delete mode 100644 doc/api/schema/Link.html.textile.liquid
 delete mode 100644 doc/api/schema/Log.html.textile.liquid
 delete mode 100644 doc/api/schema/Node.html.textile.liquid
 delete mode 100644 doc/api/schema/PipelineInstance.html.textile.liquid
 delete mode 100644 doc/api/schema/PipelineTemplate.html.textile.liquid
 delete mode 100644 doc/api/schema/Repository.html.textile.liquid
 delete mode 100644 doc/api/schema/Specimen.html.textile.liquid
 delete mode 100644 doc/api/schema/Trait.html.textile.liquid
 delete mode 100644 doc/api/schema/User.html.textile.liquid
 delete mode 100644 doc/api/schema/VirtualMachine.html.textile.liquid
 delete mode 100644 doc/api/schema/Workflow.html.textile.liquid
 create mode 100644 doc/api/storage.html.textile.liquid
 create mode 100644 doc/api/tokens.html.textile.liquid
 create mode 100644 doc/images/Arvados_Permissions.svg
 create mode 100644 doc/images/Crunch_dispatch.svg
 create mode 100644 doc/images/Keep_manifests.svg
 create mode 100644 doc/images/Keep_reading_writing_block.svg
 create mode 100644 doc/images/Keep_rendezvous_hashing.svg
 create mode 100644 doc/images/Session_Establishment.svg
 create mode 100644 doc/sdk/go/example.html.textile.liquid
 create mode 100644 doc/sdk/java/example.html.textile.liquid
 create mode 100644 doc/sdk/perl/example.html.textile.liquid
 create mode 100644 doc/sdk/python/example.html.textile.liquid
 create mode 100644 doc/sdk/ruby/example.html.textile.liquid
 create mode 100644 sdk/go/httpserver/id_generator.go
 create mode 100644 services/api/db/migrate/20161111143147_add_scheduling_parameters_to_container.rb
 create mode 100644 services/api/db/migrate/20161115171221_add_output_and_log_uuid_to_container_request.rb
 create mode 100644 services/api/db/migrate/20161115174218_add_output_and_log_uuids_to_container_request_search_index.rb
 create mode 100644 services/api/test/functional/arvados/v1/container_requests_controller_test.rb
 create mode 100644 services/keepstore/count.go

       via  a8eec5a3443447ad7a31bd286ae7beabb8ca9e9d (commit)
       via  92fbda579013213b6f0d101f4fee71d149f3cb02 (commit)
       via  13341931986ffc0cef740f0422fe482e14437b48 (commit)
       via  4f678d4c1a5aa2aec73e0145e81c2629dee6689f (commit)
       via  239115f5ff0bc2c82fe7d7be78cab1752cfba372 (commit)
       via  d13a369065b4e72047c8c267d6ceaa5c84d50c3d (commit)
       via  064d34b61f3c3102ec7bc66d7d40867acfc6464c (commit)
       via  a983bbeec3db12156cc96741034ffe8d4053866b (commit)
       via  adda93976055fde37e92fa3fde7c08f529687132 (commit)
       via  65ab86d8af08548d0f264dfc7f462fba0880ea7e (commit)
       via  0e1522f8e0cbe5d1626a7f66dc4c28b7b1bf0efc (commit)
       via  2f6b00cc2a8765e9f8e07f98239f8f1f06887e2e (commit)
       via  6f461f4d0a996da85140982846a5d5c10ccfaae4 (commit)
       via  9c3cc0f61751720cfdea62717934746d1aa32b72 (commit)
       via  4ed4b6554535849341673efb7f80392dd5fba946 (commit)
       via  7588bb6abd3886af9e1f3078db573a691a974771 (commit)
       via  55e693dc29608f9b9975bb40c2fe4cf9c51df3f1 (commit)
       via  726becee14c0f4aaa1b0f72fe33a16ee1de7ccd4 (commit)
       via  e41abf0cefe61a69a5dac27647066116eba5af96 (commit)
       via  5debe2b77df18d381d7d59976e76f4ea6c9d5ce0 (commit)
       via  f3c31e7c71f076f5feafbb3f14e210f4d0de9012 (commit)
       via  372a67d4364d4776aaa8a5ae9a4dd0ac16a0c524 (commit)
       via  6e38822705235d01fbb7d51626b073174a65e46e (commit)
       via  08d5c8073523b4c5d72413d8e2095f3b68b58190 (commit)
       via  7692a12d05d54f0e209dcc2ff9ae9152560c7d52 (commit)
       via  3afec6824121eea6aed8c2d25567a5e8974d3100 (commit)
       via  185bc33b57a164463a7b67fca84b7596f6f79ad3 (commit)
       via  e5fd39ad76ac8bcb5e7bfe0c6938fdeb7c8ab4e3 (commit)
       via  29356d0c02566aa33b3dbb9513dc701bad8fd16b (commit)
       via  b1e2f45d0a926617c991410feda842a5056ff5f0 (commit)
       via  bf08ad601e8c69e812dcfd5fd88cd711d35647ae (commit)
       via  8c716ec575b5f7679a2ab95ebea944a46ff756c1 (commit)
       via  d542de20d8617f5823ab8f675c114f78aaf4a924 (commit)
       via  515a58c0ef8634fca2397a8609f868524a42132c (commit)
       via  4568673894b4a752503ad403bd391767ac1805e5 (commit)
       via  b45d7c92a23390c8be246219a1c84b8736854581 (commit)
       via  78889e115e6fffd5eb82e54a541bd4858f804f91 (commit)
       via  c1ebef70f3b66080b51ef700383f44d70736f495 (commit)
       via  5977b70a38e7102a6a369074897af990944c8934 (commit)
       via  1071e1163f894c2a73df76cd400d102748e5281d (commit)
       via  322d784513c37abc8fa1d1c05dd5f41019868735 (commit)
       via  6f2ac70b70d4b64b728b815d5be429d5a165e2f0 (commit)
       via  c654baedb04251a741c840860041768ec661d3e7 (commit)
       via  329b27f1407d900f8de7872077e6c91ebb32107c (commit)
       via  a07c8bfac95524f3074d11cda0d6689b5e7bf9cc (commit)
       via  ce924ad9cdbab7ede0df7409d43b2660c1329979 (commit)
       via  2d8150ed20d97491930d99a52d923872bca73939 (commit)
       via  47f987da576d7dac80e5a03ad6613b5eb1f58660 (commit)
       via  ad825d1c73655d3f62fd485a1bc32fc3e76531f6 (commit)
       via  a4e81f561cce966074a72ff6219826a89152451a (commit)
       via  4bccbaed84c6b398f4cb4dbc7a9bc345e79d6550 (commit)
       via  b6bc9bbe45a68a07b1ea8139e1f4d698873739a7 (commit)
       via  20d3523229805ee800ec11bf4ab6e41c4e18eea6 (commit)
       via  ddce4f6de6f0a77b45e9f3358eb6f0c1f1870fba (commit)
       via  e7a865275a832420b9d63c0ab3ebf87eaca57d26 (commit)
       via  d8db04f0165e57ab8021f2c1e4ff7061e494ceba (commit)
       via  d2f9e7809bd1f63638600c7fc8189182c0f327c0 (commit)
       via  2251688e66191ff1169080f50868bf57e463659c (commit)
       via  c14246b9a21d038fc6fa850f4032659a98397784 (commit)
       via  5d2ef6f7a2a8f93ec411c420287f30af92294520 (commit)
       via  780d334ec4b2d47379d0330ace77b3821c880842 (commit)
       via  a078c965c1ed1e54f678ad93305b91b6c7dcb1a9 (commit)
       via  53a9aa7651a9fed6d88f4ece0f8d4cd10a77a63f (commit)
       via  5a553b7b1fc75a84f8784eeb812361616911accd (commit)
       via  eae48c31bb338689ec67fbc6a14a2e0b1fb5e3b6 (commit)
       via  1d656f4f1ec1f890a7677e748bea43a08cfa0b6c (commit)
       via  3af6db5dc4e2f08b2ebb49a82109c4325ad7fcc4 (commit)
       via  6361d996c7a2c7d7648abfcf1699aa989e552f22 (commit)
       via  15488bac7de5fa73c2695589c6436a6848615e84 (commit)
       via  38fae0458644b89322ddeac125971800b9e452e5 (commit)
       via  02010431f52911a6ff908e673c534291beb929ac (commit)
       via  82fa37ac01169178f6a9b1c142926de7b50e8841 (commit)
       via  b21e623902cb32b6d5a2fcf2c6ac9d92d472cb58 (commit)
       via  1129e9428dc1f3a300c4148bf12821eecf511ab3 (commit)
       via  90c48f84391d6b4d6b8ed366d5a42d24bf6c696f (commit)
       via  0b5d04beb288175a285c36a38f255399dfe7d0d7 (commit)
       via  b86543493dffefb1ec245f48550cfa9e0119f4d1 (commit)
       via  8c7a6b5bb3cf27dff61a3b2d83fd4374c7262206 (commit)
       via  9640930c3934344ab64c92a5c86c1f7488a4de42 (commit)
       via  5cd2757a79e7be7ed00156a69191893c3bb7e1c6 (commit)
       via  f6a8bf41c9f038ece715ec2744c36160f9c6c591 (commit)
       via  4225d058e0bc4380203fe5959e7e54febc91e83b (commit)
       via  42f433ac4486c18fa6408d5f942dc394e5ff149e (commit)
       via  ddeef8adc0cb7cdb55be644b9335ea51919ed513 (commit)
       via  9cc813f25cb1d0c912c90ad8ed58166cbaaeff1c (commit)
       via  c198274863bb5d72ef34dfc311c62bf50d6bd4f4 (commit)
       via  1e6d7656fbfd1f954571157fc7e7e4f75ea5911e (commit)
       via  aa49b45a4d25cb1e4282e242a2502c8a591f8615 (commit)
       via  79786a56410ef381499fb0bfdc5a18407ab33082 (commit)
       via  d0bc46ce842e7fdb71c25cc32caef0afd209c9ec (commit)
       via  29dee6a4abe943797a4baa939085177626997408 (commit)
       via  a2ea118787c7ce9d7b5df32a3f14a3b3b42de572 (commit)
       via  c6c3d3c8748b59ca0e8a9d5cfec0a54bdfd212f0 (commit)
       via  364fed6e1d4036719e4c461cfe0bc24e7f52f144 (commit)
       via  0c54a5c8b5d934cb3015234a41c3937b3d0fc3b9 (commit)
       via  fd26f5508b755061046727fb652aa4141029e8b9 (commit)
       via  287a03d273629ef15f77721ad2c7ce572fb5c078 (commit)
       via  b1b7794d253c653a370200c2b33d477d3f7f231e (commit)
       via  5fc627d22b47723289251e1e1d9dc45c0e1bd49e (commit)
       via  5c274cd1249ce0f5e0048f8e0974e36deee8c9cc (commit)
       via  97eb0ce9a8a83af1acff17d3dfb66c6ca7522678 (commit)
       via  b03f167f42f9803814e2d22c4de68a30a3bc9dae (commit)
       via  26e1c10f963a586e40ea9dcb46a87b0107c97b7c (commit)
       via  7e52fd153f2d16f94061ef1eabfe653d4a83852a (commit)
       via  b8610f34c21f1cf44b938802f37971b06af4361c (commit)
       via  0f2ab548f96e8604a929e0636517f634b7dfb0ad (commit)
       via  e59d21d3f47cbee83a6dc389584bd7b17bec270c (commit)
       via  051efbd3d843baa690b334e57fd09fad6a908bb9 (commit)
       via  3c2fee34ad8f668f5cf9001d6b7d605965ec28bb (commit)
       via  c10e9e5f3398d40a3346c7d7c1f84bf50262b8ec (commit)
       via  e0903a2cff2df4e6169e95f7439c0fa361c60ea8 (commit)
       via  94e52d9256cb17dddbc9c383d2ab90e713c25e3b (commit)
       via  42b9e37cd53d63980d3fa4a238f9ff6adad9ccc4 (commit)
       via  becada3b24006cf39417335794cb46556d7aa605 (commit)
      from  6fb784416db6651b33b921a0684c2f8de84410fc (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit a8eec5a3443447ad7a31bd286ae7beabb8ca9e9d
Author: Tom Clegg <tom at curoverse.com>
Date:   Mon Nov 28 14:45:30 2016 -0500

    10467: Add "client disconnect" test.

diff --git a/services/keepstore/s3_volume_test.go b/services/keepstore/s3_volume_test.go
index 6389d50..702e553 100644
--- a/services/keepstore/s3_volume_test.go
+++ b/services/keepstore/s3_volume_test.go
@@ -7,6 +7,8 @@ import (
 	"encoding/json"
 	"fmt"
 	"io/ioutil"
+	"net/http"
+	"net/http/httptest"
 	"os"
 	"time"
 
@@ -112,6 +114,73 @@ func (s *StubbedS3Suite) TestStats(c *check.C) {
 	c.Check(stats(), check.Matches, `.*"InBytes":6,.*`)
 }
 
+type blockingHandler struct {
+	requested chan *http.Request
+	unblock   chan struct{}
+}
+
+func (h *blockingHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
+	if h.requested != nil {
+		h.requested <- r
+	}
+	if h.unblock != nil {
+		<-h.unblock
+	}
+	http.Error(w, "nothing here", http.StatusNotFound)
+}
+
+func (s *StubbedS3Suite) TestClientDisconnect(c *check.C) {
+	loc := "acbd18db4cc2f85cedef654fccc4a4d8"
+	buf := make([]byte, 3)
+
+	handler := &blockingHandler{}
+	srv := httptest.NewServer(handler)
+	defer srv.Close()
+
+	v := s.newTestableVolume(c, 5*time.Minute, false, 2)
+	vol := *v.S3Volume
+	vol.Endpoint = srv.URL
+	v = &TestableS3Volume{S3Volume: &vol}
+	v.Start()
+
+	ctx, cancel := context.WithCancel(context.Background())
+
+	handler.requested = make(chan *http.Request)
+	handler.unblock = make(chan struct{})
+	defer close(handler.unblock)
+
+	var n int
+	var err error
+	doneGet := make(chan struct{})
+	go func() {
+		n, err = v.Get(ctx, loc, buf)
+		close(doneGet)
+	}()
+
+	timeout := time.After(10 * time.Second)
+
+	// Wait for the stub server to receive a request, meaning
+	// Get() is waiting for an s3 operation.
+	select {
+	case <-timeout:
+		c.Fatal("timed out waiting for Get to call our handler")
+	case <-doneGet:
+		c.Fatal("Get finished without calling our handler!")
+	case <-handler.requested:
+	}
+
+	cancel()
+
+	select {
+	case <-timeout:
+		c.Fatal("timed out")
+	case <-doneGet:
+		c.Check(n, check.Equals, 0)
+		c.Check(err, check.NotNil)
+		c.Check(err, check.Equals, context.Canceled)
+	}
+}
+
 func (s *StubbedS3Suite) TestBackendStates(c *check.C) {
 	defer func(tl, bs arvados.Duration) {
 		theConfig.TrashLifetime = tl
@@ -320,18 +389,9 @@ func (s *StubbedS3Suite) newTestableVolume(c *check.C, raceWindow time.Duration,
 	srv, err := s3test.NewServer(&s3test.Config{Clock: clock})
 	c.Assert(err, check.IsNil)
 
-	tmp, err := ioutil.TempFile("", "keepstore")
-	c.Assert(err, check.IsNil)
-	defer os.Remove(tmp.Name())
-	_, err = tmp.Write([]byte("xxx\n"))
-	c.Assert(err, check.IsNil)
-	c.Assert(tmp.Close(), check.IsNil)
-
 	v := &TestableS3Volume{
 		S3Volume: &S3Volume{
 			Bucket:             TestBucketName,
-			AccessKeyFile:      tmp.Name(),
-			SecretKeyFile:      tmp.Name(),
 			Endpoint:           srv.URL(),
 			Region:             "test-region-1",
 			LocationConstraint: true,
@@ -341,15 +401,31 @@ func (s *StubbedS3Suite) newTestableVolume(c *check.C, raceWindow time.Duration,
 			ReadOnly:           readonly,
 			IndexPageSize:      1000,
 		},
+		c:           c,
 		server:      srv,
 		serverClock: clock,
 	}
-	c.Assert(v.Start(), check.IsNil)
+	v.Start()
 	err = v.bucket.PutBucket(s3.ACL("private"))
 	c.Assert(err, check.IsNil)
 	return v
 }
 
+func (v *TestableS3Volume) Start() error {
+	tmp, err := ioutil.TempFile("", "keepstore")
+	v.c.Assert(err, check.IsNil)
+	defer os.Remove(tmp.Name())
+	_, err = tmp.Write([]byte("xxx\n"))
+	v.c.Assert(err, check.IsNil)
+	v.c.Assert(tmp.Close(), check.IsNil)
+
+	v.S3Volume.AccessKeyFile = tmp.Name()
+	v.S3Volume.SecretKeyFile = tmp.Name()
+
+	v.c.Assert(v.S3Volume.Start(), check.IsNil)
+	return nil
+}
+
 // PutRaw skips the ContentMD5 test
 func (v *TestableS3Volume) PutRaw(loc string, block []byte) {
 	err := v.bucket.Put(loc, block, "application/octet-stream", s3ACL, s3.Options{})

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list