17840: Merge branch 'main'
authorTom Clegg <tom@curii.com>
Tue, 16 Nov 2021 20:28:06 +0000 (15:28 -0500)
committerTom Clegg <tom@curii.com>
Tue, 16 Nov 2021 20:28:06 +0000 (15:28 -0500)
Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom@curii.com>

1  2 
lib/crunchrun/crunchrun.go
lib/install/deps.go

index f9bf3df9d7535fceb20231b8082c359745dc45e2,33558b5d9b9135000e6d51ba13e8660cdea608f3..63a0ada54ee733629b8bd44b7e3bff6df5f7b793
@@@ -617,10 -617,15 +617,15 @@@ func (runner *ContainerRunner) SetupMou
        }
  
        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)
  
@@@ -1694,11 -1699,11 +1699,11 @@@ func (command) RunCommand(prog string, 
                ignoreDetachFlag = true
        }
  
 -      if err := flags.Parse(args); err == flag.ErrHelp {
 -              return 0
 -      } else if err != nil {
 -              log.Print(err)
 -              return 1
 +      if ok, code := cmd.ParseFlags(flags, prog, args, "container-uuid", stderr); !ok {
 +              return code
 +      } else if flags.NArg() != 1 {
 +              fmt.Fprintf(stderr, "missing required argument: container-uuid (try -help)\n")
 +              return 2
        }
  
        containerUUID := flags.Arg(0)
diff --combined lib/install/deps.go
index ca4b6814752970a9cc1aad7d2bba265f9d887af4,714604c8454ed0ecbecbc59db6ba02c956da6104..1d3cc09275feb688929d9ab01ca4dd73de42aa5d
@@@ -29,6 -29,7 +29,7 @@@ import 
  var Command cmd.Handler = &installCommand{}
  
  const devtestDatabasePassword = "insecure_arvados_test"
+ const goversion = "1.17.1"
  
  type installCommand struct {
        ClusterType    string
@@@ -57,11 -58,17 +58,11 @@@ func (inst *installCommand) RunCommand(
        flags.StringVar(&inst.SourcePath, "source", "/arvados", "source tree location (required for -type=package)")
        flags.StringVar(&inst.PackageVersion, "package-version", "0.0.0", "version string to embed in executable files")
        flags.BoolVar(&inst.EatMyData, "eatmydata", false, "use eatmydata to speed up install")
 -      err = flags.Parse(args)
 -      if err == flag.ErrHelp {
 -              err = nil
 -              return 0
 -      } else if err != nil {
 -              return 2
 +
 +      if ok, code := cmd.ParseFlags(flags, prog, args, "", stderr); !ok {
 +              return code
        } else if *versionFlag {
                return cmd.Version.RunCommand(prog, args, stdin, stdout, stderr)
 -      } else if len(flags.Args()) > 0 {
 -              err = fmt.Errorf("unrecognized command line arguments: %v", flags.Args())
 -              return 2
        }
  
        var dev, test, prod, pkg bool
@@@ -239,7 -246,6 +240,6 @@@ make instal
        }
  
        if !prod {
-               goversion := "1.17.1"
                if havegoversion, err := exec.Command("/usr/local/bin/go", "version").CombinedOutput(); err == nil && bytes.HasPrefix(havegoversion, []byte("go version go"+goversion+" ")) {
                        logger.Print("go " + goversion + " already installed")
                } else {