[ARVADOS] updated: 2.1.0-1610-g1c36c7a9d

Git user git at public.arvados.org
Thu Nov 11 22:33:02 UTC 2021


Summary of changes:
 lib/crunchrun/crunchrun.go      |  8 ++++++--
 lib/crunchrun/crunchrun_test.go | 28 ++++++++++++++--------------
 2 files changed, 20 insertions(+), 16 deletions(-)

       via  1c36c7a9d4cb3829e57aab9ac84a6b85ec35459c (commit)
      from  d0a50cd1fafca2a931f35f7997bd40f01a295ee0 (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 1c36c7a9d4cb3829e57aab9ac84a6b85ec35459c
Author: Peter Amstutz <peter.amstutz at curii.com>
Date:   Thu Nov 11 17:32:01 2021 -0500

    18346: Only disable websockets when all container mounts are by PDH
    
    Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <peter.amstutz at curii.com>

diff --git a/lib/crunchrun/crunchrun.go b/lib/crunchrun/crunchrun.go
index 9f3edd0b9..33558b5d9 100644
--- a/lib/crunchrun/crunchrun.go
+++ b/lib/crunchrun/crunchrun.go
@@ -415,7 +415,6 @@ func (runner *ContainerRunner) SetupMounts() (map[string]bindmount, error) {
 		"arv-mount",
 		"--foreground",
 		"--read-write",
-		"--disable-event-listening",
 		"--storage-classes", strings.Join(runner.Container.OutputStorageClasses, ","),
 		fmt.Sprintf("--crunchstat-interval=%v", runner.statInterval.Seconds())}
 
@@ -618,10 +617,15 @@ func (runner *ContainerRunner) SetupMounts() (map[string]bindmount, error) {
 	}
 
 	if pdhOnly {
-		arvMountCmd = append(arvMountCmd, "--mount-by-pdh", "by_id")
+		// If we are only mounting collections by pdh, make
+		// sure we don't subscribe to websocket events to
+		// avoid putting undesired load on the API server
+		arvMountCmd = append(arvMountCmd, "--mount-by-pdh", "by_id", "--disable-event-listening")
 	} else {
 		arvMountCmd = append(arvMountCmd, "--mount-by-id", "by_id")
 	}
+	// the by_uuid mount point is used by singularity when writing
+	// out docker images converted to SIF
 	arvMountCmd = append(arvMountCmd, "--mount-by-id", "by_uuid")
 	arvMountCmd = append(arvMountCmd, runner.ArvMountPoint)
 
diff --git a/lib/crunchrun/crunchrun_test.go b/lib/crunchrun/crunchrun_test.go
index f4642b779..c28cf73cb 100644
--- a/lib/crunchrun/crunchrun_test.go
+++ b/lib/crunchrun/crunchrun_test.go
@@ -1125,8 +1125,8 @@ func (s *TestSuite) TestSetupMounts(c *C) {
 		bindmounts, err := cr.SetupMounts()
 		c.Check(err, IsNil)
 		c.Check(am.Cmd, DeepEquals, []string{"arv-mount", "--foreground",
-			"--read-write", "--disable-event-listening", "--storage-classes", "default", "--crunchstat-interval=5",
-			"--mount-by-pdh", "by_id", "--mount-by-id", "by_uuid", realTemp + "/keep1"})
+			"--read-write", "--storage-classes", "default", "--crunchstat-interval=5",
+			"--mount-by-pdh", "by_id", "--disable-event-listening", "--mount-by-id", "by_uuid", realTemp + "/keep1"})
 		c.Check(bindmounts, DeepEquals, map[string]bindmount{"/tmp": {realTemp + "/tmp2", false}})
 		os.RemoveAll(cr.ArvMountPoint)
 		cr.CleanupDirs()
@@ -1145,8 +1145,8 @@ func (s *TestSuite) TestSetupMounts(c *C) {
 		bindmounts, err := cr.SetupMounts()
 		c.Check(err, IsNil)
 		c.Check(am.Cmd, DeepEquals, []string{"arv-mount", "--foreground",
-			"--read-write", "--disable-event-listening", "--storage-classes", "foo,bar", "--crunchstat-interval=5",
-			"--mount-by-pdh", "by_id", "--mount-by-id", "by_uuid", realTemp + "/keep1"})
+			"--read-write", "--storage-classes", "foo,bar", "--crunchstat-interval=5",
+			"--mount-by-pdh", "by_id", "--disable-event-listening", "--mount-by-id", "by_uuid", realTemp + "/keep1"})
 		c.Check(bindmounts, DeepEquals, map[string]bindmount{"/out": {realTemp + "/tmp2", false}, "/tmp": {realTemp + "/tmp3", false}})
 		os.RemoveAll(cr.ArvMountPoint)
 		cr.CleanupDirs()
