Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(connectivity): zbctl port command #113

Merged
merged 4 commits into from
Dec 9, 2024
Merged

fix(connectivity): zbctl port command #113

merged 4 commits into from
Dec 9, 2024

Conversation

leiicamundi
Copy link
Contributor

The custom port wasn't working as expected

@leiicamundi leiicamundi requested a review from Langleu December 6, 2024 13:22
@leiicamundi leiicamundi self-assigned this Dec 6, 2024
@leiicamundi leiicamundi added the bug Something isn't working label Dec 6, 2024
Copy link
Member

@Langleu Langleu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wouldn't it have been easier to just use ZEEBE_ADDRESS instead of ZEEBE_HOST?

ZEEBE_ADDRESS describes exactly the meaning of what's expected by ZEEBE_HOST in this script.

This would also not require you to do any cut commands or whatever but just use what's upstream available.

Either one uses ZEEBE_ADRESS = 127.0.0.1:26500 (IP:port) or uses ZEEBE_HOST = 127.0.0.1 and ZEEBE_PORT = 26500.

Currently it's a weird mix of having all 3 defined in various different states that they're not supposed to be.

README.md Outdated Show resolved Hide resolved
Copy link
Member

@Langleu Langleu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As long as no one defines ZEEBE_HOST as env var should work properly as expected.
Now the good thing is also that if ZEEBE_ADDRESS (env var) differs from the input, the input would overwrite the env var in zbctl.

@leiicamundi
Copy link
Contributor Author

Based on your suggestion, I've enforced empty ZEEBE_HOST and ZEEBE_PORT for the check.
I've tested the output and it works as expected:

╰─λ ./checks/zeebe/connectivity.sh -H localhost:26500 -k                           4 (1.693s) < 18:22:24
[INFO] Checking HTTP/2 connectivity to localhost:26500
[INFO] Running command: curl -so /dev/null --http2 -k "https://localhost:26500"
[FAIL] HTTP/2 connectivity
[INFO] Downloading gateway.proto for zeebe=8.6.5...
[INFO] Running command: curl -f "https://raw.githubusercontent.com/camunda/zeebe/8.6.5/zeebe/gateway-protocol/src/main/proto/gateway.proto" -o "gateway.proto"
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 38645  100 38645    0     0   536k      0 --:--:-- --:--:-- --:--:--  539k
[INFO] Successfuly downloaded proto file for Zeebe=8.6.5
[INFO] Checking gRPC connectivity to localhost:26500
[INFO] Running command: grpcurl -insecure -proto "gateway.proto" "localhost:26500" gateway_protocol.Gateway/Topology
Failed to dial target host "localhost:26500": tls: first record does not look like a TLS handshake
[FAIL] gRPC connectivity
[INFO] Checking zbctl status to localhost:26500...
[INFO] Running command: ZEEBE_TOKEN_SCOPE=camunda-identity ZEEBE_ADDRESS=localhost:26500 ZEEBE_HOST= ZEEBE_PORT= zbctl status --authzUrl "" --clientId "" --clientSecret "" --audience "" --insecure
Cluster size: 3
Partitions count: 3
Replication factor: 3
Gateway version: 8.7.0-alpha2
Brokers:
  Broker 0 - camunda-zeebe-0.camunda-core:26501
    Version: 8.7.0-alpha2
    Partition 1 : Leader, Healthy
    Partition 2 : Follower, Healthy
    Partition 3 : Leader, Healthy
  Broker 1 - camunda-zeebe-1.camunda-core:26501
    Version: 8.7.0-alpha2
    Partition 1 : Follower, Healthy
    Partition 2 : Leader, Healthy
    Partition 3 : Follower, Healthy
  Broker 2 - camunda-zeebe-2.camunda-core:26501
    Version: 8.7.0-alpha2
    Partition 1 : Follower, Healthy
    Partition 2 : Follower, Healthy
    Partition 3 : Follower, Healthy

[OK] zbctl status
[FAIL] ./checks/zeebe/connectivity.sh: At least one of the tests failed (error code: 5).

@leiicamundi leiicamundi merged commit d3767a0 into main Dec 9, 2024
4 checks passed
@leiicamundi leiicamundi deleted the fix/zbctlport branch December 9, 2024 17:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants