Fix interpretation of runc error messages
https://github.com/opencontainers/runc/commit/e918d021399e62442711cc006f99beeae5e3ea1b has introduced the use of fmt.Errorf("xxx: %w", err) instead of using its own error wrapping system.
In the our code, we check for certain runc errors and convert them into guardian errors. For example:
- https://github.com/cloudfoundry/guardian/blob/2cab4bbdfcc3ecf9032f6299d3ff5881d5f31043/rundmc/runcontainerd/runcontainerd.go#L202-L204
- https://github.com/cloudfoundry/guardian/blob/2cab4bbdfcc3ecf9032f6299d3ff5881d5f31043/rundmc/execrunner/dadoo/execrunner.go#L216-L219
These, and their tests, need to be converted to use the new format of the error message returned from runc.
Note that this change in not included in runc-v1.0.0. Possibly consider a fix that includes both formats of error, and schedule a chore to remove the old format once garden-runc-release bumps runc past the commit introducing the change.
This is currently causing failures in CI testing runc master branch: https://garden.ci.cf-app.com/teams/main/pipelines/main/jobs/guardian-runc-master/builds/529
We have created an issue in Pivotal Tracker to manage this:
https://www.pivotaltracker.com/story/show/178796520
The labels on this github issue will be updated when the story is started.
Closing due to inactivity, as well as the fact that our tests are currently succeeding. We believe this was likely already addressed, but feel free to re-open if necessary.