diff options
author | Daniel J Walsh <dwalsh@redhat.com> | 2017-12-19 15:42:30 -0500 |
---|---|---|
committer | Atomic Bot <atomic-devel@projectatomic.io> | 2017-12-20 18:10:43 +0000 |
commit | 1f49f555af0709ea7c12becdb750ba60a00eaf1d (patch) | |
tree | 9a39b8d0b61ff8d4cb88619ad49bd229320e952c /libpod/sql_state.go | |
parent | 3607fcb553046b9a51c4b591ddf20236c628dc57 (diff) | |
download | podman-1f49f555af0709ea7c12becdb750ba60a00eaf1d.tar.gz podman-1f49f555af0709ea7c12becdb750ba60a00eaf1d.tar.bz2 podman-1f49f555af0709ea7c12becdb750ba60a00eaf1d.zip |
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 <dwalsh@redhat.com>
Closes: #158
Approved by: TomSweeneyRedHat
Diffstat (limited to 'libpod/sql_state.go')
-rw-r--r-- | libpod/sql_state.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libpod/sql_state.go b/libpod/sql_state.go index a93a025dc..ec6818bcf 100644 --- a/libpod/sql_state.go +++ b/libpod/sql_state.go @@ -15,7 +15,7 @@ import ( // DBSchema is the current DB schema version // Increments every time a change is made to the database's tables -const DBSchema = 4 +const DBSchema = 5 // SQLState is a state implementation backed by a persistent SQLite3 database type SQLState struct { @@ -271,7 +271,7 @@ func (s *SQLState) HasContainer(id string) (bool, error) { func (s *SQLState) AddContainer(ctr *Container) (err error) { const ( addCtr = `INSERT INTO containers VALUES ( - ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? + ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? );` addCtrState = `INSERT INTO containerState VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? @@ -332,6 +332,7 @@ func (s *SQLState) AddContainer(ctr *Container) (err error) { boolToSQL(ctr.config.Stdin), string(labelsJSON), ctr.config.StopSignal, + ctr.config.StopTimeout, timeToSQL(ctr.config.CreatedTime), ctr.config.RootfsImageID, ctr.config.RootfsImageName, |