mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2025-12-21 12:09:40 -06:00
hard exit when services fail
Signed-off-by: jkoberg <jkoberg@owncloud.com>
This commit is contained in:
@@ -61,6 +61,7 @@ func Server(cfg *config.Config) *cli.Command {
|
||||
Msg("Shutting down server")
|
||||
|
||||
cancel()
|
||||
os.Exit(1)
|
||||
})
|
||||
|
||||
debugServer, err := debug.Server(
|
||||
|
||||
@@ -60,6 +60,7 @@ func Server(cfg *config.Config) *cli.Command {
|
||||
Msg("Shutting down server")
|
||||
|
||||
cancel()
|
||||
os.Exit(1)
|
||||
})
|
||||
|
||||
debugServer, err := debug.Server(
|
||||
|
||||
@@ -3,6 +3,7 @@ package command
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/cs3org/reva/v2/pkg/events"
|
||||
"github.com/cs3org/reva/v2/pkg/events/stream"
|
||||
@@ -59,6 +60,7 @@ func Server(cfg *config.Config) *cli.Command {
|
||||
Err(err).
|
||||
Msg("Shutting down server")
|
||||
cancel()
|
||||
os.Exit(1)
|
||||
})
|
||||
|
||||
{
|
||||
|
||||
@@ -74,6 +74,7 @@ func Server(cfg *config.Config) *cli.Command {
|
||||
Msg("Shutting down server")
|
||||
|
||||
cancel()
|
||||
os.Exit(1)
|
||||
})
|
||||
|
||||
debugServer, err := debug.Server(
|
||||
|
||||
@@ -61,6 +61,7 @@ func Server(cfg *config.Config) *cli.Command {
|
||||
Msg("Shutting down server")
|
||||
|
||||
cancel()
|
||||
os.Exit(1)
|
||||
})
|
||||
|
||||
debugServer, err := debug.Server(
|
||||
|
||||
@@ -61,6 +61,7 @@ func Server(cfg *config.Config) *cli.Command {
|
||||
Msg("Shutting down server")
|
||||
|
||||
cancel()
|
||||
os.Exit(1)
|
||||
})
|
||||
|
||||
debugServer, err := debug.Server(
|
||||
|
||||
@@ -56,6 +56,7 @@ func Server(cfg *config.Config) *cli.Command {
|
||||
Msg("Shutting down server")
|
||||
|
||||
cancel()
|
||||
os.Exit(1)
|
||||
})
|
||||
|
||||
debugServer, err := debug.Server(
|
||||
|
||||
@@ -3,6 +3,7 @@ package command
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/cs3org/reva/v2/pkg/events"
|
||||
"github.com/cs3org/reva/v2/pkg/events/stream"
|
||||
@@ -100,6 +101,7 @@ func Server(cfg *config.Config) *cli.Command {
|
||||
Msg("Shutting down server")
|
||||
|
||||
cancel()
|
||||
os.Exit(1)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -65,6 +65,7 @@ func Server(cfg *config.Config) *cli.Command {
|
||||
Msg("Shutting down server")
|
||||
|
||||
cancel()
|
||||
os.Exit(1)
|
||||
})
|
||||
|
||||
debugServer, err := debug.Server(
|
||||
|
||||
@@ -60,6 +60,7 @@ func Server(cfg *config.Config) *cli.Command {
|
||||
Msg("Shutting down server")
|
||||
|
||||
cancel()
|
||||
os.Exit(1)
|
||||
})
|
||||
|
||||
debugServer, err := debug.Server(
|
||||
|
||||
@@ -3,6 +3,7 @@ package command
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/oklog/run"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config/configlog"
|
||||
@@ -68,6 +69,7 @@ func Server(cfg *config.Config) *cli.Command {
|
||||
Msg("Shutting down server")
|
||||
|
||||
cancel()
|
||||
os.Exit(1)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -74,6 +74,7 @@ func Server(cfg *config.Config) *cli.Command {
|
||||
Msg("Shutting down server")
|
||||
|
||||
cancel()
|
||||
os.Exit(1)
|
||||
})
|
||||
|
||||
debugServer, err := debug.Server(
|
||||
|
||||
@@ -95,6 +95,7 @@ func Server(cfg *config.Config) *cli.Command {
|
||||
Err(err).
|
||||
Msg("Shutting down server")
|
||||
cancel()
|
||||
os.Exit(1)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -95,6 +95,7 @@ func Server(cfg *config.Config) *cli.Command {
|
||||
Msg("Shutting down server")
|
||||
|
||||
cancel()
|
||||
os.Exit(1)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ package command
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/oklog/run"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config/configlog"
|
||||
@@ -88,6 +89,7 @@ func Server(cfg *config.Config) *cli.Command {
|
||||
Msg("Shutting down server")
|
||||
|
||||
cancel()
|
||||
os.Exit(1)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ import (
|
||||
"context"
|
||||
"crypto/tls"
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/oklog/run"
|
||||
|
||||
@@ -113,6 +114,7 @@ func Server(cfg *config.Config) *cli.Command {
|
||||
|
||||
natsServer.Shutdown()
|
||||
cancel()
|
||||
os.Exit(1)
|
||||
})
|
||||
|
||||
return gr.Run()
|
||||
|
||||
@@ -3,6 +3,7 @@ package command
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/cs3org/reva/v2/pkg/micro/ocdav"
|
||||
"github.com/cs3org/reva/v2/pkg/sharedconf"
|
||||
@@ -99,6 +100,7 @@ func Server(cfg *config.Config) *cli.Command {
|
||||
Str("server", c.Command.Name).
|
||||
Msg("Shutting down server")
|
||||
cancel()
|
||||
os.Exit(1)
|
||||
})
|
||||
|
||||
debugServer, err := debug.Server(
|
||||
|
||||
@@ -3,6 +3,7 @@ package command
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config/configlog"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/version"
|
||||
@@ -81,6 +82,7 @@ func Server(cfg *config.Config) *cli.Command {
|
||||
Msg("Shutting down server")
|
||||
|
||||
cancel()
|
||||
os.Exit(1)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -86,6 +86,7 @@ func Server(cfg *config.Config) *cli.Command {
|
||||
Err(err).
|
||||
Msg("Shutting down server")
|
||||
cancel()
|
||||
os.Exit(1)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"os"
|
||||
"time"
|
||||
|
||||
"github.com/go-chi/chi/v5"
|
||||
@@ -154,6 +155,7 @@ func Server(cfg *config.Config) *cli.Command {
|
||||
Msg("Shutting down server")
|
||||
|
||||
cancel()
|
||||
os.Exit(1)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ package command
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/oklog/run"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config/configlog"
|
||||
@@ -75,6 +76,7 @@ func Server(cfg *config.Config) *cli.Command {
|
||||
servers.Add(httpServer.Run, func(_ error) {
|
||||
logger.Info().Str("server", "http").Msg("Shutting down server")
|
||||
cancel()
|
||||
os.Exit(1)
|
||||
})
|
||||
|
||||
// prepare a gRPC server and add it to the group run.
|
||||
@@ -90,6 +92,7 @@ func Server(cfg *config.Config) *cli.Command {
|
||||
servers.Add(grpcServer.Run, func(_ error) {
|
||||
logger.Info().Str("server", "grpc").Msg("Shutting down server")
|
||||
cancel()
|
||||
os.Exit(1)
|
||||
})
|
||||
|
||||
// prepare a debug server and add it to the group run.
|
||||
|
||||
@@ -74,6 +74,7 @@ func Server(cfg *config.Config) *cli.Command {
|
||||
Msg("Shutting down server")
|
||||
|
||||
cancel()
|
||||
os.Exit(1)
|
||||
})
|
||||
|
||||
debugServer, err := debug.Server(
|
||||
|
||||
@@ -61,6 +61,7 @@ func Server(cfg *config.Config) *cli.Command {
|
||||
Msg("Shutting down server")
|
||||
|
||||
cancel()
|
||||
os.Exit(1)
|
||||
})
|
||||
|
||||
debugServer, err := debug.Server(
|
||||
|
||||
@@ -61,6 +61,7 @@ func Server(cfg *config.Config) *cli.Command {
|
||||
Msg("Shutting down server")
|
||||
|
||||
cancel()
|
||||
os.Exit(1)
|
||||
})
|
||||
|
||||
debugServer, err := debug.Server(
|
||||
|
||||
@@ -61,6 +61,7 @@ func Server(cfg *config.Config) *cli.Command {
|
||||
Msg("Shutting down server")
|
||||
|
||||
cancel()
|
||||
os.Exit(1)
|
||||
})
|
||||
|
||||
debugServer, err := debug.Server(
|
||||
|
||||
@@ -63,6 +63,7 @@ func Server(cfg *config.Config) *cli.Command {
|
||||
Msg("Shutting down server")
|
||||
|
||||
cancel()
|
||||
os.Exit(1)
|
||||
})
|
||||
|
||||
debugServer, err := debug.Server(
|
||||
|
||||
@@ -3,6 +3,7 @@ package command
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/oklog/run"
|
||||
|
||||
@@ -75,6 +76,7 @@ func Server(cfg *config.Config) *cli.Command {
|
||||
Msg("Shutting down server")
|
||||
|
||||
cancel()
|
||||
os.Exit(1)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ package command
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/oklog/run"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config/configlog"
|
||||
@@ -73,6 +74,7 @@ func Server(cfg *config.Config) *cli.Command {
|
||||
Msg("Shutting down server")
|
||||
|
||||
cancel()
|
||||
os.Exit(1)
|
||||
})
|
||||
|
||||
server, err := debug.Server(
|
||||
|
||||
@@ -3,6 +3,7 @@ package command
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/cs3org/reva/v2/pkg/events"
|
||||
"github.com/cs3org/reva/v2/pkg/events/stream"
|
||||
@@ -144,6 +145,7 @@ func Server(cfg *config.Config) *cli.Command {
|
||||
Msg("Shutting down server")
|
||||
|
||||
cancel()
|
||||
os.Exit(1)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -74,6 +74,7 @@ func Server(cfg *config.Config) *cli.Command {
|
||||
Msg("Shutting down server")
|
||||
|
||||
cancel()
|
||||
os.Exit(1)
|
||||
})
|
||||
|
||||
debugServer, err := debug.Server(
|
||||
|
||||
@@ -93,6 +93,7 @@ func Server(cfg *config.Config) *cli.Command {
|
||||
Msg("Shutting down server")
|
||||
|
||||
cancel()
|
||||
os.Exit(1)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ package command
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/oklog/run"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config/configlog"
|
||||
@@ -83,6 +84,7 @@ func Server(cfg *config.Config) *cli.Command {
|
||||
Msg("Shutting down server")
|
||||
|
||||
cancel()
|
||||
os.Exit(1)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ package command
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/oklog/run"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config/configlog"
|
||||
@@ -96,6 +97,7 @@ func Server(cfg *config.Config) *cli.Command {
|
||||
Msg("Shutting down server")
|
||||
|
||||
cancel()
|
||||
os.Exit(1)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user