Repository navigation
Commit f6ba3ed
feat(config): support multiple memcached servers via OWNCLOUD_MEMCACHED_SERVERS (#517)
* feat(config): support multiple memcached servers via OWNCLOUD_MEMCACHED_SERVERS
The memcached config block hard-coded a single [host, port] pair built
from OWNCLOUD_MEMCACHED_HOST / OWNCLOUD_MEMCACHED_PORT, with no way to
define multiple servers or per-server weights that core's
'memcached_servers' supports.
Add OWNCLOUD_MEMCACHED_SERVERS, a JSON-encoded list of [host, port] or
[host, port, weight] tuples, reusing the json_decode pattern already used
for OWNCLOUD_LOG_CONDITIONS. It overrides the single-server pair when set
and falls back to it when unset or when the JSON is invalid, so existing
deployments are unaffected. Added to v24.04 only, matching the convention
that v20.04/v22.04 are frozen.
The container startup readiness probe (wait-for-it in 15-database.sh)
still targets HOST:PORT only and is intentionally left unchanged.
Closes #489
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com>
* fix(memcached): skip startup wait when OWNCLOUD_MEMCACHED_SERVERS is set
The startup wait in 15-database.sh probed OWNCLOUD_MEMCACHED_HOST:PORT
whenever memcached was enabled and exited on timeout. With
OWNCLOUD_MEMCACHED_SERVERS set (and HOST left at its default), the
container could fail to start even though the configured servers are
reachable.
Guard the wait with `&& [[ ${OWNCLOUD_MEMCACHED_SERVERS} == "" ]]`,
mirroring how the redis wait is skipped when OWNCLOUD_REDIS_SEEDS is set.
Also drop the now-inaccurate ENVIRONMENT.md note that described the old
probing behaviour as a caveat of the new variable.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com>
---------
Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>1 parent 12b306c commit f6ba3ed
4 files changed
Lines changed: 26 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
14 | 17 | | |
15 | 18 | | |
16 | 19 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
227 | 227 | | |
228 | 228 | | |
229 | 229 | | |
| 230 | + | |
| 231 | + | |
230 | 232 | | |
231 | 233 | | |
232 | 234 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
| 34 | + | |
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
906 | 906 | | |
907 | 907 | | |
908 | 908 | | |
| 909 | + | |
| 910 | + | |
| 911 | + | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
| 923 | + | |
| 924 | + | |
| 925 | + | |
| 926 | + | |
| 927 | + | |
909 | 928 | | |
910 | 929 | | |
911 | 930 | | |
912 | 931 | | |
913 | | - | |
914 | | - | |
915 | | - | |
916 | | - | |
917 | | - | |
918 | | - | |
| 932 | + | |
919 | 933 | | |
920 | 934 | | |
921 | 935 | | |
| |||
0 commit comments