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(docker): Use correct TOML syntax in Docker zebrad.toml #5320

Merged
merged 1 commit into from
Oct 4, 2022

Conversation

teor2345
Copy link
Contributor

@teor2345 teor2345 commented Oct 3, 2022

Motivation

The TOML syntax is still wrong in the Dockerfile.

(This time I'll leave the PR in draft until I've tested it.)

Solution

Comment out the disabled ports.

Testing

We need to run these commands in Google Cloud shell after the image has been built for this branch:

gcloud auth configure-docker us-docker.pkg.dev
docker run us-docker.pkg.dev/zealous-zebra/zebra/zebrad-test:sha-9023e17

Here is a full list of available images:
https://console.cloud.google.com/artifacts/docker/zealous-zebra/us/zebra/zebrad?project=zealous-zebra

Review

Anyone can review this PR, but @gustavovalverde reviewed the last one.

Reviewer Checklist

  • Will the PR name make sense to users?
    • Does it need extra CHANGELOG info? (new features, breaking changes, large changes)
  • Are the PR labels correct?
  • Does the code do what the ticket and PR says?
  • How do you know it works? Does it have tests?

@teor2345 teor2345 added C-bug Category: This is a bug A-devops Area: Pipelines, CI/CD and Dockerfiles P-Medium ⚡ I-usability Zebra is hard to understand or use labels Oct 3, 2022
@teor2345 teor2345 self-assigned this Oct 3, 2022
@gustavovalverde
Copy link
Member

Did PR #5313 failed when running? I tested that it ran but should this output any specific information or should we have a way to validate that the service is working and not just running.

Can we internally execute something as a curl command to a specific endpoint or something that gives us an "expected" output?

This is mainly to confirm if we have a way that the service started but it did it successfully.

@teor2345
Copy link
Contributor Author

teor2345 commented Oct 3, 2022

Did PR #5313 failed when running? I tested that it ran but should this output any specific information or should we have a way to validate that the service is working and not just running.

Can we internally execute something as a curl command to a specific endpoint or something that gives us an "expected" output?

This is mainly to confirm if we have a way that the service started but it did it successfully.

I ran these commands in Google Cloud Shell:

gcloud auth configure-docker us-docker.pkg.dev
docker run us-docker.pkg.dev/zealous-zebra/zebra/zebrad:sha-f71bb74

zebrad exited with a config parsing error.
Instead, it should log "Starting zebrad".

If we're looking to test for an open port, there's a Zcash listener on port 8233.
Or we can test for a successful start or end to the sync.

There are a lot of different acceptance tests in https://github.com/ZcashFoundation/zebra/blob/main/zebrad/tests/acceptance.rs

@teor2345 teor2345 marked this pull request as ready for review October 3, 2022 23:22
@teor2345 teor2345 requested a review from a team as a code owner October 3, 2022 23:22
@teor2345 teor2345 requested review from gustavovalverde and removed request for a team October 3, 2022 23:22
@teor2345
Copy link
Contributor Author

teor2345 commented Oct 3, 2022

@gustavovalverde it looks like we don't publish the zebrad image until we merge to main.

So I think we'll have to merge this PR, then check that the zebrad image works.
(I already checked the zebrad.toml manually.)

@gustavovalverde
Copy link
Member

zebrad exited with a config parsing error.

I should check this, it worries me that a failed zebrad start is not failing the container (for me, this is the expected behavior), but this might be related to how the process is being raised and if the Process ID is the first. I'll research that.

it looks like we don't publish the zebrad image until we merge to main

All PR images are available here: https://us-docker.pkg.dev/zealous-zebra/zebra/zebrad-test

The latest one from this PR is here: https://console.cloud.google.com/artifacts/docker/zealous-zebra/us/zebra/zebrad-test/sha256:b9f96bf73ec15b92fe69aba6febf472b8ad033792ed4a49c4622e46f80b6d977

