Open adfoster-r7 opened 9 months ago
Kudos, SonarCloud Quality Gate passed!
The SonarCloud Quality Gate passed, but some issues were introduced.
1 New issue
0 Security Hotspots
No data about Coverage
No data about Duplication
Issues
1 New issue
0 Accepted issues
Measures
0 Security Hotspots
No data about Coverage
No data about Duplication
Description
Relates to https://github.com/chef/omnibus/pull/1056 which added more rigorous checks to the
ldd
healthchecksThe scenario is - I've just upgraded to a newer version of Omnibus, and it looks like the
ldd
command here can break halfway through with this current pattern. It took a while to track down things as the status code here is getting ignored, so the error was being swallowed.Example, reading 3 files and the 2nd ELF file causes an error - shows that the third file is never evaluated - leading to incorrect health checks:
We get a partial result in the current implementation, but if you extract the status code you can see it has failed an exitstatus of 135:
For my current setup, this new code path skips multiple healthchecks as a result of exiting earlier than expect
Intended solution
For the happy path, the
ldd
command is run against all libraries as before. If the exit code is non-zero, we try the failed files indivdually.Maintainers
Please ensure that you check for: