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

cnspec commands at Linux VM on Hyper-V take forever to execute #1486

Open
tomtrix opened this issue Nov 20, 2024 · 0 comments
Open

cnspec commands at Linux VM on Hyper-V take forever to execute #1486

tomtrix opened this issue Nov 20, 2024 · 0 comments

Comments

@tomtrix
Copy link

tomtrix commented Nov 20, 2024

Describe the bug
Ubuntu 24.04. VM on a Hyper-V Host running. All cnspec commands like cnspec status take really long (about 2 minutes).

To Reproduce
Steps to reproduce the behavior:

  1. Run 'cnspec status'
  2. Wait

Expected behavior
Command execution takes only several seconds

Screenshots or CLI Output
With debug logging enabled, the execution gets stuck at the curl command curl --noproxy '*' -H Metadata:true http://169.254.169.254/metadata/instance?api-version=2021-02-01.

Image

When executing the curl command it takes 2 minutes to finish off.

Image

Desktop (please complete the following information):

  • OS: Ubuntu Server
  • OS Version: 24.04. LTS
  • Browser if applicable: n/a
  • Browser Version: n/a

Additional context
I think the problem is this line

https://github.com/mondoohq/cnquery/blob/e0e28b936a5e58770664d812247dedd576d28297/providers/os/id/azcompute/azcompute.go#L60

We should adjust the curl command like this:

curl --max-time 1 --noproxy '*' -H Metadata:true http://169.254.169.254/metadata/instance?api-version=2021-02-01
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

1 participant