fleet/cmd
Lucas Manuel Rodriguez b65739f035
Orbit to kill pre-existing osqueryd processes during startup (#16343)
This should fix #16006.

On Windows when a process is killed by the Task Manager, it is killed
without any signaling, thus the osqueryd processes are left orphaned.
Executing osqueryd (which we do to get host information) was failing
because the lingering processes had a lock on the database file. The
solution implemented in this PR is to kill any pre-existing osqueryd
processes before running osqueryd.

- [X] Changes file added for user-visible changes in `changes/` or
`orbit/changes/`.
- [X] Manual QA for all new/changed functionality
  - For Orbit and Fleet Desktop changes:
- [X] Manual QA must be performed in the three main OSs, macOS, Windows
and Linux.
- [X] Auto-update manual QA, from released version of component to new
version (see [tools/tuf/test](../tools/tuf/test/README.md)).

PS: I added a log of the stdout+stderr of osqueryd execution when such
command fails to execute. (This helped me find the root cause.)
```
2024-01-25T11:57:56-08:00 ERR getHostInfo via osquery output= stderr="E0125 11:57:56.744843
7860 shutdown.cpp:79] IO error: Failed to create lock file:
C:\\Program Files\\Orbit\\osquery.db/LOCK: The process cannot access the file because it is
being used by another process.\r\r\n"
```

PPS: I removed some unused exported methods in the `orbit/pkg/platform`
package.
2024-01-29 16:44:50 -03:00
..
cpe Updating CPE generator to use new NVD API. (#15018) 2023-11-20 16:10:00 -06:00
cve Use NVD API 2.0 to download CVE information (#15102) 2023-11-21 12:30:07 -06:00
fleet 4345 OS Vulnerabilities Backend (#16303) 2024-01-24 12:18:57 -07:00
fleetctl Orbit to kill pre-existing osqueryd processes during startup (#16343) 2024-01-29 16:44:50 -03:00
macoffice Feature 9386: Parse the Mac Office release notes for vulnerability processing (#9993) 2023-02-24 14:18:25 -04:00
msrc Feature 9386: Parse the Mac Office release notes for vulnerability processing (#9993) 2023-02-24 14:18:25 -04:00
osquery-perf Additional OS support in osquery perf (#16390) 2024-01-29 11:11:49 -07:00