aptos-core icon indicating copy to clipboard operation
aptos-core copied to clipboard

[Bug] Deprecate https://aptos.dev/nodes/local-testnet/run-a-local-testnet#using-docker

Open xbhuang1994 opened this issue 2 years ago • 6 comments

🐛 [BUG] Using Docker https://aptos.dev/nodes/local-testnet/run-a-local-testnet#using-docker

To reproduce

Code snippet to reproduce

mkdir aptos_local_validator && cd aptos_local_validator
wget https://raw.githubusercontent.com/aptos-labs/aptos-core/main/docker/compose/validator-testnet/docker-compose.yaml
wget https://raw.githubusercontent.com/aptos-labs/aptos-core/main/docker/compose/validator-testnet/validator_node_template.yaml
docker-compose up

Stack trace/error message

[+] Running 2/0
 ⠿ Container aptos_local_validator-validator-1  Created                                                                                 0.0s 
 ⠿ Container aptos_local_validator-faucet-1     Created                                                                                 0.0s
Attaching to aptos_local_validator-faucet-1, aptos_local_validator-validator-1
aptos_local_validator-validator-1  | Entering test mode, this should never be used in production!
aptos_local_validator-validator-1  | thread 'main' panicked at 'Test mode should start correctly: Failed to load config at path: "/opt/aptos/var/"
aptos_local_validator-validator-1  | 
aptos_local_validator-validator-1  | Caused by:
aptos_local_validator-validator-1  |     Unexpected error: Failed to read the config file into a string: "/opt/aptos/var/". Error: Os { code: 21, kind: IsADirectory, message: "Is a directory" }', aptos-node/src/lib.rs:138:14
aptos_local_validator-validator-1  | stack backtrace:
aptos_local_validator-validator-1  |    0: rust_begin_unwind
aptos_local_validator-validator-1  |              at ./rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/std/src/panicking.rs:584:5     
aptos_local_validator-validator-1  |    1: core::panicking::panic_fmt
aptos_local_validator-validator-1  |              at ./rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/core/src/panicking.rs:142:14   
aptos_local_validator-validator-1  |    2: core::result::unwrap_failed
aptos_local_validator-validator-1  |              at ./rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/core/src/result.rs:1814:5      
aptos_local_validator-validator-1  |    3: core::result::Result<T,E>::expect
aptos_local_validator-validator-1  |              at ./rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/core/src/result.rs:1064:23     
aptos_local_validator-validator-1  |    4: aptos_node::AptosNodeArgs::run
aptos_local_validator-validator-1  |              at ./aptos/aptos-node/src/lib.rs:130:13
aptos_local_validator-validator-1  |    5: aptos_node::main
aptos_local_validator-validator-1  |              at ./aptos/aptos-node/src/main.rs:16:5
aptos_local_validator-validator-1  |    6: core::ops::function::FnOnce::call_once
aptos_local_validator-validator-1  |              at ./rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/core/src/ops/function.rs:248:5 
aptos_local_validator-validator-1  | note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
aptos_local_validator-validator-1 exited with code 101
aptos_local_validator-faucet-1     | Validator has not populated mint.key yet. Is it running?
aptos_local_validator-faucet-1     | Validator has not populated mint.key yet. Is it running?
aptos_local_validator-faucet-1     | Validator has not populated mint.key yet. Is it running?
aptos_local_validator-faucet-1     | Validator has not populated mint.key yet. Is it running?
aptos_local_validator-faucet-1     | Validator has not populated mint.key yet. Is it running?
aptos_local_validator-faucet-1     | Validator has not populated mint.key yet. Is it running?
aptos_local_validator-faucet-1     | Validator has not populated mint.key yet. Is it running?

Expected Behavior

runing!

System information

Please complete the following information:

  • docker aptoslabs/validator devnet bfa23a8a1854
  • Windows10 WSL2

xbhuang1994 avatar Nov 05 '22 18:11 xbhuang1994

can reproduce this. It's somewhat related to https://github.com/aptos-labs/aptos-core/issues/2435 and this particular docker-compose template is not very well maintained. @rustielin @sherry-x can you give this some love or remove it? Related internal discussion: https://aptos-org.slack.com/archives/C034W35ARFX/p1659318103411649

@xbhuang1994 in the meantime - can you use https://aptos.dev/nodes/local-testnet/using-cli-to-run-a-local-testnet instead, which is the preferred method.

@clay-aptos @gregnazario I think we should consider removing the docs page https://aptos.dev/nodes/local-testnet/run-a-local-testnet altogether. Running a local testnet this way seems kinda legacy and I can't see a reason why someone wouldn't prefer the more convenient aptos CLI method instead?!

geekflyer avatar Nov 06 '22 07:11 geekflyer

