mirror of
https://github.com/owncloud/ocis
synced 2026-04-25 17:25:21 +02:00
enhancement: log effective data and config paths at startup
Log the resolved OCIS_BASE_DATA_PATH and OCIS_CONFIG_DIR at startup so operators can immediately see where data is being written. This catches misconfigured Docker volume mounts where data silently falls back to ~/.ocis inside the container instead of /var/lib/ocis. Fixes: #12044 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
10
changelog/unreleased/fix-log-data-path-at-startup.md
Normal file
10
changelog/unreleased/fix-log-data-path-at-startup.md
Normal file
@@ -0,0 +1,10 @@
|
||||
Enhancement: Log effective data and config paths at startup
|
||||
|
||||
oCIS now logs the effective data path and config path at startup so
|
||||
operators can immediately verify that data is written to the expected
|
||||
location. This helps catch misconfigured Docker volume mounts where
|
||||
data silently falls back to an ephemeral container path instead of
|
||||
the intended persistent mount.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/XXXX
|
||||
https://github.com/owncloud/ocis/issues/12044
|
||||
@@ -27,6 +27,7 @@ import (
|
||||
"github.com/thejerf/suture/v4"
|
||||
|
||||
ociscfg "github.com/owncloud/ocis/v2/ocis-pkg/config"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config/defaults"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/log"
|
||||
ogrpc "github.com/owncloud/ocis/v2/ocis-pkg/service/grpc"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/shared"
|
||||
@@ -370,6 +371,13 @@ func Start(ctx context.Context, o ...Option) error {
|
||||
return err
|
||||
}
|
||||
|
||||
// Log the effective data and config paths at startup so operators can
|
||||
// verify that data is written to the expected location.
|
||||
s.Log.Info().
|
||||
Str("data_path", defaults.BaseDataPath()).
|
||||
Str("config_path", defaults.BaseConfigPath()).
|
||||
Msg("effective data and config paths")
|
||||
|
||||
// cancel the context when a signal is received.
|
||||
var cancel context.CancelFunc = func() {}
|
||||
if ctx == nil {
|
||||
|
||||
Reference in New Issue
Block a user