Skip to content

Actually check for syscall.ENODEV when checking if a container is paused#2279

Merged
crosbymichael merged 1 commit intoopencontainers:masterfrom
masters-of-cats:freezer
Mar 31, 2020
Merged

Actually check for syscall.ENODEV when checking if a container is paused#2279
crosbymichael merged 1 commit intoopencontainers:masterfrom
masters-of-cats:freezer

Conversation

@yulianedyalkova
Copy link
Copy Markdown
Contributor

It turns out that ioutil.Readfile wraps the error in a *os.PathError.
Since we cannot guarantee compilation with golang >= v1.13, we are
manually unwrapping the error.

Signed-off-by: Kieron Browne kbrowne@pivotal.io

It turns out that ioutil.Readfile wraps the error in a *os.PathError.
Since we cannot guarantee compilation with golang >= v1.13, we are
manually unwrapping the error.

Signed-off-by: Kieron Browne <kbrowne@pivotal.io>
@AkihiroSuda
Copy link
Copy Markdown
Member

AkihiroSuda commented Mar 31, 2020

LGTM

Approved with PullApprove

1 similar comment
@crosbymichael
Copy link
Copy Markdown
Member

crosbymichael commented Mar 31, 2020

LGTM

Approved with PullApprove

@crosbymichael crosbymichael merged commit 8221d99 into opencontainers:master Mar 31, 2020
@kolyshkin
Copy link
Copy Markdown
Contributor

kolyshkin commented Apr 1, 2020

Since we cannot guarantee compilation with golang >= v1.13

Actually, we have switched to golang 1.13+ once we merged #2256. Also, since go 1.12 is an unsupported version, it makes no sense to try supporting it.

Can we please use errors.Unwrap() instead (and maybe mark the file with // +build go1.13)?

@kolyshkin
Copy link
Copy Markdown
Contributor

Another (non-technical) problem with this commit is it is not signed-off-by by the author (and our DCO check fails to see it). I mean:

Author: Yulia Nedyalkova julianedialkova@hotmail.com
....
Signed-off-by: Kieron Browne kbrowne@pivotal.io

@kolyshkin
Copy link
Copy Markdown
Contributor

Opened #2280 to use errors.Unwrap()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants