[ARVADOS] updated: 1.1.2-87-g25e9311

Git user git at public.curoverse.com
Tue Jan 16 16:40:55 EST 2018


Summary of changes:
 lib/mount/command.go      |  5 +++++
 lib/mount/command_test.go |  2 +-
 sdk/go/arvados/fs_site.go | 15 ++++++++-------
 3 files changed, 14 insertions(+), 8 deletions(-)

       via  25e9311a9f958e3e0e42929a90f54b15997b22c0 (commit)
       via  c65eed0dd97fe3adb58b1029db68db58c6ed6989 (commit)
      from  e509c5f6c1c9f9b212705da401713d49c9f78a71 (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 25e9311a9f958e3e0e42929a90f54b15997b22c0
Author: Tom Clegg <tclegg at veritasgenetics.com>
Date:   Tue Jan 16 16:40:20 2018 -0500

    12308: Fix nil pointer dereference at sitefs root.
    
    Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tclegg at veritasgenetics.com>

diff --git a/sdk/go/arvados/fs_site.go b/sdk/go/arvados/fs_site.go
index 9f3dbce..37ec8a3 100644
--- a/sdk/go/arvados/fs_site.go
+++ b/sdk/go/arvados/fs_site.go
@@ -91,13 +91,14 @@ func (vn *vdirnode) Child(name string, _ func(inode) inode) inode {
 	return vn.inode.Child(name, func(existing inode) inode {
 		if existing != nil {
 			return existing
-		} else {
-			n := vn.create(vn, name)
-			if n != nil {
-				n.SetParent(vn, name)
-				vn.inode.(*treenode).fileinfo.modTime = time.Now()
-			}
-			return n
+		} else if vn.create == nil {
+			return nil
 		}
+		n := vn.create(vn, name)
+		if n != nil {
+			n.SetParent(vn, name)
+			vn.inode.(*treenode).fileinfo.modTime = time.Now()
+		}
+		return n
 	})
 }

commit c65eed0dd97fe3adb58b1029db68db58c6ed6989
Author: Tom Clegg <tclegg at veritasgenetics.com>
Date:   Tue Jan 16 16:27:54 2018 -0500

    12308: Require --experimental flag.
    
    Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tclegg at veritasgenetics.com>

diff --git a/lib/mount/command.go b/lib/mount/command.go
index 88d268c..1159fbc 100644
--- a/lib/mount/command.go
+++ b/lib/mount/command.go
@@ -37,11 +37,16 @@ func (c *cmd) RunCommand(prog string, args []string, stdin io.Reader, stdout, st
 	logger := log.New(stderr, prog+" ", 0)
 	flags := flag.NewFlagSet(args[0], flag.ContinueOnError)
 	ro := flags.Bool("ro", false, "read-only")
+	experimental := flags.Bool("experimental", false, "acknowledge this is an experimental command, and should not be used in production (required)")
 	err := flags.Parse(args)
 	if err != nil {
 		logger.Print(err)
 		return 2
 	}
+	if !*experimental {
+		logger.Printf("error: experimental command %q used without --experimental flag", prog)
+		return 2
+	}
 
 	client := arvados.NewClientFromEnv()
 	ac, err := arvadosclient.New(client)
diff --git a/lib/mount/command_test.go b/lib/mount/command_test.go
index a8f6d1a..9cd4139 100644
--- a/lib/mount/command_test.go
+++ b/lib/mount/command_test.go
@@ -37,7 +37,7 @@ func (s *CmdSuite) TestMount(c *check.C) {
 	mountCmd := cmd{ready: make(chan struct{})}
 	ready := false
 	go func() {
-		exited <- mountCmd.RunCommand("test mount", []string{s.mnt}, stdin, stdout, stderr)
+		exited <- mountCmd.RunCommand("test mount", []string{"--experimental", s.mnt}, stdin, stdout, stderr)
 	}()
 	go func() {
 		<-mountCmd.ready

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list