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

Automatically disable Argus for local runs #7361

Open
soyacz opened this issue Apr 23, 2024 · 4 comments
Open

Automatically disable Argus for local runs #7361

soyacz opened this issue Apr 23, 2024 · 4 comments
Assignees

Comments

@soyacz
Copy link
Contributor

soyacz commented Apr 23, 2024

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
Copy link
Contributor Author

soyacz commented Apr 23, 2024

@fruch WDYT?

@fruch
Copy link
Contributor

fruch commented Apr 25, 2024

@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)

@soyacz
Copy link
Contributor Author

soyacz commented Apr 25, 2024

@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
Copy link
Contributor

fruch commented Apr 25, 2024

@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.

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

No branches or pull requests

2 participants