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

reduce logging noise #4469

Merged
merged 2 commits into from
Sep 19, 2024
Merged

reduce logging noise #4469

merged 2 commits into from
Sep 19, 2024

Conversation

wdbaruni
Copy link
Member

@wdbaruni wdbaruni commented Sep 19, 2024

Before

❯ bacalhau-1.5.0 serve --orchestrator --compute --data-dir v1.5.0/data-dir
17:49:24.837 | WRN cmd/cli/serve/serve.go:146 > --name flag with value  ignored. Name n-a4e0671b-2679-4bc0-86b7-160ac093d2dc already exists
17:49:24.879 | INF cmd/cli/serve/serve.go:218 > starting bacalhau...
17:49:24.891 | INF pkg/nats/logger.go:47 > Starting nats-server [Server:n-a4e0671b-2679-4bc0-86b7-160ac093d2dc]
17:49:24.891 | INF pkg/nats/logger.go:47 >   Version:  2.10.11 [Server:n-a4e0671b-2679-4bc0-86b7-160ac093d2dc]
17:49:24.891 | INF pkg/nats/logger.go:47 >   Git:      [not set] [Server:n-a4e0671b-2679-4bc0-86b7-160ac093d2dc]
17:49:24.891 | INF pkg/nats/logger.go:47 >   Name:     n-a4e0671b-2679-4bc0-86b7-160ac093d2dc [Server:n-a4e0671b-2679-4bc0-86b7-160ac093d2dc]
17:49:24.891 | INF pkg/nats/logger.go:47 >   Node:     KQ4D6Bsn [Server:n-a4e0671b-2679-4bc0-86b7-160ac093d2dc]
17:49:24.891 | INF pkg/nats/logger.go:47 >   ID:       NCEPXW5MIPEZJFEYIWHZ6UVM3UKTG3SAYEP5RZ3U33RZSZ4A6HBYAEMM [Server:n-a4e0671b-2679-4bc0-86b7-160ac093d2dc]
17:49:24.893 | INF pkg/nats/logger.go:47 > Starting JetStream [Server:n-a4e0671b-2679-4bc0-86b7-160ac093d2dc]
17:49:24.893 | INF pkg/nats/logger.go:47 > ---------------- JETSTREAM ---------------- [Server:n-a4e0671b-2679-4bc0-86b7-160ac093d2dc]
17:49:24.893 | INF pkg/nats/logger.go:47 >   Max Memory:      48.00 GB [Server:n-a4e0671b-2679-4bc0-86b7-160ac093d2dc]
17:49:24.893 | INF pkg/nats/logger.go:47 >   Max Storage:     49.95 GB [Server:n-a4e0671b-2679-4bc0-86b7-160ac093d2dc]
17:49:24.893 | INF pkg/nats/logger.go:47 >   Store Directory: "v1.5.0/data-dir/orchestrator/nats-store/jetstream" [Server:n-a4e0671b-2679-4bc0-86b7-160ac093d2dc]
17:49:24.893 | INF pkg/nats/logger.go:47 > ------------------------------------------- [Server:n-a4e0671b-2679-4bc0-86b7-160ac093d2dc]
17:49:24.894 | INF pkg/nats/logger.go:47 >   Starting restore for stream '$G > KV_node_v1' [Server:n-a4e0671b-2679-4bc0-86b7-160ac093d2dc]
17:49:24.896 | WRN pkg/nats/logger.go:47 > Filestore [KV_node_v1] Stream state encountered internal inconsistency on recover [Server:n-a4e0671b-2679-4bc0-86b7-160ac093d2dc]
17:49:24.897 | INF pkg/nats/logger.go:47 >   Restored 1 messages for stream '$G > KV_node_v1' in 2ms [Server:n-a4e0671b-2679-4bc0-86b7-160ac093d2dc]
17:49:24.897 | INF pkg/nats/logger.go:47 > Listening for client connections on 0.0.0.0:4222 [Server:n-a4e0671b-2679-4bc0-86b7-160ac093d2dc]
17:49:24.897 | INF pkg/nats/logger.go:47 > Server is ready [Server:n-a4e0671b-2679-4bc0-86b7-160ac093d2dc]
17:49:24.916 | INF pkg/nats/server.go:49 > NATS server NCEPXW5MIPEZJFEYIWHZ6UVM3UKTG3SAYEP5RZ3U33RZSZ4A6HBYAEMM listening on nats://0.0.0.0:4222 [NodeID:n-a4e0671b]
17:49:24.921 | INF pkg/node/manager/node_manager.go:47 > Nodes joining the cluster will be assigned approval state: APPROVED
17:49:24.921 | INF pkg/node/heartbeat/server.go:59 > Heartbeat server started [NodeID:n-a4e0671b]
17:49:24.922 | INF pkg/node/manager/node_manager.go:66 > Node manager started [NodeID:n-a4e0671b]
17:49:24.925 | INF pkg/publisher/local/server.go:52 > Running local publishing server on 0.0.0.0:6001 [NodeID:n-a4e0671b]
17:49:24.925 | INF pkg/lib/watcher/watcher.go:59 > No checkpoint found, starting from latest [NodeID:n-a4e0671b] [watcher_id:compute-logger]
17:49:24.926 | INF pkg/lib/watcher/watcher.go:68 > starting watcher [NodeID:n-a4e0671b] [starting_at:latest] [watcher_id:compute-logger]
17:49:25.632 | INF cmd/cli/serve/serve.go:271 > bacalhau node running [address:0.0.0.0:1234] [capacity:"{CPU: 8.399999999999999, Memory: 48 GB, Disk: 50 GB, GPU: 0}"] [compute_enabled:true] [engines:["docker","wasm"]] [name:n-a4e0671b-2679-4bc0-86b7-160ac093d2dc] [orchestrator_address:0.0.0.0:4222] [orchestrator_enabled:true] [orchestrators:["nats://127.0.0.1:4222"]] [publishers:["local","noop"]] [storages:["urldownload","inline"]] [webui_enabled:false]

