15954: Ignore warnings from passenger-config validate-install.
authorTom Clegg <tom@tomclegg.ca>
Thu, 27 Feb 2020 21:39:02 +0000 (16:39 -0500)
committerTom Clegg <tom@tomclegg.ca>
Thu, 27 Feb 2020 21:39:02 +0000 (16:39 -0500)
Otherwise, an existing passenger installation (system-wide or in an
rvm gemset) causes cluster startup to fail.

Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom@tomclegg.ca>

lib/boot/passenger.go

index 41805ba2b9f9054b1efb16880a2cfeca1d523ff6..33afb721dbcd17039ed11558b07749c5329ba870 100644 (file)
@@ -67,7 +67,11 @@ func (runner installPassenger) Run(ctx context.Context, fail func(error), super
                return err
        }
        err = super.RunProgram(ctx, runner.src, nil, nil, "bundle", "exec", "passenger-config", "validate-install")
-       if err != nil {
+       if err != nil && !strings.Contains(err.Error(), "exit status 2") {
+               // Exit code 2 indicates there were warnings (like
+               // "other passenger installations have been detected",
+               // which we can't expect to avoid) but no errors.
+               // Other non-zero exit codes (1, 9) indicate errors.
                return err
        }
        return nil