kolide / launcher

Osquery launcher, autoupdater, and packager
https://kolide.com/launcher
Other
505 stars 100 forks source link

How does uninstall work anyhow? Verify and update the docs. #1434

Open directionless opened 11 months ago

directionless commented 11 months ago

Prompted by a refresh of our docs, and a slack conversation (see following thread). I think we have some gaps.

For context, I think the way our world generally works is that the installers create some basic structure, and put the binaries on disk. Then, when launcher starts, it creates it's database and associated files in the root directory. Uninstall may or may not remove that local database. That uncertainty makes a subsequent re-install confusing.

Question 1: On an endpoint initiated uninstall, should the database and root directory be removed? Phrased differently, this is really a question about whether a subsequent re-install should get a new node key.

Question 2: Is this different for server initiated uninstalls than endpoint initiated installs?

Question 3: Which of the uninstall flows do that, and which don't? I suspect that:

Goals:

  1. Answer questions 1 and 2. What do we want anyhow?
  2. Fix uninstall processes. Can we bake something in that makes it work?
  3. Update docs here and here

Note that a common repair pattern is to install the new package -- so we can't just wipe it on initial install.


I suspect that if we want uninstalls to automated remove the database, even though the installer didn't create it, we might need to use some trickery. It's going to depend on what kinds of things we can easily do in wix.

terracatta commented 10 months ago

@zackattack01 We had a customer just report the uninstall process on Windows does not clear some files (potentially including the launcher DB) which causes new launcher installs (from a different tenant) to not work correctly and report to the original tenant from their previous installation.

directionless commented 10 months ago

When we fix this, we should back out https://github.com/kolide/k2/pull/9197