Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update pman to 7406747552bc #1481

Closed
wants to merge 1 commit into from
Closed

Update pman to 7406747552bc #1481

wants to merge 1 commit into from

Conversation

refs
Copy link
Member

@refs refs commented Jan 25, 2021

Note

This will be the latest PR regarding the runtime that requires refs/pman. The runtime will be moved to owncloud/ocis/ocis.

Pman's changelog:

source

  • pman now catches SIGHUP, preventing leaving zombie processes when losing control of a terminal
  • encountered the good old halting problem with the way ocis initializes extensions. A bandaid is a time.Sleep added to delay shutdown and wait for the last write. Logically, there is a case scenario when writers write (or, fail to write) after the shutdown reads and deletes entries, ending up in an empty db file and an orphan process.
  • fixes Panic on server start #1173 by a global recovery handler.
  • adds support for setting RUNTIME_PORT on your environment. NOTE: When combined with oCIS it requires changes in the source, as currently the runtime port is hardcoded in oCIS to 10666
  • no more file management for tracking extension+PID tuples.

While the sync solution is only a bandaid and a more robust solution is due, we'll get this rolling first, track it and move along while is not an issue. It needs to be tested in slow machines.

This has been tested with the following diff on oCIS:

diff --git a/ocis/go.mod b/ocis/go.mod
index bda423ae..dfbf75c9 100644
--- a/ocis/go.mod
+++ b/ocis/go.mod
@@ -39,6 +39,7 @@ require (
 
 replace (
 	github.com/gomodule/redigo => github.com/gomodule/redigo v1.8.2
+	github.com/refs/pman => ../../../refs/pman
 	github.com/owncloud/ocis/accounts => ../accounts
 	github.com/owncloud/ocis/glauth => ../glauth
 	github.com/owncloud/ocis/konnectd => ../konnectd
diff --git a/ocis/go.sum b/ocis/go.sum
index a67c3209..0adb6770 100644
--- a/ocis/go.sum
+++ b/ocis/go.sum
@@ -1279,6 +1279,7 @@ github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81P
 github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
 github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0=
 github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
+github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
 github.com/studio-b12/gowebdav v0.0.0-20200303150724-9380631c29a1 h1:TPyHV/OgChqNcnYqCoCvIFjR9TU60gFXXBKnhOBzVEI=
 github.com/studio-b12/gowebdav v0.0.0-20200303150724-9380631c29a1/go.mod h1:gCcfDlA1Y7GqOaeEKw5l9dOGx1VLdc/HuQSlQAaZ30s=
 github.com/subosito/gotenv v1.1.1/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw=
diff --git a/ocis/pkg/runtime/runtime.go b/ocis/pkg/runtime/runtime.go
index de5061a4..711f377d 100644
--- a/ocis/pkg/runtime/runtime.go
+++ b/ocis/pkg/runtime/runtime.go
@@ -80,10 +80,12 @@ func New(cfg *config.Config) Runtime {
 // Start rpc runtime
 func (r *Runtime) Start() error {
 	go r.Launch()
-	return service.Start()
+	return service.Start(
+		service.WithLogPretty(r.c.Log.Pretty),
+	)
 }
 
-// Launch ocis default ocis extensions.
+// Launch oCIS default extensions.
 func (r *Runtime) Launch() {
 	var client *rpc.Client
 	var err error

Gotchas

  • Note that if the runtime (a.k.a process thst runs ocis server is killed with SIGKILL children processes will be left orphan)
  • If spamming starting a server and interrupting the startup, sometimes a race condition-like scenario happens.

@update-docs
Copy link

update-docs bot commented Jan 25, 2021

Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes.

@refs
Copy link
Member Author

refs commented Jan 25, 2021

superseded by #1483

@refs refs closed this Jan 25, 2021
@refs refs deleted the update-pman branch July 1, 2021 15:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Panic on server start
1 participant