paritytech / zombienet

A cli tool to easily spawn ephemeral Polkadot/Substrate networks and perform tests against them.
https://paritytech.github.io/zombienet/
GNU General Public License v3.0
157 stars 92 forks source link

Fetching metrics from kubernetes service in native mode #1126

Closed safinsaf closed 1 year ago

safinsaf commented 1 year ago

Issue Description

Hello, I test zombienet in docker.io/paritytech/zombienet:v1.3.55 docker image, with all the binaries copied to the image and added to PATH

0001-parachains-smoke-test.toml toml file is provided

[settings]
timeout = 1000

[relaychain]
chain = "rococo-local"
default_command = "polkadot"

  [[relaychain.nodes]]
  name = "alice"
  args = [ "--alice", "-lruntime=debug,parachain=trace" ]

  [[relaychain.nodes]]
  name = "bob"
  args = [ "--bob", "-lruntime=debug,parachain=trace" ]

[[parachains]]
id = 100
add_to_genesis = false

  [parachains.collator]
  name = "collator01"
  command = "adder-collator"
  args = [ "-lruntime=debug,parachain=trace" ]

[types.Header]
number = "u64"
parent_hash = "Hash"
post_state = "Hash"

0001-parachains-smoke-test.zndsl file

Description: Smoke Test
Network: ./0001-parachains-smoke-test.toml
Creds: config

alice: is up
bob: is up
bob: parachain 100 is registered within 225 seconds
bob: parachain 100 block height is at least 10 within 200 seconds

I run with native mode using zombie test -p native 0001-parachains-smoke-test.zndsl

Tests are in kagome repository

But what I get seems like kubernetes mode rather than native

Error fetching metrics from: http://alice.zombie-9b47d9b8220de92b32b1593cff389bc7.svc.cluster.local:9615/metrics

Steps to reproduce the issue

Steps to reproduce the issue

  1. I test zombienet in docker.io/paritytech/zombienet:v1.3.55 docker image, with all the binaries copied to the image and added to PATH
  2. Add toml and zndsl files provided in description
  3. Run zombie test -p native 0001-parachains-smoke-test.zndsl

Describe the results you received

image

Describe the results you expected

I expect the same result as running without docker image image

Zombienet version

docker.io/paritytech/zombienet:v1.3.55

Provider

Native

Provider version

## For binaries
polkadot 0.9.42
polkadot-parachain 0.9.420

Upstream Latest Release

No

Additional environment details

Node version is v18.16.0

Additional environment details

Additional information

Additional information like issue happens only occasionally or issue happens with a particular architecture or on a particular setting

Screenshots

No response

wirednkod commented 1 year ago

Thank you @safinsaf

Can you please make sure that you are running node v18 and not lower than that?

safinsaf commented 1 year ago

Thank you @safinsaf

Can you please make sure that you are running node v18 and not lower than that?

Node version is v18.16.0

wirednkod commented 1 year ago

@safinsaf can you please rerun the tests with DEBUG=*zombie* and provide the logs

safinsaf commented 1 year ago

DEBUG=zombie

image

pepoviola commented 1 year ago

Hi @safinsaf, thanks for reporting this issue. In this case we set this env var in our image to use with our internal infra.

RUN_IN_CONTAINER = "1"

If you want to use the native provider inside the image you would need to remove the env var

unset RUN_IN_CONTAINER

Or you can even change the value to 0 when you run zombienet

RUN_IN_CONTAINER=0 zombie test -p native 0001-parachains-smoke-test.zndsl

And that should fix the issue. Can you try this way.

Thanks!

safinsaf commented 1 year ago

It helped, thanks! Will close the issue