Merge pull request #16908 from alexlarsson/transient-bundle-path

When in transient store mode, use rundir for bundlepath
This commit is contained in:
OpenShift Merge Robot
2022-12-21 11:16:18 -05:00
committed by GitHub
2 changed files with 4 additions and 0 deletions

View File

@ -128,6 +128,9 @@ func (c *Container) rwSize() (int64, error) {
// bundlePath returns the path to the container's root filesystem - where the OCI spec will be
// placed, amongst other things
func (c *Container) bundlePath() string {
if c.runtime.storageConfig.TransientStore {
return c.state.RunDir
}
return c.config.StaticDir
}

View File

@ -118,6 +118,7 @@ func TestPostDeleteHooks(t *testing.T) {
statePath := filepath.Join(dir, "state")
copyPath := filepath.Join(dir, "copy")
c := Container{
runtime: &Runtime{},
config: &ContainerConfig{
ID: "123abc",
Spec: &rspec.Spec{