With a docker pull us-docker.pkg.dev/zealous-zebra/zebra/zebrad-test:pr-5322 you should be able to test it

Copy link
Member

@gustavovalverde gustavovalverde left a comment

Choose a reason for hiding this comment

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

I'll label the PR so it's not automatically merged, but LGTM.

I'll leave the final testing to @teor2345

@gustavovalverde gustavovalverde added the do-not-merge Tells Mergify not to merge this PR label Oct 3, 2022
@teor2345
Copy link
Contributor Author

teor2345 commented Oct 4, 2022

it looks like we don't publish the zebrad image until we merge to main

All PR images are available here: https://us-docker.pkg.dev/zealous-zebra/zebra/zebrad-test

The latest one from this PR is here: https://console.cloud.google.com/artifacts/docker/zealous-zebra/us/zebra/zebrad-test/sha256:b9f96bf73ec15b92fe69aba6febf472b8ad033792ed4a49c4622e46f80b6d977

With a docker pull us-docker.pkg.dev/zealous-zebra/zebra/zebrad-test:pr-5322 you should be able to test it

That's the zebrad-test image, but I want to test the zebrad image. They have different contents and commands.

@teor2345 teor2345 removed the do-not-merge Tells Mergify not to merge this PR label Oct 4, 2022
mergify bot added a commit that referenced this pull request Oct 4, 2022
@mergify mergify bot merged commit 469c471 into main Oct 4, 2022
@mergify mergify bot deleted the fix-docker-toml branch October 4, 2022 02:51
@teor2345
Copy link
Contributor Author

teor2345 commented Oct 4, 2022

I tested the command:

teor@cloudshell:~$ docker run us-docker.pkg.dev/zealous-zebra/zebra/zebrad:main

It seems to work correctly now:

