bitflicker64 commented on code in PR #3253:
URL: https://github.com/apache/hugegraph/pull/3253#discussion_r4164016551
##########
hugegraph-server/hugegraph-dist/src/assembly/static/bin/hugegraph-server.sh:
##########
@@ -34,11 +34,11 @@ fi
BIN=$(abs_path)
TOP="$(cd "$BIN"/../ && pwd)"
-CONF="$TOP/conf"
+CONF="${CONF_OVERRIDE:-$TOP/conf}"
Review Comment:
Important: The Server `-c` override stops at the launcher, so the conf dir
the operator passes is only partly used.
1. `init-store.sh` is unchanged: line 30 still sets `CONF="$TOP/conf"` and
line 58 runs `InitStore "${CONF}"/rest-server.properties`. The PR description
lists init scripts as covered, but there is no way to point init at the
external conf. An operator who keeps config in `/etc/hugegraph` and starts with
`-c /etc/hugegraph` initializes the backend and admin user from the install's
stock conf, then starts the server against a backend that was never initialized
(or fails init outright on a read-only install, since the stock RocksDB paths
are relative to `$TOP`).
2. The stock `rest-server.properties` has `graphs=./conf/graphs`, and this
script runs `cd "${TOP}"` at line 91 before Java starts. HugeGraphServer,
GraphManager and InitStore read `ServerOptions.GRAPHS` relative to the working
directory, so a copied conf dir passed with `-c` still loads
`$TOP/conf/graphs/*.properties`. Edits to
`/etc/hugegraph/graphs/hugegraph.properties` are silently ignored.
Please add the same `-c` / `CONF_OVERRIDE` handling to `init-store.sh`, and
either resolve a relative `graphs` value against `$CONF` when an override is
set or reject a relative `graphs` path with a clear error, and document that
the external conf dir needs its own `graphs` path.
##########
hugegraph-server/hugegraph-dist/src/assembly/static/bin/hugegraph-server.sh:
##########
@@ -225,7 +226,6 @@ if [ "${OPEN_TELEMETRY}" == "true" ]; then
fi
fi
- # Note: remember update it if we change the jar
Review Comment:
Minor: This removes the `# Note: remember update it if we change the jar`
reminder above the pinned `expected_md5`, which is unrelated to the path
overrides. The PD script keeps the same note. Please restore it so the checksum
is not left stale on the next OpenTelemetry agent upgrade.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]