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

Set config on interactive command in osquery checkup #1968

Merged

Conversation

RebeccaMahany
Copy link
Contributor

@RebeccaMahany RebeccaMahany commented Nov 26, 2024

Relates to #1892.

#1958 appeared to fix the above issue. However, during validation for v1.12.3, we saw a new iteration of the same error -- this time, though, it wasn't a timeout error.

When testing, I am finding that whether the osquery checkup fails depends on my localdev_path setting (which also explains why I did not see this issue when testing the previous PR).

localdev_path Checkup fails
Not set -- launcher path will be found at <bin-dir>\launcher.exe Yes
Not set -- launcher path will be found at<updates-dir>\launcher\<nightly>\launcher.exe Yes
Path to my locally-built version of main No
Path to <bin-dir>\launcher.exe No
Path to <updates-dir>\launcher\<nightly>\launcher.exe Yes

I'm not quite sure how to explain this behavior yet, especially when I can't reproduce it in my test environment. (Plus -- for my secondary install on the same computer, as well as for both installs on @zackattack01's Windows machine, this checkup consistently passes now.)

In this PR, I'm trying setting the --config flag to see if that will change any of the behavior here. Regardless, it's useful to set the --config flag so e.g. the root directory can be picked up correctly by the interactive command.

@RebeccaMahany RebeccaMahany added the bug-fixes Bug Fixes label Nov 26, 2024
@@ -66,10 +67,15 @@ func (o *osqueryCheckup) interactive(ctx context.Context) error {
return fmt.Errorf("getting current running executable: %w", err)
}

flagFilePath := launcher.DefaultPath(launcher.ConfigFile)
if o.k != nil && o.k.Identifier() != "" {
flagFilePath = strings.ReplaceAll(flagFilePath, launcher.DefaultLauncherIdentifier, o.k.Identifier())
Copy link
Contributor

Choose a reason for hiding this comment

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

🔥

@RebeccaMahany RebeccaMahany added this pull request to the merge queue Nov 26, 2024
Merged via the queue into kolide:main with commit b5ebe99 Nov 26, 2024
29 checks passed
@RebeccaMahany RebeccaMahany deleted the becca/checkup-osq-set-config-file branch November 26, 2024 17:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-fixes Bug Fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants