[ARVADOS] updated: bbf13d5bc532c5222a933317461f187a0e118c9a

git at public.curoverse.com git at public.curoverse.com
Wed Dec 2 12:30:22 EST 2015


Summary of changes:
 sdk/go/crunchrunner/upload.go                      |  4 +-
 sdk/go/keepclient/discover.go                      | 13 +++---
 sdk/go/keepclient/keepclient.go                    |  5 +-
 sdk/go/keepclient/keepclient_test.go               | 48 +++++++++++++++++++-
 sdk/go/keepclient/support.go                       | 10 ++--
 .../arvados/v1/keep_services_controller.rb         |  2 +-
 .../arvados/v1/keep_services_controller_test.rb    | 16 ++++++-
 services/datamanager/datamanager_test.go           | 53 +++++++++++++++++++---
 services/datamanager/keep/keep.go                  | 29 +++++++++---
 services/datamanager/keep/keep_test.go             |  2 +-
 services/keepproxy/keepproxy_test.go               |  3 +-
 services/keepstore/keepstore.go                    |  1 -
 services/keepstore/pull_worker_integration_test.go |  1 -
 13 files changed, 148 insertions(+), 39 deletions(-)

       via  bbf13d5bc532c5222a933317461f187a0e118c9a (commit)
       via  7ed2f9d875d69b1494372c0cb790b18187dbacf2 (commit)
       via  e2197875b3fa58b235268a86170fec582c1a7f59 (commit)
       via  7413300e85b60d0533ec117b2175cb67fd9f10e3 (commit)
       via  d491de72bb56e7ca09570d4cc7cca02e217c5bf5 (commit)
       via  b17b1ad22bd3cf518eb1b3657f62768b60c7db25 (commit)
       via  a2aae98d0dc2550f4b5d2055769c23e9406b8860 (commit)
       via  035edcae46056689b814107d13f1ffbd34c594ef (commit)
      from  a2d956a99bb08ff983b667c8af7d528aa0e8d5ba (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 bbf13d5bc532c5222a933317461f187a0e118c9a
Merge: a2d956a 7ed2f9d
Author: radhika <radhika at curoverse.com>
Date:   Wed Dec 2 12:30:10 2015 -0500

    Merge branch 'master' into 7748-datamanager-dry-run
    
    Conflicts:
    	services/datamanager/datamanager_test.go

diff --cc services/datamanager/datamanager_test.go
index f432c07,75950d1..67b0e79
--- a/services/datamanager/datamanager_test.go
+++ b/services/datamanager/datamanager_test.go
@@@ -625,14 -624,17 +624,22 @@@ func createMultiStreamBlockCollection(
  // Also, create stray block and backdate it.
  // After datamanager run: expect blocks from the collection, but not the stray block.
  func TestManifestWithMultipleStreamsAndBlocks(t *testing.T) {
- 	testManifestWithMultipleStreamsAndBlocks(t, false)
 -	testManifestWithMultipleStreamsAndBlocks(t, 100, 10, "")
++	testManifestWithMultipleStreamsAndBlocks(t, 100, 10, "", false)
  }
  
+ // Same test as TestManifestWithMultipleStreamsAndBlocks with an additional
+ // keepstore of a service type other than "disk". Only the "disk" type services
+ // will be indexed by datamanager and hence should work the same way.
+ func TestManifestWithMultipleStreamsAndBlocks_WithOneUnsupportedKeepServer(t *testing.T) {
 -	testManifestWithMultipleStreamsAndBlocks(t, 2, 2, "testblobstore")
++	testManifestWithMultipleStreamsAndBlocks(t, 2, 2, "testblobstore", false)
+ }
+ 
 -func testManifestWithMultipleStreamsAndBlocks(t *testing.T, numStreams, numBlocks int, createExtraKeepServerWithType string) {
++// Test datamanager with dry-run. Expect no block to be deleted.
 +func TestManifestWithMultipleStreamsAndBlocks_DryRun(t *testing.T) {
- 	testManifestWithMultipleStreamsAndBlocks(t, true)
++	testManifestWithMultipleStreamsAndBlocks(t, 2, 2, "", true)
 +}
 +
- func testManifestWithMultipleStreamsAndBlocks(t *testing.T, isDryRun bool) {
++func testManifestWithMultipleStreamsAndBlocks(t *testing.T, numStreams, numBlocks int, createExtraKeepServerWithType string, isDryRun bool) {
  	defer TearDownDataManagerTest(t)
  	SetupDataManagerTest(t)
  
@@@ -658,15 -660,41 +665,47 @@@
  	// also backdate the stray old block
  	backdateBlocks(t, []string{strayOldBlock})
  
+ 	// If requested, create an extra keepserver with the given type
+ 	// This should be ignored during indexing and hence not change the datamanager outcome
+ 	var extraKeepServerUUID string
+ 	if createExtraKeepServerWithType != "" {
+ 		extraKeepServerUUID = addExtraKeepServer(t, createExtraKeepServerWithType)
+ 		defer deleteExtraKeepServer(extraKeepServerUUID)
+ 	}
+ 
  	// run datamanager
 +	dryRun = isDryRun
  	dataManagerSingleRun(t)
  
 -	// verify that strayOldBlock is not to be found, but the collections blocks are still there
 -	verifyBlocks(t, []string{strayOldBlock}, oldBlocks, 2)
 +	if dryRun {
 +		// verify that all blocks, including strayOldBlock, are still to be found
 +		verifyBlocks(t, nil, expected, 2)
 +	} else {
 +		// verify that strayOldBlock is not to be found, but the collections blocks are still there
 +		verifyBlocks(t, []string{strayOldBlock}, oldBlocks, 2)
 +	}
  }
+ 
+ // Add one more keepstore with the given service type
+ func addExtraKeepServer(t *testing.T, serviceType string) string {
+ 	defer switchToken(arvadostest.AdminToken)()
+ 
+ 	extraKeepService := make(arvadosclient.Dict)
+ 	err := arv.Create("keep_services",
+ 		arvadosclient.Dict{"keep_service": arvadosclient.Dict{
+ 			"service_host":     "localhost",
+ 			"service_port":     "21321",
+ 			"service_ssl_flag": false,
+ 			"service_type":     serviceType}},
+ 		&extraKeepService)
+ 	if err != nil {
+ 		t.Fatal(err)
+ 	}
+ 
+ 	return extraKeepService["uuid"].(string)
+ }
+ 
+ func deleteExtraKeepServer(uuid string) {
+ 	defer switchToken(arvadostest.AdminToken)()
+ 	arv.Delete("keep_services", uuid, nil, nil)
+ }

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list