oci: drop ExecContainerCleanup

without the socketsDir, we no longer need to worry about cleaning up after an exec.

Signed-off-by: Peter Hunt <pehunt@redhat.com>
This commit is contained in:
Peter Hunt 2021-01-14 13:58:36 -05:00
parent fdfff1dab2
commit 452b9e204f
4 changed files with 1 additions and 15 deletions

View File

@ -773,7 +773,7 @@ func (c *Container) cleanupExecBundle(sessionID string) error {
return err return err
} }
return c.ociRuntime.ExecContainerCleanup(c, sessionID) return nil
} }
// the path to a containers exec session bundle // the path to a containers exec session bundle

View File

@ -94,10 +94,6 @@ type OCIRuntime interface {
// ExecUpdateStatus checks the status of a given exec session. // ExecUpdateStatus checks the status of a given exec session.
// Returns true if the session is still running, or false if it exited. // Returns true if the session is still running, or false if it exited.
ExecUpdateStatus(ctr *Container, sessionID string) (bool, error) ExecUpdateStatus(ctr *Container, sessionID string) (bool, error)
// ExecContainerCleanup cleans up after an exec session exits.
// It removes any files left by the exec session that are no longer
// needed, including the attach socket.
ExecContainerCleanup(ctr *Container, sessionID string) error
// CheckpointContainer checkpoints the given container. // CheckpointContainer checkpoints the given container.
// Some OCI runtimes may not support this - if SupportsCheckpoint() // Some OCI runtimes may not support this - if SupportsCheckpoint()

View File

@ -284,11 +284,6 @@ func (r *ConmonOCIRuntime) ExecUpdateStatus(ctr *Container, sessionID string) (b
return true, nil return true, nil
} }
// ExecContainerCleanup cleans up files created when a command is run via ExecContainer.
func (r *ConmonOCIRuntime) ExecContainerCleanup(ctr *Container, sessionID string) error {
return nil
}
// ExecAttachSocketPath is the path to a container's exec session attach socket. // ExecAttachSocketPath is the path to a container's exec session attach socket.
func (r *ConmonOCIRuntime) ExecAttachSocketPath(ctr *Container, sessionID string) (string, error) { func (r *ConmonOCIRuntime) ExecAttachSocketPath(ctr *Container, sessionID string) (string, error) {
// We don't even use container, so don't validity check it // We don't even use container, so don't validity check it

View File

@ -151,11 +151,6 @@ func (r *MissingRuntime) ExecUpdateStatus(ctr *Container, sessionID string) (boo
return false, r.printError() return false, r.printError()
} }
// ExecContainerCleanup is not available as the runtime is missing
func (r *MissingRuntime) ExecContainerCleanup(ctr *Container, sessionID string) error {
return r.printError()
}
// CheckpointContainer is not available as the runtime is missing // CheckpointContainer is not available as the runtime is missing
func (r *MissingRuntime) CheckpointContainer(ctr *Container, options ContainerCheckpointOptions) error { func (r *MissingRuntime) CheckpointContainer(ctr *Container, options ContainerCheckpointOptions) error {
return r.printError() return r.printError()