diff options
author | Matthew Heon <matthew.heon@gmail.com> | 2017-12-07 13:44:08 -0500 |
---|---|---|
committer | Atomic Bot <atomic-devel@projectatomic.io> | 2017-12-14 23:59:21 +0000 |
commit | 22287fef01d1c67c84d4ae2c2544ec3e45ccfcfb (patch) | |
tree | 79605b0f421d3ebe1df10dde19b0dbb0a0e83346 /libpod | |
parent | e871075895bb516f3b9c376fa24634ad586e6c09 (diff) | |
download | podman-22287fef01d1c67c84d4ae2c2544ec3e45ccfcfb.tar.gz podman-22287fef01d1c67c84d4ae2c2544ec3e45ccfcfb.tar.bz2 podman-22287fef01d1c67c84d4ae2c2544ec3e45ccfcfb.zip |
Remove network namespaces from DB on refresh
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
Closes: #109
Approved by: mheon
Diffstat (limited to 'libpod')
-rw-r--r-- | libpod/sql_state.go | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/libpod/sql_state.go b/libpod/sql_state.go index 9d457c3ec..a93a025dc 100644 --- a/libpod/sql_state.go +++ b/libpod/sql_state.go @@ -98,12 +98,13 @@ func (s *SQLState) Close() error { } // Refresh clears the state after a reboot -// Resets mountpoint, PID, state for all containers +// Resets mountpoint, PID, state, netns path for all containers func (s *SQLState) Refresh() (err error) { const refresh = `UPDATE containerState SET State=?, Mountpoint=?, - Pid=?;` + Pid=?, + NetNSPath=?;` if !s.valid { return ErrDBClosed @@ -128,7 +129,8 @@ func (s *SQLState) Refresh() (err error) { _, err = tx.Exec(refresh, ContainerStateConfigured, "", - 0) + 0, + "") if err != nil { return errors.Wrapf(err, "error refreshing database state") } |