scylla-cluster-tests
scylla-cluster-tests copied to clipboard
Automatically disable Argus for local runs
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:
- simply get
whoami- in case it'subuntuorjenkinsit 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) - Check if cloud metadata endpoints (e.g.
169.254.169.254for AWS/Azure) exist - meaning test is not local.
@fruch WDYT?
@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 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)
@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-manufacturerwhich responds withAmazon EC2orMicrosoft Corporationor
cat /proc/cpuinfo | grep hypervisorwhich 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.