@@ -1165,8 +1165,8 @@ func (s *TestSuite) TestSetupMounts(c *C) {
 		bindmounts, err := cr.SetupMounts()
 		c.Check(err, IsNil)
 		c.Check(am.Cmd, DeepEquals, []string{"arv-mount", "--foreground",
-			"--read-write", "--disable-event-listening", "--storage-classes", "default", "--crunchstat-interval=5",
-			"--mount-by-pdh", "by_id", "--mount-by-id", "by_uuid", realTemp + "/keep1"})
+			"--read-write", "--storage-classes", "default", "--crunchstat-interval=5",
+			"--mount-by-pdh", "by_id", "--disable-event-listening", "--mount-by-id", "by_uuid", realTemp + "/keep1"})
 		c.Check(bindmounts, DeepEquals, map[string]bindmount{"/tmp": {realTemp + "/tmp2", false}, "/etc/arvados/ca-certificates.crt": {stubCertPath, true}})
 		os.RemoveAll(cr.ArvMountPoint)
 		cr.CleanupDirs()
@@ -1188,8 +1188,8 @@ func (s *TestSuite) TestSetupMounts(c *C) {
 		bindmounts, err := cr.SetupMounts()
 		c.Check(err, IsNil)
 		c.Check(am.Cmd, DeepEquals, []string{"arv-mount", "--foreground",
-			"--read-write", "--disable-event-listening", "--storage-classes", "default", "--crunchstat-interval=5",
-			"--mount-tmp", "tmp0", "--mount-by-pdh", "by_id", "--mount-by-id", "by_uuid", realTemp + "/keep1"})
+			"--read-write", "--storage-classes", "default", "--crunchstat-interval=5",
+			"--mount-tmp", "tmp0", "--mount-by-pdh", "by_id", "--disable-event-listening", "--mount-by-id", "by_uuid", realTemp + "/keep1"})
 		c.Check(bindmounts, DeepEquals, map[string]bindmount{"/keeptmp": {realTemp + "/keep1/tmp0", false}})
 		os.RemoveAll(cr.ArvMountPoint)
 		cr.CleanupDirs()
@@ -1211,8 +1211,8 @@ func (s *TestSuite) TestSetupMounts(c *C) {
 		bindmounts, err := cr.SetupMounts()
 		c.Check(err, IsNil)
 		c.Check(am.Cmd, DeepEquals, []string{"arv-mount", "--foreground",
-			"--read-write", "--disable-event-listening", "--storage-classes", "default", "--crunchstat-interval=5",
-			"--mount-tmp", "tmp0", "--mount-by-pdh", "by_id", "--mount-by-id", "by_uuid", realTemp + "/keep1"})
+			"--read-write", "--storage-classes", "default", "--crunchstat-interval=5",
+			"--mount-tmp", "tmp0", "--mount-by-pdh", "by_id", "--disable-event-listening", "--mount-by-id", "by_uuid", realTemp + "/keep1"})
 		c.Check(bindmounts, DeepEquals, map[string]bindmount{
 			"/keepinp": {realTemp + "/keep1/by_id/59389a8f9ee9d399be35462a0f92541c+53", true},
 			"/keepout": {realTemp + "/keep1/tmp0", false},
@@ -1238,8 +1238,8 @@ func (s *TestSuite) TestSetupMounts(c *C) {
 		bindmounts, err := cr.SetupMounts()
 		c.Check(err, IsNil)
 		c.Check(am.Cmd, DeepEquals, []string{"arv-mount", "--foreground",
-			"--read-write", "--disable-event-listening", "--storage-classes", "default", "--crunchstat-interval=5",
-			"--file-cache", "512", "--mount-tmp", "tmp0", "--mount-by-pdh", "by_id", "--mount-by-id", "by_uuid", realTemp + "/keep1"})
+			"--read-write", "--storage-classes", "default", "--crunchstat-interval=5",
+			"--file-cache", "512", "--mount-tmp", "tmp0", "--mount-by-pdh", "by_id", "--disable-event-listening", "--mount-by-id", "by_uuid", realTemp + "/keep1"})
 		c.Check(bindmounts, DeepEquals, map[string]bindmount{
 			"/keepinp": {realTemp + "/keep1/by_id/59389a8f9ee9d399be35462a0f92541c+53", true},
 			"/keepout": {realTemp + "/keep1/tmp0", false},
@@ -1321,8 +1321,8 @@ func (s *TestSuite) TestSetupMounts(c *C) {
 		bindmounts, err := cr.SetupMounts()
 		c.Check(err, IsNil)
 		c.Check(am.Cmd, DeepEquals, []string{"arv-mount", "--foreground",
-			"--read-write", "--disable-event-listening", "--storage-classes", "default", "--crunchstat-interval=5",
-			"--file-cache", "512", "--mount-tmp", "tmp0", "--mount-by-pdh", "by_id", "--mount-by-id", "by_uuid", realTemp + "/keep1"})
+			"--read-write", "--storage-classes", "default", "--crunchstat-interval=5",
+			"--file-cache", "512", "--mount-tmp", "tmp0", "--mount-by-pdh", "by_id", "--disable-event-listening", "--mount-by-id", "by_uuid", realTemp + "/keep1"})
 		c.Check(bindmounts, DeepEquals, map[string]bindmount{
 			"/tmp":     {realTemp + "/tmp2", false},
 			"/tmp/foo": {realTemp + "/keep1/tmp0", true},

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list