...
Digest: sha256:24378bce2f632d8e05bf6015df3ec3cbab7ebcda88a563c5de87e0f928f051ab
Status: Downloaded newer image for us-docker.pkg.dev/zealous-zebra/zebra/zebrad:main
...
2022-10-04T04:30:51.154345Z  INFO zebrad::application: Diagnostic Metadata:
version: 1.0.0-beta.15
Zcash network: Mainnet
state version: 25
target triple: x86_64-unknown-linux-gnu
build profile: release
2022-10-04T04:30:51.154398Z  INFO {net="Main"}: zebrad::application: initialized rayon thread pool for CPU-bound tasks num_threads=2
...
2022-10-04T04:30:51.154965Z  INFO {net="Main"}: zebrad::commands::start: Starting zebrad
2022-10-04T04:30:51.155069Z  INFO {net="Main"}: zebrad::commands::start: config=ZebradConfig { consensus: Config { checkpoint_sync: true, debug_skip_parameter_preload: false }, metrics: MetricsSection { endpoint_addr: None }, network: Config  listen_addr: 0.0.0.0:8233, network: Mainnet, initial_mainnet_peers: {"dnsseed.z.cash:8233", "dnsseed.str4d.xyz:8233", "mainnet.seeder.zfnd.org:8233", "mainnet.is.yolo.money:8233"}, initial_testnet_peers: {"dnsseed.testnet.z.cash:18233", "testnet.seeder.zfnd.org:18233", "testnet.is.yolo.money:18233"}, peerset_initial_target_size: 25, crawl_new_peer_interval: 61s }, state: Config { cache_dir: "/zebrad-cache", ephemeral: false, debug_stop_at_height: None, delete_old_database: true }, tracing: TracingSection { use_color: true, force_use_color: false, filter: None, buffer_limit: 128000, endpoint_addr: None, flamegraph: None, use_journald: false }, sync: SyncSection { download_concurrency_limit: 50, checkpoint_verify_concurrency_limit: 1200, full_verify_concurrency_limit: 20, parallel_cpu_threads: 0 }, mempool: Config { tx_cost_limit: 80000000, eviction_memory_time: 3600s, debug_enable_at_height: None }, rpc: Config { listen_addr: None, parallel_cpu_threads: 0, debug_force_finished_sync: false } }
2022-10-04T04:30:51.155165Z  INFO {net="Main"}: zebrad::commands::start: initializing node state
2022-10-04T04:30:51.155170Z  INFO {net="Main"}: zebrad::commands::start: opening database, this may take a couple minutes
2022-10-04T04:30:51.156855Z  INFO zebra_state::service::finalized_state::disk_db: the open file limit is high enough for Zebra current_limit=1048576 min_limit=512 ideal_limit=1024
2022-10-04T04:30:51.504642Z  INFO zebra_state::service::finalized_state::disk_db: Opened Zebra state cache at /zebrad-cache/state/v25/mainnet
...
2022-10-04T04:30:51.509768Z  INFO {net="Main"}:open_listener{addr=0.0.0.0:8233}: zebra_network::peer_set::initialize: Opened Zcash protocol endpoint at 0.0.0.0:8233
...
2022-10-04T04:31:01.512746Z  INFO {net="Main"}:add_initial_peers: zebra_network::peer_set::initialize: connecting to initial peer set initial_peer_count=25 initial_peers={[2001:41d0:700:223b::]:8233, 51.222.254.36:8233, [2a01:4f9:3a:2819::2]:8233, 144.126.214.65:8233, 104.233.147.162:8233, 45.92.71.27:8233, [2a01:4f9:4b:42cb::2]:8233, 51.81.208.186:8233, 51.79.57.29:8233, [2a01:4f8:120:72a3::2]:8233, 43.132.198.38:8233, 23.129.64.30:8233, 3.144.93.155:8233, 3.16.30.39:8233, 65.21.137.242:8233, 8.214.158.97:8233, 188.166.173.215:8233, [2a01:4f9:c010:31a6::1]:8233, 8.218.10.114:8233, 34.159.86.192:8233, [2001:41d0:303:417b::]:8233, 135.148.55.16:8233, 8.209.65.101:8233, 34.75.33.75:8233, 34.196.173.50:8233}
...
2022-10-04T04:31:04.447546Z  INFO {net="Main"}: zebrad::components::sync::progress: initial sync is waiting to download the genesis block sync_percent=0.000 % current_height=None
2022-10-04T04:31:04.649565Z  INFO {net="Main"}:sync:checkpoint: zebra_consensus::checkpoint: verified checkpoint range block_count=1 current_range=(Unbounded, Included(Height(0)))
2022-10-04T04:31:04.946148Z  INFO {net="Main"}:sync:try_to_sync: zebrad::components::sync: starting sync, obtaining new tips state_tip=None
...
2022-10-04T04:31:20.639725Z  INFO {net="Main"}:sync:try_to_sync:obtain_tips:checkpoint: zebra_consensus::checkpoint: verified checkpoint range block_count=1200 current_range=(Excluded(Height(0)), Included(Height(1200)))
2022-10-04T04:31:20.706328Z  INFO {net="Main"}:sync:try_to_sync: zebrad::components::sync: extending tips tips.len=1 in_flight=1199 extra_hashes=0 lookahead_limit=1200 state_tip=Some(Height(296))
2022-10-04T04:31:23.610318Z  INFO {net="Main"}:sync:try_to_sync: zebrad::components::sync: extending tips tips.len=1 in_flight=1199 extra_hashes=0 lookahead_limit=1200 state_tip=Some(Height(1200))
...
2022-10-04T04:32:04.448899Z  INFO {net="Main"}: zebrad::components::sync::progress: estimated progress to chain tip sync_percent=0.195% current_height=Height(3600) network_upgrade=BeforeOverwinter remaining_sync_blocks=1839593 time_since_last_state_block=0s

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-devops Area: Pipelines, CI/CD and Dockerfiles C-bug Category: This is a bug I-usability Zebra is hard to understand or use
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants