scylla-cluster-tests icon indicating copy to clipboard operation
scylla-cluster-tests copied to clipboard

Automatically disable Argus for local runs

Open soyacz opened this issue 1 year ago • 4 comments

I think we don't ever need to use Argus when running SCT locally. Idea is to detect local run and set Argus to False then. Ideas how to do that:

  1. simply get whoami - in case it's ubuntu or jenkins it means we are on sct-runner/builder and argus setting should not be altered (may not work if anyone uses ubuntu and didn't change username)
  2. Check if cloud metadata endpoints (e.g. 169.254.169.254 for AWS/Azure) exist - meaning test is not local.

soyacz avatar Apr 23 '24 16:04 soyacz

@fruch WDYT?

soyacz avatar Apr 23 '24 16:04 soyacz

@fruch WDYT?

I think option one might be a bit better

The second one is problematic, and would be slow (I.e. on some network setups it can be 30-60s before you can figure out some address is not answering)

fruch avatar Apr 25 '24 12:04 fruch

@fruch WDYT?

I was asking also if we want to do it at all. Assuming you take options, means yes :)

I think option one might be a bit better

The second one is problematic, and would be slow (I.e. on some network setups it can be 30-60s before you can figure out some address is not answering)

I just verified, there are other options. E.g: sudo dmidecode -s system-manufacturer which responds with Amazon EC2 or Google or Microsoft Corporation

or cat /proc/cpuinfo | grep hypervisor which is empty locally and on cloud responds with some lines (I don't think we'll run sct-runners on metal machines)

soyacz avatar Apr 25 '24 13:04 soyacz

@fruch WDYT?

I was asking also if we want to do it at all. Assuming you take options, means yes :)

I think option one might be a bit better The second one is problematic, and would be slow (I.e. on some network setups it can be 30-60s before you can figure out some address is not answering)

I just verified, there are other options. E.g: sudo dmidecode -s system-manufacturer which responds with Amazon EC2 or Google or Microsoft Corporation

or cat /proc/cpuinfo | grep hypervisor which is empty locally and on cloud responds with some lines (I don't think we'll run sct-runners on metal machines)

other option is to read JENKINS realted envriemnt variables, and act by it.

fruch avatar Apr 25 '24 13:04 fruch