guardian icon indicating copy to clipboard operation
guardian copied to clipboard

Fix interpretation of runc error messages

Open kieron-dev opened this issue 4 years ago • 1 comments

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

kieron-dev avatar Jul 07 '21 11:07 kieron-dev

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.

cf-gitbot avatar Jul 07 '21 11:07 cf-gitbot

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.

dsabeti avatar Dec 12 '23 18:12 dsabeti