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

🧹 Update providers when running in serve mode #938

Merged
merged 2 commits into from
Nov 14, 2023

Conversation

czunker
Copy link
Contributor

@czunker czunker commented Nov 7, 2023

@czunker
Copy link
Contributor Author

czunker commented Nov 7, 2023

This is how it looks like on my local linux system when no update is required:

DBG checking for provider updates
DBG searching providers in path path=/opt/mondoo/providers
DBG searching providers in path path=/home/christian/.config/mondoo/providers
DBG provider is already up to date provider=gcp version=9.1.1
DBG provider is already up to date provider=gitlab version=9.1.1
DBG provider is already up to date provider=k8s version=9.1.1
DBG provider is already up to date provider=aws version=9.1.2
DBG provider is already up to date provider=equinix version=9.1.1
DBG provider is already up to date provider=oci version=9.1.1
DBG provider is already up to date provider=ms365 version=9.1.1
DBG provider is already up to date provider=atlassian version=9.1.1
DBG provider is already up to date provider=opcua version=9.1.1
DBG provider is already up to date provider=os version=9.1.2
DBG provider is already up to date provider=arista version=9.1.1
DBG provider is already up to date provider=terraform version=9.1.1
DBG provider is already up to date provider=network version=9.1.3
DBG provider is already up to date provider=azure version=9.1.2
DBG provider is already up to date provider=github version=9.1.1
DBG provider is already up to date provider=slack version=9.1.1
DBG provider is already up to date provider=okta version=9.1.2
DBG provider is already up to date provider=google-workspace version=9.1.1
DBG provider is already up to date provider=ipmi version=9.1.1
DBG Started a new runtime (1 total)

This is a Windows 2022 server with an update:

- starting background scan
DBG checking for provider updates
DBG searching providers in path path="C:\\Users\\christian\\.config\\mondoo\\providers"
- installing provider 'os' version=9.1.2
DBG installing provider from URL url=https://releases.mondoo.com/providers/os/9.1.2/os_9.1.2_windows_amd64.tar.xz
DBG create temp directory to unpack providers
DBG unpacking providers path="C:\\Users\\christian\\.config\\mondoo\\providers\\.providers-unpack887968701"
DBG unpacking file dest="C:\\Users\\christian\\.config\\mondoo\\providers\\.providers-unpack887968701\\os.exe" name=os.exe
DBG unpacking file dest="C:\\Users\\christian\\.config\\mondoo\\providers\\.providers-unpack887968701\\os.json" name=os.json
DBG unpacking file dest="C:\\Users\\christian\\.config\\mondoo\\providers\\.providers-unpack887968701\\os.resources.json" name=os.resources.json
DBG move provider to destination
DBG move provider binary dst="C:\\Users\\christian\\.config\\mondoo\\providers\\os\\os.exe" src="C:\\Users\\christian\\.config\\mondoo\\providers\\.providers-unpack887968701\\os.exe"
DBG loading providers
- successfully installed os provider path="C:\\Users\\christian\\.config\\mondoo\\providers\\os" version=9.1.2

I tried different things:

  • let it run
  • downgrade the provider between scans while it is running
  • remove provider between scans

if err != nil {
return err
}
providers.PrintInstallResults([]*providers.Provider{installed})
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't we want to print this at the end after all providers are updated?

Signed-off-by: Christian Zunker <[email protected]>
@czunker czunker merged commit dbad1b1 into main Nov 14, 2023
9 checks passed
@czunker czunker deleted the christian/serve_update_providers branch November 14, 2023 14:46
@github-actions github-actions bot locked and limited conversation to collaborators Nov 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

os provider not updating
2 participants