diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2478ef6..02e1990 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -43,7 +43,7 @@ jobs: ./scripts/clean_legacy.sh - name: Upload Artifact - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 if: ${{ success() }} || ${{ failure() }} with: name: legacy-result @@ -89,7 +89,7 @@ jobs: ./scripts/clean_kafka.sh - name: Upload Artifact - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 if: ${{ success() }} || ${{ failure() }} with: name: kafka-result @@ -135,7 +135,7 @@ jobs: ./scripts/clean_hornbill.sh - name: Upload Artifact - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 if: ${{ success() }} || ${{ failure() }} with: name: hornbill-result diff --git a/.github/workflows/ci_repo_dispatch.yml b/.github/workflows/ci_repo_dispatch.yml index 4367339..ccaaaef 100644 --- a/.github/workflows/ci_repo_dispatch.yml +++ b/.github/workflows/ci_repo_dispatch.yml @@ -40,7 +40,7 @@ jobs: ./scripts/clean_legacy.sh - name: Upload Artifact - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 if: ${{ success() }} || ${{ failure() }} with: name: legacy-result @@ -101,7 +101,7 @@ jobs: ./scripts/clean_kafka.sh - name: Upload Artifact - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 if: ${{ success() }} || ${{ failure() }} with: name: kafka-result diff --git a/.github/workflows/ci_repo_dispatch_hornbill.yml b/.github/workflows/ci_repo_dispatch_hornbill.yml index cbd7dee..dfce2f4 100644 --- a/.github/workflows/ci_repo_dispatch_hornbill.yml +++ b/.github/workflows/ci_repo_dispatch_hornbill.yml @@ -40,7 +40,7 @@ jobs: ./scripts/clean_hornbill.sh - name: Upload Artifact - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 if: ${{ success() }} || ${{ failure() }} with: name: hornbill-result diff --git a/docker/meta-hornbill/start-meta.sh b/docker/meta-hornbill/start-meta.sh index c483abc..738970b 100644 --- a/docker/meta-hornbill/start-meta.sh +++ b/docker/meta-hornbill/start-meta.sh @@ -4,10 +4,11 @@ while ! fdbcli -C /etc/fdb.cluster --exec "tenant get hstream" --timeout 1 ; do sleep 1; done -/usr/local/bin/hstream-meta-server --host 0.0.0.0 \ - --port 8964 \ - --log-level trace \ - --log-with-color \ - --log-flush-immediately \ - --backend /etc/fdb.cluster \ - >> /tmp/$HOSTNAME.log 2>&1 +/usr/local/bin/hornbill meta \ + --host 0.0.0.0 \ + --port 8964 \ + --log-level trace \ + --log-with-color \ + --log-flush-immediately \ + --backend /etc/fdb.cluster \ + >> /tmp/$HOSTNAME.log 2>&1 diff --git a/docker/node-hornbill/start-server.sh b/docker/node-hornbill/start-server.sh index 871dbe6..7719f5d 100644 --- a/docker/node-hornbill/start-server.sh +++ b/docker/node-hornbill/start-server.sh @@ -10,7 +10,7 @@ done SERVER_ID=$(echo $(hostname) | cut -c 2-) # n_i -> i MY_IP=$(hostname -I | head -n1 | awk '{print $1;}') -/usr/local/bin/hstream-server \ +/usr/local/bin/hornbill server \ --bind-address 0.0.0.0 \ --port 9092 \ --metrics-port 6600 \ diff --git a/src/jepsen/hstream/kafka/db/hornbill.clj b/src/jepsen/hstream/kafka/db/hornbill.clj index 2716fb4..7e93249 100644 --- a/src/jepsen/hstream/kafka/db/hornbill.clj +++ b/src/jepsen/hstream/kafka/db/hornbill.clj @@ -4,14 +4,11 @@ [jepsen.control :as c] [jepsen.control.util :as cu] [jepsen.hstream.kafka.db :as redpanda.db] - [jepsen.hstream.common.utils :refer [parse-int]] - [jepsen.hstream.legacy.nemesis :as legacy-nemesis])) + [jepsen.hstream.common.utils :refer [parse-int]])) (def hornbill - "Program that launches hornbill server. - WARNING: This module refers to jepsen.hstream.legacy.nemesis, - which hardcodes the server name as 'hstream-server'." - "/usr/local/bin/hstream-server") + "Program that launches hornbill server." + "/usr/local/bin/hornbill") (def node-ips {:n1 "172.20.0.11" @@ -34,7 +31,8 @@ (defn f-hornbill-args "Generate the arguments for hornbill server." [node] - [:--bind-address "0.0.0.0" + [:server + :--bind-address "0.0.0.0" :--port 9092 :--metrics-port 6600 :--advertised-address (node-ips (keyword node)) @@ -45,6 +43,18 @@ :--log-with-color ]) +;; FIXME: move to a standalone module to support hornbill nemesis +(defn is-hornbill-server-on-node-dead? + [node] + (try+ + (let [shell-out (c/on node + (c/exec* "pgrep" "-f" "hornbill server" "||" "true"))] + (empty? shell-out)) + (catch Object _ + (info "Failed to check death on" node ":" (:message &throw-context) + "I think it is already dead.") + true))) + (defn db "Hornbill for a particular version. No action is executed after the DB is ready." [version tcpdump] @@ -65,11 +75,10 @@ ;; WARNING: Starting hstream server is not idempotent now. ;; However, the test usually call [:start :all]. ;; So we have to check if the server is already running. - ;; FIXME: The checking function 'is-hserver-on-node-dead?' is not + ;; FIXME: The checking function 'is-hornbill-server-on-node-dead?' is not ;; well implemented... - ;; FIXME: Remove dependency on legacy-nemesis (start! [this test node] - (if (legacy-nemesis/is-hserver-on-node-dead? node) + (if (is-hornbill-server-on-node-dead? node) (c/su (apply (partial cu/start-daemon! {:logfile (f-hornbill-log-file node)