diff --git a/CHANGELOG.md b/CHANGELOG.md index 07739a39ef..2c8b814573 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ The following sections list the changes for unreleased. ## Summary * Bugfix - Fix STORAGE_METADATA_ROOT default value override: [#1956](https://github.com/owncloud/ocis/pull/1956) +* Bugfix - Stop the supervisor if a service fails to start: [#1963](https://github.com/owncloud/ocis/pull/1963) ## Details @@ -16,6 +17,14 @@ The following sections list the changes for unreleased. been. This patch ensures the correct loading order of values. https://github.com/owncloud/ocis/pull/1956 + +* Bugfix - Stop the supervisor if a service fails to start: [#1963](https://github.com/owncloud/ocis/pull/1963) + + Steps to make the supervisor fail: + + `PROXY_HTTP_ADDR=0.0.0.0:9144 bin/ocis server` + + https://github.com/owncloud/ocis/pull/1963 # Changelog for [1.5.0] (2021-04-21) The following sections list the changes for 1.5.0. diff --git a/changelog/unreleased/stop-supervisor-if-failure.md b/changelog/unreleased/stop-supervisor-if-failure.md new file mode 100644 index 0000000000..8bccf7a53d --- /dev/null +++ b/changelog/unreleased/stop-supervisor-if-failure.md @@ -0,0 +1,7 @@ +Bugfix: Stop the supervisor if a service fails to start + +Steps to make the supervisor fail: + +`PROXY_HTTP_ADDR=0.0.0.0:9144 bin/ocis server` + +https://github.com/owncloud/ocis/pull/1963 diff --git a/docs/ocis/getting-started/_index.md b/docs/ocis/getting-started/_index.md index 3b83d83c5d..8664c2a3d9 100644 --- a/docs/ocis/getting-started/_index.md +++ b/docs/ocis/getting-started/_index.md @@ -20,11 +20,11 @@ You can find the latest official release of oCIS at [our download mirror](https: The latest build from the master branch can be found at [our download mirrors testing section](https://download.owncloud.com/ocis/ocis/testing/). To run oCIS as binary you need to download it first and then run the following commands. -For this example, assuming version 1.4.0 of oCIS running on a Linux AMD64 host: +For this example, assuming version 1.5.0 of oCIS running on a Linux AMD64 host: ```console # download -curl https://download.owncloud.com/ocis/ocis/1.4.0/ocis-1.4.0-linux-amd64 --output ocis +curl https://download.owncloud.com/ocis/ocis/1.5.0/ocis-1.5.0-linux-amd64 --output ocis # make binary executable chmod +x ocis diff --git a/docs/ocis/release_notes.md b/docs/ocis/release_notes.md index 3461fde791..1caff44dcd 100644 --- a/docs/ocis/release_notes.md +++ b/docs/ocis/release_notes.md @@ -7,6 +7,26 @@ geekdocEditPath: edit/master/docs/ocis geekdocFilePath: release_notes.md --- +## ownCloud Infinite Scale 1.5.0 Technology Preview + +Version 1.5.0 is a maintenance release for the Infinite Scale backend with a number of bug fixes and smaller improvements. For ownCloud Web it brings further accessibility improvements and a whole bunch of new features. The web interface can now be branded and there is a new, dedicated view in the left sidebar to list all link shares of a user. + +The most prominent changes in version 1.5.0 comprise: + +- Config file based theming for ownCloud Web (see https://owncloud.dev/clients/web/theming/ for more information) [#4822](https://github.com/owncloud/web/pull/4822) +- A dedicated view for "Shared by link" has been added [#4881](https://github.com/owncloud/web/pull/4881) +- The file list table has been replaced and is now more performant and accessible [#4627](https://github.com/owncloud/web/pull/4627) +- Many further accessibility improvements have been added, e.g., around the app switcher, sidebar, sharing list and focus management +- User storage quotas will now be enforced [#1557](https://github.com/cs3org/reva/pull/1557) +- The "owncloud" storage driver now supports file integrity checking with checksums [#1629](https://github.com/cs3org/reva/pull/1629) + +You can also read the full [ownCloud Infinite Scale changelog](https://github.com/owncloud/ocis/blob/master/CHANGELOG.md) and [ownCloud Web changelog](https://github.com/owncloud/web/blob/master/CHANGELOG.md) for further details on what has changed. + +### Breaking changes +{{< hint warning >}} +We are currently in a Tech Preview state and breaking changes may occur at any time. For more information see our [release roadmap]({{< ref "./release_roadmap" >}}) +{{< /hint >}} + ## ownCloud Infinite Scale 1.4.0 Technology Preview Version 1.4.0 brings new features, bug fixes and further improvements. The accessibility of ownCloud Web has greatly improved, paving the way for WCAG 2.1 compliance. The Infinite Scale platform has received major improvements regarding memory consumption. The user storage quota feature has been implemented and folder sizes are now properly calculated. It is now possible to write log messages to log files and to specify configuration values using a config file. diff --git a/ocis/pkg/runtime/service/service.go b/ocis/pkg/runtime/service/service.go index cfab669058..268d7473fd 100644 --- a/ocis/pkg/runtime/service/service.go +++ b/ocis/pkg/runtime/service/service.go @@ -123,16 +123,32 @@ func Start(o ...Option) error { return err } + // halt listens for interrupt signals and blocks. + halt := make(chan os.Signal, 1) + signal.Notify(halt, syscall.SIGINT, syscall.SIGTERM, syscall.SIGQUIT, syscall.SIGHUP) + // notify goroutines that they are running on supervised mode s.cfg.Mode = ociscfg.SUPERVISED setMicroLogger() + // tolerance controls backoff cycles from the supervisor. + tolerance := 5 + totalBackoff := 0 + // Start creates its own supervisor. Running services under `ocis server` will create its own supervision tree. s.Supervisor = suture.New("ocis", suture.Spec{ EventHook: func(e suture.Event) { + if e.Type() == suture.EventTypeBackoff { + totalBackoff++ + if totalBackoff == tolerance { + halt <- os.Interrupt + } + } s.Log.Info().Str("event", e.String()).Msg(fmt.Sprintf("supervisor: %v", e.Map()["supervisor_name"])) }, + FailureThreshold: 5, + FailureBackoff: 3 * time.Second, }) // reva storages have their own logging. For consistency sake the top level logging will cascade to reva. @@ -148,10 +164,6 @@ func Start(o ...Option) error { } rpc.HandleHTTP() - // halt listens for interrupt signals and blocks. - halt := make(chan os.Signal, 1) - signal.Notify(halt, syscall.SIGINT, syscall.SIGTERM, syscall.SIGQUIT, syscall.SIGHUP) - l, err := net.Listen("tcp", net.JoinHostPort(s.cfg.Runtime.Host, s.cfg.Runtime.Port)) if err != nil { s.Log.Fatal().Err(err)