To connect to this node from the local client, run the following commands in your shell:
export BACALHAU_API_HOST=127.0.0.1
export BACALHAU_API_PORT=1234
export BACALHAU_COMPUTE_ORCHESTRATORS=nats://127.0.0.1:4222



A copy of these variables have been written to: v1.5.0/data-dir/bacalhau.run

After:

bacalhau serve --compute --orchestrator
11:26:25.633 | INF ProtocolLabs/workspace/bacalhau/pkg/config/config.go:211 > Config loaded from: [], and with data-dir /Users/walid/.bacalhau
11:26:25.667 | INF ProtocolLabs/workspace/bacalhau/cmd/cli/serve/serve.go:219 > Starting bacalhau...
11:26:25.77 | INF ProtocolLabs/workspace/bacalhau/cmd/cli/serve/serve.go:292 > bacalhau node running [address:0.0.0.0:1234] [capacity:"{CPU: 5.6, Memory: 12 GB, Disk: 30 GB, GPU: 0}"] [compute_enabled:true] [engines:["docker","wasm"]] [name:n-a98c6a60-4c08-49d2-b17d-90daa49abc5f] [orchestrator_address:0.0.0.0:4222] [orchestrator_enabled:true] [orchestrators:["nats://127.0.0.1:4222"]] [publishers:["local","noop","s3"]] [storages:["urldownload","inline","s3"]] [webui_enabled:false]

To connect to this node from the local client, run the following commands in your shell:
export BACALHAU_API_HOST=127.0.0.1
export BACALHAU_API_PORT=1234

A copy of these variables have been written to: /Users/walid/.bacalhau/bacalhau.run

Closes #4438

@wdbaruni wdbaruni marked this pull request as ready for review September 19, 2024 09:24
@udsamani udsamani self-requested a review September 19, 2024 09:43
Copy link
Contributor

@udsamani udsamani left a comment

Choose a reason for hiding this comment

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

LGTM. If you can you also handle logging middleware for API ? We know make continuous request to get job events and they are logged as part of middleware when we do job run. Would be good to address that too. If not i can pick it up today :)

@wdbaruni
Copy link
Member Author

Yeah I can pick that as well :)

@wdbaruni wdbaruni merged commit ce04ff7 into main Sep 19, 2024
3 of 4 checks passed
@wdbaruni wdbaruni deleted the reduce-logging branch September 19, 2024 09:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unstructured startup and printing logs to STDOUT
2 participants