Merge pull request #20299 from giuseppe/fix-flake-ENOENT
container: always check if mountpoint is mounted
This commit is contained in:
commit
8615b165c8
2
go.mod
2
go.mod
|
|
@ -20,7 +20,7 @@ require (
|
|||
github.com/containers/libhvee v0.4.1-0.20231005205143-fcf1cc2543b3
|
||||
github.com/containers/ocicrypt v1.1.8
|
||||
github.com/containers/psgo v1.8.0
|
||||
github.com/containers/storage v1.50.3-0.20231005112617-44418abb2d89
|
||||
github.com/containers/storage v1.50.3-0.20231005200628-e21971a94abb
|
||||
github.com/coreos/go-systemd/v22 v22.5.0
|
||||
github.com/coreos/stream-metadata-go v0.4.3
|
||||
github.com/crc-org/vfkit v0.1.2-0.20230829083117-09e62065eb6e
|
||||
|
|
|
|||
4
go.sum
4
go.sum
|
|
@ -271,8 +271,8 @@ github.com/containers/ocicrypt v1.1.8/go.mod h1:jM362hyBtbwLMWzXQZTlkjKGAQf/BN/L
|
|||
github.com/containers/psgo v1.8.0 h1:2loGekmGAxM9ir5OsXWEfGwFxorMPYnc6gEDsGFQvhY=
|
||||
github.com/containers/psgo v1.8.0/go.mod h1:T8ZxnX3Ur4RvnhxFJ7t8xJ1F48RhiZB4rSrOaR/qGHc=
|
||||
github.com/containers/storage v1.43.0/go.mod h1:uZ147thiIFGdVTjMmIw19knttQnUCl3y9zjreHrg11s=
|
||||
github.com/containers/storage v1.50.3-0.20231005112617-44418abb2d89 h1:IAFsJzjIalzJCqE6786P9K1qbrYBd1abeL8/ip/waNA=
|
||||
github.com/containers/storage v1.50.3-0.20231005112617-44418abb2d89/go.mod h1:HZESuTLIRmcs00JFSZr6daHD/B51J0ZCZr0T7uDDc9Y=
|
||||
github.com/containers/storage v1.50.3-0.20231005200628-e21971a94abb h1:fYLIShJAebUb9l2643IoD9jrj1WEyhux/4/V+2D2CXM=
|
||||
github.com/containers/storage v1.50.3-0.20231005200628-e21971a94abb/go.mod h1:RepNBJN07JUzkeLwmAeRwUstBqisvf8UoW/E6TR1Pak=
|
||||
github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk=
|
||||
github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=
|
||||
github.com/coreos/go-iptables v0.4.5/go.mod h1:/mVI274lEDI2ns62jHCDnCyBF9Iwsmekav8Dbxlm1MU=
|
||||
|
|
|
|||
|
|
@ -1539,7 +1539,13 @@ func (c *Container) mountStorage() (_ string, deferredErr error) {
|
|||
var err error
|
||||
// Container already mounted, nothing to do
|
||||
if c.state.Mounted {
|
||||
return c.state.Mountpoint, nil
|
||||
mounted := true
|
||||
if c.ensureState(define.ContainerStateExited) {
|
||||
mounted, _ = mount.Mounted(c.state.Mountpoint)
|
||||
}
|
||||
if mounted {
|
||||
return c.state.Mountpoint, nil
|
||||
}
|
||||
}
|
||||
|
||||
if !c.config.NoShm {
|
||||
|
|
|
|||
|
|
@ -3411,7 +3411,7 @@ func (s *store) Shutdown(force bool) ([]string, error) {
|
|||
// so that we reload after a .Shutdown() the same way other processes would.
|
||||
// Shutdown() is basically an error path, so reliability is more important than performance.
|
||||
if _, err2 := s.graphLock.RecordWrite(); err2 != nil {
|
||||
err = fmt.Errorf("(graphLock.RecordWrite failed: %w", err2)
|
||||
err = fmt.Errorf("graphLock.RecordWrite failed: %w", err2)
|
||||
}
|
||||
// Do the Cleanup() only after we are sure that the change was recorded with RecordWrite(), so that
|
||||
// the next user picks it.
|
||||
|
|
|
|||
|
|
@ -339,7 +339,7 @@ github.com/containers/psgo/internal/dev
|
|||
github.com/containers/psgo/internal/host
|
||||
github.com/containers/psgo/internal/proc
|
||||
github.com/containers/psgo/internal/process
|
||||
# github.com/containers/storage v1.50.3-0.20231005112617-44418abb2d89
|
||||
# github.com/containers/storage v1.50.3-0.20231005200628-e21971a94abb
|
||||
## explicit; go 1.19
|
||||
github.com/containers/storage
|
||||
github.com/containers/storage/drivers
|
||||
|
|
|
|||
Loading…
Reference in New Issue