vaijosh commented on code in PR #3253:
URL: https://github.com/apache/hugegraph/pull/3253#discussion_r4141522236
##########
hugegraph-pd/hg-pd-dist/src/assembly/static/bin/start-hugegraph-pd.sh:
##########
@@ -30,14 +30,19 @@ if [ -z "$DAEMON" ]; then
DAEMON="true"
fi
-while getopts "d:g:j:y:" arg; do
+while getopts "c:d:g:i:j:l:o:y:" arg; do
case ${arg} in
+ c) CONF_OVERRIDE="$OPTARG" ;;
g) GC_OPTION="$OPTARG" ;;
+ i) PID_FILE_OVERRIDE="$OPTARG" ;;
j) USER_OPTION="$OPTARG" ;;
+ l) LOGS_OVERRIDE="$OPTARG" ;;
+ o) PLUGINS_OVERRIDE="$OPTARG" ;;
Review Comment:
## 🚫 Blocking: Plugin classpath is silently broken by the override
`hugegraph-server/hugegraph-dist/src/assembly/static/bin/hugegraph-server.sh` —
specifically the `PLUGINS=` assignment and the `find -L $PLUGINS` classpath
logic.
### Evidence
`$TOP/plugins` currently has two separate responsibilities:
1. It is the conventional location where packaged or admin-installed plugin
JARs are discovered **recursively** for both server startup and `init-store.sh`.
2. It is also used as the location for runtime artifacts, such as the
OpenTelemetry agent, which are downloaded at runtime.
This PR makes the entire directory writable/overridable. As a result, `-o
<dir>` effectively replaces `$TOP/plugins` for **both** responsibilities.
The script still calls `ensure_path_writable "$PLUGINS"`. Therefore, on a
read-only installation, operators are required to provide `-o`, at which point
the existing `$TOP/plugins` directory is no longer included in the classpath.
### Impact
This is particularly problematic for the **read-only installation scenario
that this PR targets**:
* Existing backend, serializer, analyzer, or other `HugeGraphPlugin` JARs
under `$TOP/plugins` are silently excluded from the classpath.
* `Server` or `init-store.sh` may fail with `ClassNotFoundException`, or the
service may start with missing functionality.
* Operators would have to copy the complete plugin set into the external
directory and keep it synchronized with every HugeGraph release. This behavior
is currently not documented.
* Recursively adding the writable directory to the application classpath
also means that downloaded runtime artifacts such as the OpenTelemetry agent
JAR can unintentionally become part of the application classpath, in addition
to being specified through `-javaagent`.
### Requested Fix
Can we get rid of this PLUGINS_OVERRIDE option and find other way to fix the
permission issues if any?
--
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]