can reproduce this. It's somewhat related to #2435 and this particular docker-compose template is not very well maintained. @rustielin @sherry-x can you give this some love or remove it? Related internal discussion: https://aptos-org.slack.com/archives/C034W35ARFX/p1659318103411649

@xbhuang1994 in the meantime - can you use https://aptos.dev/nodes/local-testnet/using-cli-to-run-a-local-testnet instead, which is the preferred method.

@clay-aptos @gregnazario I think we should consider removing the docs page https://aptos.dev/nodes/local-testnet/run-a-local-testnet altogether. Running a local testnet this way seems kinda legacy and I can't see a reason why someone wouldn't prefer the more convenient aptos CLI method instead?!

@geekflyer, this makes sense to me. I agree we should keep it simple. That said, I want to make sure the Docker or aptos-core source option aren't pivotal in some manner I do not yet understand. @wintertoro , @gregnazario or @davidiw , can we delete this option? https://aptos.dev/nodes/local-testnet/run-a-local-testnet/

Leaving instead?: https://aptos.dev/nodes/local-testnet/using-cli-to-run-a-local-testnet/

clay-aptos avatar Nov 07 '22 17:11 clay-aptos

can reproduce this. It's somewhat related to #2435 and this particular docker-compose template is not very well maintained. @rustielin @sherry-x can you give this some love or remove it? Related internal discussion: https://aptos-org.slack.com/archives/C034W35ARFX/p1659318103411649 @xbhuang1994 in the meantime - can you use https://aptos.dev/nodes/local-testnet/using-cli-to-run-a-local-testnet instead, which is the preferred method. @clay-aptos @gregnazario I think we should consider removing the docs page https://aptos.dev/nodes/local-testnet/run-a-local-testnet altogether. Running a local testnet this way seems kinda legacy and I can't see a reason why someone wouldn't prefer the more convenient aptos CLI method instead?!

@geekflyer, this makes sense to me. I agree we should keep it simple. That said, I want to make sure the Docker or aptos-core source option aren't pivotal in some manner I do not yet understand. @wintertoro , @gregnazario or @davidiw , can we delete this option? https://aptos.dev/nodes/local-testnet/run-a-local-testnet/

Leaving instead?: https://aptos.dev/nodes/local-testnet/using-cli-to-run-a-local-testnet/

Yes, I think we could go forward with just the cli version.

However, I think this is definitely a clear usability issue that we need to cleanup about knowing what the config paths and important to take a look at.

gregnazario avatar Nov 07 '22 18:11 gregnazario

can reproduce this. It's somewhat related to #2435 and this particular docker-compose template is not very well maintained. @rustielin @sherry-x can you give this some love or remove it? Related internal discussion: https://aptos-org.slack.com/archives/C034W35ARFX/p1659318103411649 @xbhuang1994 in the meantime - can you use https://aptos.dev/nodes/local-testnet/using-cli-to-run-a-local-testnet instead, which is the preferred method. @clay-aptos @gregnazario I think we should consider removing the docs page https://aptos.dev/nodes/local-testnet/run-a-local-testnet altogether. Running a local testnet this way seems kinda legacy and I can't see a reason why someone wouldn't prefer the more convenient aptos CLI method instead?!

@geekflyer, this makes sense to me. I agree we should keep it simple. That said, I want to make sure the Docker or aptos-core source option aren't pivotal in some manner I do not yet understand. @wintertoro , @gregnazario or @davidiw , can we delete this option? https://aptos.dev/nodes/local-testnet/run-a-local-testnet/ Leaving instead?: https://aptos.dev/nodes/local-testnet/using-cli-to-run-a-local-testnet/

Yes, I think we could go forward with just the cli version.

However, I think this is definitely a clear usability issue that we need to cleanup about knowing what the config paths and important to take a look at.

Thanks, Greg. Can you file an issue for this issue? Or should we track it here?

clay-aptos avatar Nov 08 '22 18:11 clay-aptos

@gregnazario , what is up with this document? https://aptos.dev/guides/local-testnet-dev-flow

And how does it relate to the pages linked already here? Thanks!

clay-aptos avatar Nov 14 '22 23:11 clay-aptos

@gregnazario , what is up with this document? https://aptos.dev/guides/local-testnet-dev-flow

And how does it relate to the pages linked already here? Thanks!

@movekevin for his thoughts on these: https://aptos.dev/nodes/local-testnet/using-cli-to-run-a-local-testnet/ https://aptos.dev/guides/local-testnet-dev-flow/ https://aptos.dev/nodes/local-testnet/run-a-local-testnet/

Which is preferred and why?

clay-aptos avatar Nov 15 '22 23:11 clay-aptos