bitflicker64 commented on code in PR #3189:
URL: https://github.com/apache/hugegraph/pull/3189#discussion_r3952113182


##########
docker/docker-compose-hstore.yml:
##########
@@ -117,7 +120,7 @@ services:
       - "${HUBBLE_PUBLISH_HOST:-127.0.0.1}:8088:8088"
     volumes:
       - hubble-data:/hubble/data
-      - 
./conf/hubble/hstore.properties:/hubble/conf/hugegraph-hubble.properties:ro
+      - 
./conf/hubble/hstore.local.properties:/hubble/conf/hugegraph-hubble.properties:ro

Review Comment:
   Fixed in `25bcb539b`. Both Hubble mounts, here and in 
`docker-compose-3pd-3store-3server.yml`, use the long syntax with 
`create_host_path: false`, so Compose refuses to start instead of inventing an 
empty directory at the path. The comment records that the file comes from 
`set-hubble-pd-password.sh` and is gitignored. `test-compose.sh` covers the 
missing-file case.



##########
hugegraph-server/hugegraph-dist/src/assembly/static/bin/wait-storage.sh:
##########
@@ -39,7 +39,33 @@ log() {
   echo "[wait-storage] $1"
 }
 
-PD_AUTH_ARGS="-u ${PD_AUTH_USER:-store}:${PD_AUTH_PASSWORD:-admin}"
+# PD REST credential. PD checks the password against its auth.secret-key and
+# ships no default, so this has to be provided by the deployment.
+# The value is deliberately kept out of the inner script's source text and out
+# of curl's argv: the inner shell reads it from the environment and hands it to
+# curl on stdin as a config file.
+PD_AUTH_USER="${PD_AUTH_USER:-store}"
+PD_AUTH_PASSWORD="${PD_AUTH_PASSWORD:-}"
+if [ -z "${PD_AUTH_PASSWORD}" ]; then
+  log "WARN: PD_AUTH_PASSWORD is empty; PD will answer 401 unless it runs 
without auth"

Review Comment:
   Fixed in `63a54e972`. The warning moved into the branch that actually polls 
PD, so the standalone RocksDB topology no longer logs a PD credential warning 
two lines before saying it is skipping the storage wait.



##########
hugegraph-server/hugegraph-dist/src/assembly/static/bin/wait-storage.sh:
##########
@@ -114,12 +150,21 @@ if env | grep '^hugegraph\.' > /dev/null; then
               }
 
               until PD_REST=\$(check_any_pd_stores); do
+                if [ \$? -eq 2 ]; then exit 2; fi

Review Comment:
   Fixed in `63a54e972`. The status is captured as the opening statement and 
the branch reads the copy:
   
   ```bash
   rc=$?
   if [ "$rc" -eq 2 ]; then exit 2; fi
   ```
   
   with a comment saying it has to stay first, since anything inserted in front 
would overwrite `$?` and turn the 401 abort back into a 300 second retry. 
`test-wait-storage.sh` still passes, including the 401-aborts-without-retry 
case.



-- 
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]

Reply via email to