[ARVADOS] updated: b9d2799dfebae724dda3b3e28641116ca5daf5c7

Git user git at public.curoverse.com
Mon Oct 17 04:36:37 EDT 2016


Summary of changes:
 .../app/controllers/application_controller.rb      |  39 ++++--
 apps/workbench/app/helpers/application_helper.rb   |   6 +-
 apps/workbench/app/models/proxy_work_unit.rb       |  25 ----
 apps/workbench/app/models/work_unit.rb             |   8 --
 .../app/views/projects/_show_dashboard.html.erb    |  43 +++++--
 .../views/work_units/_component_detail.html.erb    |  11 +-
 .../app/views/work_units/_show_child.html.erb      |   2 +-
 .../app/views/work_units/_show_component.html.erb  |  32 ++++-
 .../app/views/work_units/_show_log_link.html.erb   |  14 ++
 apps/workbench/config/application.default.yml      |   6 +
 .../test/controllers/work_units_controller_test.rb |  23 ++++
 apps/workbench/test/diagnostics/pipeline_test.rb   |   2 +-
 apps/workbench/test/diagnostics_test_helper.rb     |   7 +-
 apps/workbench/test/helpers/share_object_helper.rb |   8 +-
 .../test/integration/application_layout_test.rb    |   5 +-
 .../test/integration/pipeline_instances_test.rb    |   8 +-
 apps/workbench/test/integration/users_test.rb      |   3 +-
 apps/workbench/test/integration/work_units_test.rb |   6 +-
 apps/workbench/test/integration_helper.rb          |  18 ++-
 apps/workbench/test/unit/work_unit_test.rb         |  28 +---
 build/run-build-packages.sh                        |   8 +-
 crunch_scripts/cwl-runner                          |  40 ++----
 .../_container_runtime_constraints.liquid          |   1 +
 .../install-dispatch.html.textile.liquid           |  33 ++++-
 .../install-arv-git-httpd.html.textile.liquid      |  52 +++-----
 sdk/cli/test/test_arv-keep-get.rb                  |   4 +-
 sdk/cwl/arvados_cwl/__init__.py                    | 118 +++++++++++++++--
 sdk/cwl/arvados_cwl/arv-cwl-schema.yml             |  38 ++++++
 sdk/cwl/arvados_cwl/arvcontainer.py                |  16 ++-
 sdk/cwl/arvados_cwl/arvjob.py                      | 133 ++++++++++++-------
 sdk/cwl/arvados_cwl/arvworkflow.py                 |  75 +++++------
 sdk/cwl/arvados_cwl/fsaccess.py                    |   6 +-
 sdk/cwl/arvados_cwl/pathmapper.py                  |  40 ++++--
 sdk/cwl/arvados_cwl/perf.py                        |   2 +-
 sdk/cwl/arvados_cwl/runner.py                      |  61 +++++----
 sdk/cwl/setup.py                                   |   2 +-
 sdk/cwl/tests/hw.py                                |   1 +
 sdk/cwl/tests/test_container.py                    |  10 +-
 sdk/cwl/tests/test_job.py                          | 125 +++++++++---------
 sdk/cwl/tests/test_make_output.py                  |  58 +++++++++
 sdk/cwl/tests/test_pathmapper.py                   |  91 +++++++++++++
 sdk/cwl/tests/test_submit.py                       |  90 +++++++++----
 sdk/go/arvados/container.go                        |   7 +-
 sdk/go/crunchrunner/crunchrunner.go                |  69 ++++++++--
 sdk/go/crunchrunner/crunchrunner_test.go           |  28 ++++
 sdk/python/arvados/arvfile.py                      |  84 +++++++++++-
 sdk/python/tests/test_collections.py               |  21 ++-
 services/api/app/models/container.rb               |  35 ++++-
 services/api/app/models/container_request.rb       |  26 +++-
 services/api/config/application.default.yml        |   7 +
 .../migrate/20160926194129_add_container_count.rb  |   9 ++
 services/api/db/structure.sql                      |   7 +-
 services/api/test/fixtures/container_requests.yml  |  20 +++
 services/api/test/unit/container_request_test.rb   |  71 ++++++++++-
 ...git-httpd.service => arvados-git-httpd.service} |   2 +-
 services/arv-git-httpd/doc.go                      |  35 -----
 services/arv-git-httpd/git_handler.go              |  31 +++--
 services/arv-git-httpd/git_handler_test.go         |  10 +-
 services/arv-git-httpd/gitolite_test.go            |  10 +-
 services/arv-git-httpd/integration_test.go         |   2 +
 services/arv-git-httpd/main.go                     |  21 ++-
 services/arv-git-httpd/usage.go                    |  39 ++++--
 .../crunch-dispatch-slurm/crunch-dispatch-slurm.go |   5 +-
 .../crunch-dispatch-slurm_test.go                  |  16 ++-
 services/crunch-dispatch-slurm/squeue.go           |   2 +-
 services/crunch-dispatch-slurm/usage.go            |   1 +
 services/fuse/arvados_fuse/command.py              |   6 +-
 services/fuse/tests/test_command_args.py           |  14 ++
 services/fuse/tests/test_mount.py                  |   1 +
 services/keepstore/azure_blob_volume.go            |   2 +-
 services/keepstore/deprecated.go                   |  43 +++++++
 services/keepstore/keepstore.go                    |  28 +---
 services/keepstore/s3_volume.go                    |   4 +-
 services/keepstore/usage.go                        |  18 ++-
 services/keepstore/volume_unix.go                  |  10 +-
 services/login-sync/bin/arvados-login-sync         |   2 +-
 .../docker/service/arv-git-httpd/run-service       |   9 +-
 .../crunchstat_summary/summarizer.py               | 141 +++++++++++----------
 78 files changed, 1502 insertions(+), 632 deletions(-)
 create mode 100644 apps/workbench/app/views/work_units/_show_log_link.html.erb
 create mode 100644 sdk/cwl/tests/hw.py
 create mode 100644 sdk/cwl/tests/test_make_output.py
 create mode 100644 sdk/cwl/tests/test_pathmapper.py
 create mode 100644 services/api/db/migrate/20160926194129_add_container_count.rb
 rename services/arv-git-httpd/{arv-git-httpd.service => arvados-git-httpd.service} (75%)
 delete mode 100644 services/arv-git-httpd/doc.go
 create mode 100644 services/keepstore/deprecated.go

       via  b9d2799dfebae724dda3b3e28641116ca5daf5c7 (commit)
       via  82cc494a64aaac576dfefe0487faafdda82482bc (commit)
       via  f935965259f9c0476a9c5ffa79e5c27ce9da4800 (commit)
       via  e5b9158fc357495fba2d110bf6eafa72b1ebe145 (commit)
       via  d3b56f18947c3ccb42fee52ff33b3b00db0dffd9 (commit)
       via  8b03f0b0e66190b35c55ce1f0917dd2104b8a0b9 (commit)
       via  6a7beeebde1fed4ab925704238d1fb980e9fe238 (commit)
       via  f0769a2c41c1ae03d2180e9d25e1738b88650064 (commit)
       via  1825696494802d264c74ed2af58cc39b6ff8c7f8 (commit)
       via  70f1b69fe1f0567483afc182e47fe717756b8bd1 (commit)
       via  4ae3e06d829da2018e952eab6f544f3bed754d67 (commit)
       via  ef6f7202858cba65e06cc1a32d52ee2305687bc8 (commit)
       via  82cd0096558b94f8ff1e23d6e3f8b8dfec7df7b9 (commit)
       via  f78ee6387642d4dd0faf9071e44319a2ee42ce2f (commit)
       via  20a717071130eee4afb4704617c51ff165d735d9 (commit)
       via  51eaad58e0a135bdf88d4bdcd819d219d75de0df (commit)
       via  ea0de4d588c6eac28458fb20d70e008081f9ecbb (commit)
       via  cd175e917038f68d80d29cc6fee24fc3b389069e (commit)
       via  0fe15cf43dfc6c10a4fc949ba462a7ac14e2d8e7 (commit)
       via  59acf0718d442c05c64ba012b4f48478a4087b7b (commit)
       via  8baaf20400a376977b277ac7675ebfd0c4afe917 (commit)
       via  c978ad2d773b1ffc1ec6608123e27b89e65c428e (commit)
       via  195b3f3cd0870195c546fec3e05522c0d1c89b72 (commit)
       via  c4e25267ff206ec4c5e4aaf3b44946333d731ce8 (commit)
       via  2656053035f46e6097b380f5c0da7d54b04a60c4 (commit)
       via  5df99ffc7c5ca08070fd7cb9c056056c86ed72cf (commit)
       via  d5b49bc4f8749aabd97037614fcdc364b5254bb7 (commit)
       via  06f40b3d477f3ab1c834d9671808c3da02ca7dfd (commit)
       via  8f794ab549d05adba6774ab91066b55f719c181a (commit)
       via  cb781d9b5e61c5494d29d53a0a12c678c839eecd (commit)
       via  cc9aed221c506cfc28f1b6ca37675dba6543d824 (commit)
       via  807125b8423058d336165f069bf5d618f77845b7 (commit)
       via  84f161dfc3229ad3a849fd5e152f254359a56252 (commit)
       via  022095999a584b12789259b577965122bb676194 (commit)
       via  e86904aa647a984a04aea2c4ce20c61cae8ee9f5 (commit)
       via  daf793d506c68a45f50cca14d08182ee2ceeb0d1 (commit)
       via  29389eac8cf5f7c9f210579b6d74ca9c84f39ad4 (commit)
       via  727fae1a8620a8b832dccc5552d864aecf720e24 (commit)
       via  eaefa56b27792e89eed272913fa30cdb4e6d0e70 (commit)
       via  255ad79d25c04736bd0bd17055e510af608aa0ed (commit)
       via  9bd0c008b8d798f6aabd63a082ee3d250b1ec680 (commit)
       via  b1b6efe84c40e5672a33f9a08cb7e1e4979460b5 (commit)
       via  9f7e6c2782c1929de61ecd61e457700730ef9681 (commit)
       via  c8d04b26dbeb3dd4401788053bf514b9f172a185 (commit)
       via  aafa79beddaf4a1e94a502eda1f668ebec39e3d3 (commit)
       via  716ee800f3bfcffe19d091c3f5f30d826e69c72a (commit)
       via  c54ead18b1a012f73ac7ea06d93b397ed2f396c6 (commit)
       via  41d7b9bb8a45b0d80fb2bf15af4c9e7b3d77a467 (commit)
       via  c613f893bf36e79801af7d5a712853c51ef56bf9 (commit)
       via  e69f517dbd5ad9bac104d42479d8ef2f515b398e (commit)
       via  654d8fe3decc93b8eb986313cdb9070f22abdca6 (commit)
       via  af67b8e1955ca5a10b43b1701c4b86b0a33edb0b (commit)
       via  31baddea7535d8ba6ca812086264b71efdccbc29 (commit)
       via  25b000e2eefa9d2cfd454bb9a27518a882bb21a1 (commit)
       via  0087f03f1b12d8ad383388d411a8c97ffe196739 (commit)
       via  c98596a46dc7c166acb2a26b742a09ae0493224a (commit)
       via  083dcfe0946067f32681b4ffc497a7e9a5fdff79 (commit)
       via  5af68e1098ebd0ab749387667c18585a18b71f04 (commit)
       via  e892c7ee96f28bef7d5b2a9314eb9549ee56634d (commit)
       via  f3d4ec1d93cadb51fb55355caa8c08f453bc4c21 (commit)
       via  9f35a3cf10e5d261d83556d5b33f242966101f02 (commit)
       via  87473fd874bfc6fe954089b74bef915543a48d60 (commit)
       via  fd36117b416e1190334d108058dc0c16ef24e964 (commit)
       via  24bcfa0b87b87e4510fffe8a961a5d4a9fd34948 (commit)
       via  31568ea331306a574be758fc60b090ecee3bc005 (commit)
       via  c9180edfa0d7306b9a533a0ed15dd90eca5cfae1 (commit)
       via  84f2296c5c6563f2d61a208d5c427d98003bfecd (commit)
       via  3513c7def7eacdeef16c355f1b9be93830dcf946 (commit)
       via  77e64115189779a3d91f968946dfa82fa504d4c1 (commit)
       via  18de85806e3717421accb89b093fc2bd56822100 (commit)
       via  62a5bae0cf096fee69add487cd28a8bdbd4fa17c (commit)
       via  25236212b8f726335ede5d4aa5da120b81ef19a4 (commit)
       via  f853c2c7f2283b57a4f215aeb288b2842e3d1843 (commit)
       via  f678c1f5a1b03a49eb0a40f614990b0fbcad3436 (commit)
       via  14a9cddd966bd1035c48e5fbac5065555ad7bb92 (commit)
       via  800a66e4d96c1fb341d643549d871d36e598ea31 (commit)
       via  a5ce43cd7493e17fe1bb5f67451957b283881228 (commit)
       via  d68cb1845e82f44ecf126ae4fd1ba3abc00f4463 (commit)
       via  e9bf0a8dec771a53818ee76026c8bcc93a4722da (commit)
       via  23b1c79162bd422f99e4d7a0e491d82da560d91f (commit)
       via  304273fabb09ff72e94481a610e84f78776f05e3 (commit)
       via  f4c5d28ce98099b2f4204b5875449d76609c6a1c (commit)
       via  2f86d9ac26cad9cd202ccfe9cf07c31ecbabcf7e (commit)
       via  4c8559157a16bf3d2781714fdec0275fb7f53ac6 (commit)
       via  38f17f1e09e1eb2af273148744ca193d2541d37e (commit)
       via  a4ef9968a1b59b99efac934076b8216f3b2f499a (commit)
       via  d70adee422f8f68debdf4425fea8afd53a488556 (commit)
       via  47e42f1129363c2565e69c36ff26ce9c42731fb8 (commit)
       via  78995d3bf5b9e160de50318bc83744dda92e4211 (commit)
       via  6757824d984496469cd929cdbb62643c1cede7fd (commit)
       via  e25a377ed38698cb3eebbd0f43b80a5276595240 (commit)
       via  a894a61cc9004e184bc63f9f0a785f555d6c6829 (commit)
       via  30d4c3f8f1d4d303c66fc568b11c34be7c51f2a8 (commit)
       via  a605fc29fd7f79b2882625c99a72e998157fa5bc (commit)
       via  bf6ef981cea7e923a085c0a9231cebb379c7560a (commit)
       via  e21c8f8c0ba6f2012bc4108f8fa27411ab4375d1 (commit)
       via  b8036cfd2acd1bf2910130deb46be8a38eaff253 (commit)
       via  8d0f1cbda7cb58b15923813d5fca0448cb7b330e (commit)
       via  f35e22ef4abc012cad2260149657b95bfbcbac5d (commit)
       via  8317b6e41e86f3e5c988906e0a9965479acf7e51 (commit)
       via  74ec5b86db46257f75ea1eb94c136ce18e65c906 (commit)
       via  e68177bfa8de36bd54f705e16e5c4854eafb29a2 (commit)
       via  a3562a62e6b23035543f08226479813d5d1c31ed (commit)
       via  d5cc11240819c79a14197a37489964e0adf173be (commit)
       via  a7ee134a2815fad9febc3cdcd7b2a1fc77aff953 (commit)
       via  480df25dc679998b53f9e7299244ac1ff3f90114 (commit)
       via  a3da8e980ccddf8312cec3e431517c212c964cd7 (commit)
       via  9486b15595a667742ef541d3f31f78507afea8e7 (commit)
       via  50d2969bdaf2fbbfbe00d35ec8339b166eee8001 (commit)
       via  929e817fc1c91e1d9a0afcfcab93fe07304d9be5 (commit)
       via  12e22cbf3bbf047c001624be54ec802999bb5c1e (commit)
       via  0d3dd79bff8665c36e2442a76a9f7bb700702101 (commit)
       via  84d86c1721bf549c2dc38df95f29f3579b36a5ae (commit)
       via  068b2c9dbe1e467119680cbab61c62a03ad4fafd (commit)
       via  6c0bf267d795a3ca49c3258c9490714c9e18d333 (commit)
       via  8e6d577f1381da0d42481ef8dd0479241e3c50bf (commit)
       via  bd7dc68d12f1d134106fd21afe9cbf2d0512c831 (commit)
       via  224f384d411bb1b4cccc7165c55bb64fd5c695ad (commit)
       via  c7a461e97640697e390aff96bf25126972396b19 (commit)
       via  ffe1fe1c77743147ee82aacdc50edde3672cd748 (commit)
       via  0e4e5d028290bc8d5a4ffe5469a6993f640027a6 (commit)
       via  d182d19257f6cbe71fd75c29e1a81ba59a2aa79c (commit)
       via  f300b641735aa2657cfdcc4303050095c3bd60d5 (commit)
       via  83139cd2df6b7d86f352bee46d1ad86146bd093b (commit)
       via  f72b0e8bcc350966ce54954711bed538c527eb00 (commit)
       via  0821f5481edd016a3744bb50d97a9e5b99cd1a0f (commit)
       via  ad4344e21db3c894869d09fdcb09e3202bf9cf78 (commit)
       via  fd3e91e6cd737554b4ae491a558e52f41bad3d07 (commit)
       via  a229ee1c2da50d247c5e7de12096f0f9d6ea3943 (commit)
       via  27b732adbd4d2331436a433394658a0cfcf5fd94 (commit)
       via  d66f01bcf5a50e10879219c1b5e498f04a6d70f4 (commit)
       via  c8bb5cc118575835aa38122c7035989eeebe759f (commit)
       via  95f399d4fca0c4e36c6da4e98e4092106ebfdc6d (commit)
       via  4da754586b4529a4480951218a69ec6f41fee98d (commit)
       via  84f3d7048e63fc88b39f329ac5472238df2edc3d (commit)
       via  5905f1299f3a55519d1c79991e405ae8d47711f9 (commit)
       via  eabe4efe7b0964f537f2e09fb0d820272f1c86e7 (commit)
       via  986cdafd30a7bef4ccfbd18f808be52b2f6a458e (commit)
       via  bc67ce8d098c36e999739a9213b29bb72af6f23d (commit)
       via  1ce0bd54f40a686959e95e63f7aaa8b233269932 (commit)
       via  54cd184005d14ba93e93ae0eeb16ea70ee09a3b6 (commit)
       via  9ea95168dc095e9547d0ae235e3986e428bf50c2 (commit)
       via  49987769d924c1bc77cbdc9e9b182c3e2cc09b2d (commit)
       via  3fb81a4db7abbaaa67b7a18d1c4a5ce82bc232dc (commit)
       via  a67a0dc7bf8946ea97157d32dc615f81d24e629b (commit)
       via  79af4043ed667b8f81613cb8e4bf88b0450ae8a6 (commit)
       via  6d162bfdf0c3cbfc2d723ecff4153f85daa2d003 (commit)
       via  fe0d8506f80a7ce5f1d412823a09a5d7324b7161 (commit)
       via  7b227c653e31449f6c23b4b8d933172bbfb2b172 (commit)
       via  2c640b0e791d9997ff87f4ec2b33af7781286af5 (commit)
       via  3a1f0b616382230c32439b8d7e17ff75a132a10d (commit)
       via  e69ce852e1cbbe5bab82e32ec5d1874ef5a768f3 (commit)
       via  62d56bce0d714cc2df2ab5e7f1005dc3d76f783b (commit)
       via  69902ee6583e1de32786e80b77c8f61870ed6f90 (commit)
       via  9a363fce5687e55c5554b3eaeee16e7f1f0791f6 (commit)
       via  2b52a4885952a8a3eed01b03af33210fc86d6ce5 (commit)
       via  05e30c2874cfee6e448de38254d4eb6007abb1cd (commit)
       via  bca6c8e4c3d880955d19f7b6ff50bc3fbc31146c (commit)
       via  1487c0577921c88801c377d753d1322fd1485968 (commit)
       via  1c3f80531764931c241cd07a3cbc56892b645bce (commit)
       via  e3a7370e35792c4cdfae441099d18d1b0d18e5b3 (commit)
       via  5f909f9dac2cad1eb0ed0c00a3be37c2edc79667 (commit)
       via  8e9ae6053dbe8923f294bb819d9382988c1f43fc (commit)
       via  67c0bb9abe2f9069761a271145ae48368ee3d7d6 (commit)
       via  44c2e41fec0beeab4544103d0a4afb9a775ed706 (commit)
       via  5139cff2d5425debd948131e0f60242845ea0b61 (commit)
       via  82a01df9d9f4f8961978a1383f4b6c09e73fe28d (commit)
       via  dcb4db28681b6949a56a1de579891cb375c423fe (commit)
       via  3847357436978a97470e0769f3200d354a2bd08e (commit)
       via  44ea4c89930d52d142da2c0b7204fd34f61f8f39 (commit)
       via  ef06ae1ddabb8ab6977090deb756baa2e4fb6eb5 (commit)
      from  1d3d5386e0586f91984fcfb9a117ffcc38b817b4 (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 b9d2799dfebae724dda3b3e28641116ca5daf5c7
Merge: 82cc494 8b03f0b
Author: Tom Clegg <tom at curoverse.com>
Date:   Mon Oct 17 04:32:37 2016 -0400

    Merge branch 'master' into 9956-keepstore-config
    
    Conflicts:
    	services/keepstore/keepstore.go


commit 82cc494a64aaac576dfefe0487faafdda82482bc
Author: Tom Clegg <tom at curoverse.com>
Date:   Mon Oct 17 04:27:55 2016 -0400

    9956: Show list of supported volume types.

diff --git a/services/keepstore/usage.go b/services/keepstore/usage.go
index c067ec0..29f89f5 100644
--- a/services/keepstore/usage.go
+++ b/services/keepstore/usage.go
@@ -4,19 +4,25 @@ import (
 	"flag"
 	"fmt"
 	"os"
+	"sort"
+	"strings"
 
 	"github.com/ghodss/yaml"
 )
 
 func usage() {
 	c := DefaultConfig()
+	knownTypes := []string{}
 	for _, vt := range VolumeTypes {
 		c.Volumes = append(c.Volumes, vt().Examples()...)
+		knownTypes = append(knownTypes, vt().Type())
 	}
 	exampleConfigFile, err := yaml.Marshal(c)
 	if err != nil {
 		panic(err)
 	}
+	sort.Strings(knownTypes)
+	knownTypeList := strings.Join(knownTypes, ", ")
 	fmt.Fprintf(os.Stderr, `
 
 keepstore provides a content-addressed data store backed by a local filesystem or networked storage.
@@ -110,5 +116,9 @@ Volumes:
     use all directories named "keep" that exist in the top level
     directory of a mount point at startup time.
 
-`, exampleConfigFile)
+    Volume types: %s
+
+    (See volume configuration examples above.)
+
+`, exampleConfigFile, knownTypeList)
 }

commit f935965259f9c0476a9c5ffa79e5c27ce9da4800
Author: Tom Clegg <tom at curoverse.com>
Date:   Mon Oct 17 04:12:14 2016 -0400

    9956: Remove obsolete TODO comment.

diff --git a/services/keepstore/keepstore.go b/services/keepstore/keepstore.go
index 8267fd7..69ff565 100644
--- a/services/keepstore/keepstore.go
+++ b/services/keepstore/keepstore.go
@@ -104,7 +104,6 @@ func main() {
 
 	deprecated.afterFlagParse(theConfig)
 
-	// TODO: Load config
 	err := config.LoadFile(theConfig, configPath)
 	if err != nil && (!os.IsNotExist(err) || configPath != defaultConfigPath) {
 		log.Fatal(err)

commit e5b9158fc357495fba2d110bf6eafa72b1ebe145
Author: Tom Clegg <tom at curoverse.com>
Date:   Mon Oct 17 04:09:41 2016 -0400

    9956: Move deprecated options out to a separate file.

diff --git a/services/keepstore/azure_blob_volume.go b/services/keepstore/azure_blob_volume.go
index 41b6c69..d2163f6 100644
--- a/services/keepstore/azure_blob_volume.go
+++ b/services/keepstore/azure_blob_volume.go
@@ -54,7 +54,7 @@ func (s *azureVolumeAdder) Set(containerName string) error {
 		StorageAccountName:    azureStorageAccountName,
 		StorageAccountKeyFile: azureStorageAccountKeyFile,
 		AzureReplication:      azureStorageReplication,
-		ReadOnly:              flagReadonly,
+		ReadOnly:              deprecated.flagReadonly,
 	})
 	return nil
 }
diff --git a/services/keepstore/deprecated.go b/services/keepstore/deprecated.go
new file mode 100644
index 0000000..7caa6b5
--- /dev/null
+++ b/services/keepstore/deprecated.go
@@ -0,0 +1,43 @@
+package main
+
+import (
+	"flag"
+	"time"
+
+	"git.curoverse.com/arvados.git/sdk/go/arvados"
+)
+
+type deprecatedOptions struct {
+	flagSerializeIO     bool
+	flagReadonly        bool
+	neverDelete         bool
+	signatureTTLSeconds int
+}
+
+var deprecated = deprecatedOptions{
+	neverDelete:         !theConfig.EnableDelete,
+	signatureTTLSeconds: int(theConfig.BlobSignatureTTL.Duration() / time.Second),
+}
+
+func (depr *deprecatedOptions) beforeFlagParse(cfg *Config) {
+	flag.StringVar(&cfg.Listen, "listen", cfg.Listen, "see Listen configuration")
+	flag.IntVar(&cfg.MaxBuffers, "max-buffers", cfg.MaxBuffers, "see MaxBuffers configuration")
+	flag.IntVar(&cfg.MaxRequests, "max-requests", cfg.MaxRequests, "see MaxRequests configuration")
+	flag.BoolVar(&depr.neverDelete, "never-delete", depr.neverDelete, "see EnableDelete configuration")
+	flag.BoolVar(&cfg.RequireSignatures, "enforce-permissions", cfg.RequireSignatures, "see RequireSignatures configuration")
+	flag.StringVar(&cfg.BlobSigningKeyFile, "permission-key-file", cfg.BlobSigningKeyFile, "see BlobSigningKey`File` configuration")
+	flag.StringVar(&cfg.BlobSigningKeyFile, "blob-signing-key-file", cfg.BlobSigningKeyFile, "see BlobSigningKey`File` configuration")
+	flag.StringVar(&cfg.SystemAuthTokenFile, "data-manager-token-file", cfg.SystemAuthTokenFile, "see SystemAuthToken`File` configuration")
+	flag.IntVar(&depr.signatureTTLSeconds, "permission-ttl", depr.signatureTTLSeconds, "signature TTL in seconds; see BlobSignatureTTL configuration")
+	flag.IntVar(&depr.signatureTTLSeconds, "blob-signature-ttl", depr.signatureTTLSeconds, "signature TTL in seconds; see BlobSignatureTTL configuration")
+	flag.Var(&cfg.TrashLifetime, "trash-lifetime", "see TrashLifetime configuration")
+	flag.BoolVar(&depr.flagSerializeIO, "serialize", depr.flagSerializeIO, "serialize read and write operations on the following volumes.")
+	flag.BoolVar(&depr.flagReadonly, "readonly", depr.flagReadonly, "do not write, delete, or touch anything on the following volumes.")
+	flag.StringVar(&cfg.PIDFile, "pid", cfg.PIDFile, "see `PIDFile` configuration")
+	flag.Var(&cfg.TrashCheckInterval, "trash-check-interval", "see TrashCheckInterval configuration")
+}
+
+func (depr *deprecatedOptions) afterFlagParse(cfg *Config) {
+	cfg.BlobSignatureTTL = arvados.Duration(depr.signatureTTLSeconds) * arvados.Duration(time.Second)
+	cfg.EnableDelete = !depr.neverDelete
+}
diff --git a/services/keepstore/keepstore.go b/services/keepstore/keepstore.go
index 7a9cec0..8267fd7 100644
--- a/services/keepstore/keepstore.go
+++ b/services/keepstore/keepstore.go
@@ -11,7 +11,6 @@ import (
 	"syscall"
 	"time"
 
-	"git.curoverse.com/arvados.git/sdk/go/arvados"
 	"git.curoverse.com/arvados.git/sdk/go/arvadosclient"
 	"git.curoverse.com/arvados.git/sdk/go/config"
 	"git.curoverse.com/arvados.git/sdk/go/httpserver"
@@ -83,34 +82,13 @@ var KeepVM VolumeManager
 var pullq *WorkQueue
 var trashq *WorkQueue
 
-var (
-	flagSerializeIO bool
-	flagReadonly    bool
-)
-
 // TODO(twp): continue moving as much code as possible out of main
 // so it can be effectively tested. Esp. handling and postprocessing
 // of command line flags (identifying Keep volumes and initializing
 // permission arguments).
 
 func main() {
-	neverDelete := !theConfig.EnableDelete
-	signatureTTLSeconds := int(theConfig.BlobSignatureTTL.Duration() / time.Second)
-	flag.StringVar(&theConfig.Listen, "listen", theConfig.Listen, "see Listen configuration")
-	flag.IntVar(&theConfig.MaxBuffers, "max-buffers", theConfig.MaxBuffers, "see MaxBuffers configuration")
-	flag.IntVar(&theConfig.MaxRequests, "max-requests", theConfig.MaxRequests, "see MaxRequests configuration")
-	flag.BoolVar(&neverDelete, "never-delete", neverDelete, "see EnableDelete configuration")
-	flag.BoolVar(&theConfig.RequireSignatures, "enforce-permissions", theConfig.RequireSignatures, "see RequireSignatures configuration")
-	flag.StringVar(&theConfig.BlobSigningKeyFile, "permission-key-file", theConfig.BlobSigningKeyFile, "see BlobSigningKey`File` configuration")
-	flag.StringVar(&theConfig.BlobSigningKeyFile, "blob-signing-key-file", theConfig.BlobSigningKeyFile, "see BlobSigningKey`File` configuration")
-	flag.StringVar(&theConfig.SystemAuthTokenFile, "data-manager-token-file", theConfig.SystemAuthTokenFile, "see SystemAuthToken`File` configuration")
-	flag.IntVar(&signatureTTLSeconds, "permission-ttl", signatureTTLSeconds, "signature TTL in seconds; see BlobSignatureTTL configuration")
-	flag.IntVar(&signatureTTLSeconds, "blob-signature-ttl", signatureTTLSeconds, "signature TTL in seconds; see BlobSignatureTTL configuration")
-	flag.Var(&theConfig.TrashLifetime, "trash-lifetime", "see TrashLifetime configuration")
-	flag.BoolVar(&flagSerializeIO, "serialize", false, "serialize read and write operations on the following volumes.")
-	flag.BoolVar(&flagReadonly, "readonly", false, "do not write, delete, or touch anything on the following volumes.")
-	flag.StringVar(&theConfig.PIDFile, "pid", theConfig.PIDFile, "see `PIDFile` configuration")
-	flag.Var(&theConfig.TrashCheckInterval, "trash-check-interval", "see TrashCheckInterval configuration")
+	deprecated.beforeFlagParse(theConfig)
 
 	dumpConfig := flag.Bool("dump-config", false, "write current configuration to stdout and exit (useful for migrating from command line flags to config file)")
 
@@ -124,8 +102,7 @@ func main() {
 	flag.Usage = usage
 	flag.Parse()
 
-	theConfig.BlobSignatureTTL = arvados.Duration(signatureTTLSeconds) * arvados.Duration(time.Second)
-	theConfig.EnableDelete = !neverDelete
+	deprecated.afterFlagParse(theConfig)
 
 	// TODO: Load config
 	err := config.LoadFile(theConfig, configPath)
diff --git a/services/keepstore/s3_volume.go b/services/keepstore/s3_volume.go
index 7f2c3f0..caed35b 100644
--- a/services/keepstore/s3_volume.go
+++ b/services/keepstore/s3_volume.go
@@ -56,7 +56,7 @@ func (s *s3VolumeAdder) Set(bucketName string) error {
 	if s3AccessKeyFile == "" || s3SecretKeyFile == "" {
 		return fmt.Errorf("-s3-access-key-file and -s3-secret-key-file arguments must given before -s3-bucket-volume")
 	}
-	if flagSerializeIO {
+	if deprecated.flagSerializeIO {
 		log.Print("Notice: -serialize is not supported by s3-bucket volumes.")
 	}
 	s.Config.Volumes = append(s.Config.Volumes, &S3Volume{
@@ -68,7 +68,7 @@ func (s *s3VolumeAdder) Set(bucketName string) error {
 		RaceWindow:    arvados.Duration(s3RaceWindow),
 		S3Replication: s3Replication,
 		UnsafeDelete:  s3UnsafeDelete,
-		ReadOnly:      flagReadonly,
+		ReadOnly:      deprecated.flagReadonly,
 		IndexPageSize: 1000,
 	})
 	return nil
diff --git a/services/keepstore/volume_unix.go b/services/keepstore/volume_unix.go
index 1866c7b..92c897e 100644
--- a/services/keepstore/volume_unix.go
+++ b/services/keepstore/volume_unix.go
@@ -38,8 +38,8 @@ func (vs *unixVolumeAdder) Set(path string) error {
 	}
 	vs.Config.Volumes = append(vs.Config.Volumes, &UnixVolume{
 		Root:      path,
-		ReadOnly:  flagReadonly,
-		Serialize: flagSerializeIO,
+		ReadOnly:  deprecated.flagReadonly,
+		Serialize: deprecated.flagSerializeIO,
 	})
 	return nil
 }
@@ -79,10 +79,10 @@ func (vs *unixVolumeAdder) Discover() int {
 		}
 		// Set the -readonly flag (but only for this volume)
 		// if the filesystem is mounted readonly.
-		flagReadonlyWas := flagReadonly
+		flagReadonlyWas := deprecated.flagReadonly
 		for _, fsopt := range strings.Split(args[3], ",") {
 			if fsopt == "ro" {
-				flagReadonly = true
+				deprecated.flagReadonly = true
 				break
 			}
 			if fsopt == "rw" {
@@ -94,7 +94,7 @@ func (vs *unixVolumeAdder) Discover() int {
 		} else {
 			added++
 		}
-		flagReadonly = flagReadonlyWas
+		deprecated.flagReadonly = flagReadonlyWas
 	}
 	return added
 }

commit d3b56f18947c3ccb42fee52ff33b3b00db0dffd9
Author: Tom Clegg <tom at curoverse.com>
Date:   Mon Oct 17 04:08:43 2016 -0400

    9956: Remove "listen on address with no port" in help message.

diff --git a/services/keepstore/usage.go b/services/keepstore/usage.go
index 748ef38..c067ec0 100644
--- a/services/keepstore/usage.go
+++ b/services/keepstore/usage.go
@@ -38,9 +38,9 @@ Example config file:
 
 Listen:
 
-    Local port to listen on. Can be "address", "address:port", or
-    ":port", where "address" is a host IP address or name and "port"
-    is a port number or name.
+    Local port to listen on. Can be "address:port" or ":port", where
+    "address" is a host IP address or name and "port" is a port number
+    or name.
 
 PIDFile:
 

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list