imbajin commented on code in PR #3119:
URL: https://github.com/apache/hugegraph/pull/3119#discussion_r3652917360
##########
hugegraph-server/hugegraph-dist/src/main/java/org/apache/hugegraph/cmd/InitStore.java:
##########
@@ -74,6 +74,20 @@ public static void main(String[] args) throws Exception {
RegisterUtil.registerServer();
HugeConfig restServerConfig = new HugeConfig(restConf);
+
+ // Skip local init only when the flag is *explicitly* false (Helm /
+ // HStore). Unset keeps master behavior: full standalone init-store.
+ // ServerOptions default is false for GraphManager; we do not treat
+ // "missing key" as skip so existing tarball users are not broken.
+ if (shouldSkipLocalInit(restServerConfig)) {
+ LOG.warn("Skipping init-store: '{}' is false in {}. "
+ + "Unset the property (or set true) to run local "
+ + "backend/admin init; distributed/Helm sets false.",
+ ServerOptions.GRAPH_LOAD_FROM_LOCAL_CONFIG.name(),
+ restConf);
+ return;
Review Comment:
⚠️ This early return also skips
`StandardAuthenticator.initAdminUserIfNeeded(restConf)` below. The Docker
entrypoint still handles a documented `PASSWORD` by enabling auth, piping that
password to `init-store.sh`, and then writing `docker/init_complete`; with
`HG_SERVER_LOAD_FROM_LOCAL_CONFIG=false`, the password is therefore consumed
without creating the admin. In PD mode startup instead uses `auth.admin_pa`
(default `pa`), so it still ignores the requested Docker credential. Please
preserve the authentication bootstrap while skipping only local backend
initialization, or explicitly reject/map this configuration combination, and
add coverage for `PASSWORD` together with
`HG_SERVER_LOAD_FROM_LOCAL_CONFIG=false`.
--
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]