[ARVADOS] updated: 2.1.0-1503-gb7aa839c6

Git user git at public.arvados.org
Tue Oct 19 15:35:30 UTC 2021


Summary of changes:
 doc/_includes/_install_debian_key.liquid      |  2 +-
 doc/install/singularity.html.textile.liquid   |  4 ++++
 doc/sdk/python/sdk-python.html.textile.liquid |  2 +-
 lib/config/config.default.yml                 | 16 +++++++++-----
 lib/config/generated_config.go                | 16 +++++++++-----
 lib/config/load.go                            | 13 ------------
 lib/crunchrun/crunchrun.go                    | 21 +++++++++++++++++--
 lib/crunchrun/integration_test.go             |  2 ++
 lib/crunchrun/singularity.go                  | 15 ++++++++++++++
 sdk/cli/bin/arv                               |  4 ++--
 sdk/cwl/arvados_cwl/runner.py                 |  8 ++++++-
 sdk/python/arvados/commands/keepdocker.py     | 30 +++++++++++++--------------
 12 files changed, 87 insertions(+), 46 deletions(-)

       via  b7aa839c669f1c2055ade415b99378e5c9ba0baa (commit)
       via  a0080bdf353bcc107eb80a5755958c6c276d49eb (commit)
       via  53b2e5895715c73febffb563ebc89153339e02ab (commit)
       via  6fe5fe41128cfe4fc9b5b6f6c1f092c4d01c4e4e (commit)
       via  4e142b5282d5e620057e06530f58445d2a526964 (commit)
       via  e3df40f20870d2403d409f7726096edc2be31635 (commit)
       via  876b9e64d1364770486552060222f5f6b1b5e2ea (commit)
       via  f3a82584fde8dfd3c653c01a5e523360c8615703 (commit)
       via  ffdf779049d4f9ce69d77968dc672f6accbc7a7a (commit)
       via  b445ae12bc55d0fd6f9b64955e52fcab74207a66 (commit)
       via  eb6b9a3d52cab3f7904bae457a9c210e2a76bf6a (commit)
       via  d8ecd9d8940a50ebabe089eb326753f54bb2831b (commit)
       via  a85399e0a429791d8cc508984b024bba03fdf3f5 (commit)
       via  064a8777267b6918ef040589c0b9d75f8df81cd1 (commit)
      from  c8d252f51c23484484e4aa023fcd1f86ee961eab (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 b7aa839c669f1c2055ade415b99378e5c9ba0baa
Author: Tom Clegg <tom at curii.com>
Date:   Tue Oct 19 10:08:40 2021 -0400

    16347: Fix leaky state in test case.
    
    Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom at curii.com>

diff --git a/lib/crunchrun/integration_test.go b/lib/crunchrun/integration_test.go
index 8adddd705..9b797fd86 100644
--- a/lib/crunchrun/integration_test.go
+++ b/lib/crunchrun/integration_test.go
@@ -90,6 +90,7 @@ func (s *integrationSuite) SetUpSuite(c *C) {
 }
 
 func (s *integrationSuite) TearDownSuite(c *C) {
+	os.Unsetenv("ARVADOS_KEEP_SERVICES")
 	if s.client == nil {
 		// didn't set up
 		return
@@ -99,6 +100,7 @@ func (s *integrationSuite) TearDownSuite(c *C) {
 }
 
 func (s *integrationSuite) SetUpTest(c *C) {
+	os.Unsetenv("ARVADOS_KEEP_SERVICES")
 	s.engine = "docker"
 	s.stdin = bytes.Buffer{}
 	s.stdout = bytes.Buffer{}

commit a0080bdf353bcc107eb80a5755958c6c276d49eb
Merge: 53b2e5895 6fe5fe411
Author: Tom Clegg <tom at curii.com>
Date:   Tue Oct 19 09:21:44 2021 -0400

    16347: Merge branch 'main'
    
    Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom at curii.com>


commit 53b2e5895715c73febffb563ebc89153339e02ab
Author: Tom Clegg <tom at curii.com>
Date:   Mon Oct 18 15:30:29 2021 -0400

    16347: Change default to enable local keepstore when possible.
    
    Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom at curii.com>

diff --git a/lib/config/config.default.yml b/lib/config/config.default.yml
index 67286edfe..c863bbcbc 100644
--- a/lib/config/config.default.yml
+++ b/lib/config/config.default.yml
@@ -920,11 +920,17 @@ Clusters:
       #
       # A zero value disables this feature.
       #
-      # Note that when this feature is enabled, the entire cluster
-      # configuration file, including the system root token, is copied
-      # to the worker node and held in memory for the duration of the
-      # container.
-      LocalKeepBlobBuffersPerVCPU: 0
+      # In order for this feature to be activated, no volume may use
+      # AccessViaHosts, and each volume must have Replication higher
+      # than Collections.DefaultReplication. If these requirements are
+      # not satisfied, the feature is disabled automatically
+      # regardless of the value given here.
+      #
+      # Note that when this configuration is enabled, the entire
+      # cluster configuration file, including the system root token,
+      # is copied to the worker node and held in memory for the
+      # duration of the container.
+      LocalKeepBlobBuffersPerVCPU: 1
 
       # When running a dedicated keepstore process for a container
       # (see LocalKeepBlobBuffersPerVCPU), write keepstore log
diff --git a/lib/config/generated_config.go b/lib/config/generated_config.go
index d2a68f29f..4742c6405 100644
--- a/lib/config/generated_config.go
+++ b/lib/config/generated_config.go
@@ -926,11 +926,17 @@ Clusters:
       #
       # A zero value disables this feature.
       #
-      # Note that when this feature is enabled, the entire cluster
-      # configuration file, including the system root token, is copied
-      # to the worker node and held in memory for the duration of the
-      # container.
-      LocalKeepBlobBuffersPerVCPU: 0
+      # In order for this feature to be activated, no volume may use
+      # AccessViaHosts, and each volume must have Replication higher
+      # than Collections.DefaultReplication. If these requirements are
+      # not satisfied, the feature is disabled automatically
+      # regardless of the value given here.
+      #
+      # Note that when this configuration is enabled, the entire
+      # cluster configuration file, including the system root token,
+      # is copied to the worker node and held in memory for the
+      # duration of the container.
+      LocalKeepBlobBuffersPerVCPU: 1
 
       # When running a dedicated keepstore process for a container
       # (see LocalKeepBlobBuffersPerVCPU), write keepstore log
diff --git a/lib/config/load.go b/lib/config/load.go
index a7419331f..956a47b1a 100644
--- a/lib/config/load.go
+++ b/lib/config/load.go
@@ -298,7 +298,6 @@ func (ldr *Loader) Load() (*arvados.Config, error) {
 			ldr.checkEnum("Containers.LocalKeepLogsToContainerLog", cc.Containers.LocalKeepLogsToContainerLog, "none", "all", "errors"),
 			ldr.checkEmptyKeepstores(cc),
 			ldr.checkUnlistedKeepstores(cc),
-			ldr.checkLocalKeepstoreVolumes(cc),
 			ldr.checkStorageClasses(cc),
 			// TODO: check non-empty Rendezvous on
 			// services other than Keepstore
@@ -372,18 +371,6 @@ cluster:
 	return nil
 }
 
-func (ldr *Loader) checkLocalKeepstoreVolumes(cc arvados.Cluster) error {
-	if cc.Containers.LocalKeepBlobBuffersPerVCPU < 1 {
-		return nil
-	}
-	for _, vol := range cc.Volumes {
-		if len(vol.AccessViaHosts) == 0 {
-			return nil
-		}
-	}
-	return fmt.Errorf("LocalKeepBlobBuffersPerVCPU is %d, but no volumes would be accessible from a worker instance", cc.Containers.LocalKeepBlobBuffersPerVCPU)
-}
-
 func (ldr *Loader) checkStorageClasses(cc arvados.Cluster) error {
 	classOnVolume := map[string]bool{}
 	for volid, vol := range cc.Volumes {
diff --git a/lib/crunchrun/crunchrun.go b/lib/crunchrun/crunchrun.go
index c9456ccc7..ba5673f91 100644
--- a/lib/crunchrun/crunchrun.go
+++ b/lib/crunchrun/crunchrun.go
@@ -1776,11 +1776,18 @@ func (command) RunCommand(prog string, args []string, stdin io.Reader, stdout, s
 	}
 
 	if keepstore == nil {
-		// Nothing is written to keepstoreLogbuf, no need to
-		// call SetWriter.
+		// Log explanation (if any) for why we're not running
+		// a local keepstore.
+		var buf bytes.Buffer
+		keepstoreLogbuf.SetWriter(&buf)
+		if buf.Len() > 0 {
+			cr.CrunchLog.Printf("%s", strings.TrimSpace(buf.String()))
+		}
 	} else if logWhat := conf.Cluster.Containers.LocalKeepLogsToContainerLog; logWhat == "none" {
+		cr.CrunchLog.Printf("using local keepstore process (pid %d) at %s", keepstore.Process.Pid, os.Getenv("ARVADOS_KEEP_SERVICES"))
 		keepstoreLogbuf.SetWriter(io.Discard)
 	} else {
+		cr.CrunchLog.Printf("using local keepstore process (pid %d) at %s, writing logs to keepstore.txt in log collection", keepstore.Process.Pid, os.Getenv("ARVADOS_KEEP_SERVICES"))
 		logwriter, err := cr.NewLogWriter("keepstore")
 		if err != nil {
 			log.Print(err)
@@ -1896,6 +1903,16 @@ func startLocalKeepstore(configData ConfigData, logbuf io.Writer) (*exec.Cmd, er
 	if configData.Cluster == nil || configData.KeepBuffers < 1 {
 		return nil, nil
 	}
+	for uuid, vol := range configData.Cluster.Volumes {
+		if len(vol.AccessViaHosts) > 0 {
+			fmt.Fprintf(logbuf, "not starting a local keepstore process because a volume (%s) uses AccessViaHosts\n", uuid)
+			return nil, nil
+		}
+		if !vol.ReadOnly && vol.Replication < configData.Cluster.Collections.DefaultReplication {
+			fmt.Fprintf(logbuf, "not starting a local keepstore process because a writable volume (%s) has replication less than Collections.DefaultReplication (%d < %d)\n", uuid, vol.Replication, configData.Cluster.Collections.DefaultReplication)
+			return nil, nil
+		}
+	}
 
 	// Rather than have an alternate way to tell keepstore how
 	// many buffers to use when starting it this way, we just

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list