From 1f49f555af0709ea7c12becdb750ba60a00eaf1d Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Tue, 19 Dec 2017 15:42:30 -0500 Subject: Plumb through the --stop-timeout signal handling podman run/create have the ability to set the stop timeout flag. We need to stop it in the database. Also Allowing negative time for stop timeout makes no sense, so switching to timeout of uint, allows user to specify huge timeout values. Signed-off-by: Daniel J Walsh Closes: #158 Approved by: TomSweeneyRedHat --- libpod/sql_state_internal.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'libpod/sql_state_internal.go') diff --git a/libpod/sql_state_internal.go b/libpod/sql_state_internal.go index e1ecc8ea6..8513216fa 100644 --- a/libpod/sql_state_internal.go +++ b/libpod/sql_state_internal.go @@ -176,6 +176,7 @@ func prepareDB(db *sql.DB) (err error) { Stdin INTEGER NOT NULL, LabelsJSON TEXT NOT NULL, StopSignal INTEGER NOT NULL, + StopTimeout INTEGER NOT NULL, CreatedTime TEXT NOT NULL, RootfsImageID TEXT NOT NULL, RootfsImageName TEXT NOT NULL, @@ -284,6 +285,7 @@ func ctrFromScannable(row scannable, runtime *Runtime, specsDir string, lockDir stdin int labelsJSON string stopSignal uint + stopTimeout uint createdTimeString string rootfsImageID string rootfsImageName string @@ -313,6 +315,7 @@ func ctrFromScannable(row scannable, runtime *Runtime, specsDir string, lockDir &stdin, &labelsJSON, &stopSignal, + &stopTimeout, &createdTimeString, &rootfsImageID, &rootfsImageName, @@ -351,6 +354,7 @@ func ctrFromScannable(row scannable, runtime *Runtime, specsDir string, lockDir ctr.config.StaticDir = staticDir ctr.config.Stdin = boolFromSQL(stdin) ctr.config.StopSignal = stopSignal + ctr.config.StopTimeout = stopTimeout ctr.state.State = ContainerState(state) ctr.state.ConfigPath = configPath -- cgit v1.2.3-54-g00ecf