aboutsummaryrefslogtreecommitdiff
path: root/libpod
diff options
context:
space:
mode:
authorMatthew Heon <matthew.heon@gmail.com>2018-01-28 10:14:17 -0500
committerAtomic Bot <atomic-devel@projectatomic.io>2018-02-09 15:01:34 +0000
commit044139dca9acbcb662af31abcd3860e21b73d3ce (patch)
treea1af34113a9e0b4924533671a64ac579f59a3ca2 /libpod
parent6b7b4b03a888b2d87dd58d1e8048d2a5c7e6a36b (diff)
downloadpodman-044139dca9acbcb662af31abcd3860e21b73d3ce.tar.gz
podman-044139dca9acbcb662af31abcd3860e21b73d3ce.tar.bz2
podman-044139dca9acbcb662af31abcd3860e21b73d3ce.zip
Remove read-only from DB, it's in the spec
Don't need to store it separately Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #268 Approved by: rhatdan
Diffstat (limited to 'libpod')
-rw-r--r--libpod/container.go4
-rw-r--r--libpod/sql_state_internal.go8
-rw-r--r--libpod/test_common.go1
3 files changed, 1 insertions, 12 deletions
diff --git a/libpod/container.go b/libpod/container.go
index ccf864826..06dca823a 100644
--- a/libpod/container.go
+++ b/libpod/container.go
@@ -106,8 +106,6 @@ type Container struct {
}
// TODO fetch IP and Subnet Mask from networks once we have updated OCICNI
-// TODO enable pod support
-// TODO Add readonly support
// containerState contains the current state of the container
// It is stored on disk in a tmpfs and recreated on reboot
@@ -162,8 +160,6 @@ type ContainerConfig struct {
RootfsImageName string `json:"rootfsImageName,omitempty"`
// Whether to mount volumes specified in the image
ImageVolumes bool `json:"imageVolumes"`
- // Whether to make the container read only
- ReadOnly bool `json:"readOnly"`
// Src path to be mounted on /dev/shm in container
ShmDir string `json:"ShmDir,omitempty"`
// Size of the container's SHM
diff --git a/libpod/sql_state_internal.go b/libpod/sql_state_internal.go
index 271dff474..064be7955 100644
--- a/libpod/sql_state_internal.go
+++ b/libpod/sql_state_internal.go
@@ -195,7 +195,6 @@ func prepareDB(db *sql.DB) (err error) {
RootfsImageID TEXT NOT NULL,
RootfsImageName TEXT NOT NULL,
ImageVolumes INTEGER NOT NULL,
- ReadOnly INTEGER NOT NULL,
ShmDir TEXT NOT NULL,
ShmSize INTEGER NOT NULL,
StaticDir TEXT NOT NULL,
@@ -230,7 +229,6 @@ func prepareDB(db *sql.DB) (err error) {
CgroupParent TEXT NOT NULL,
CHECK (ImageVolumes IN (0, 1)),
- CHECK (ReadOnly IN (0, 1)),
CHECK (SHMSize>=0),
CHECK (Privileged IN (0, 1)),
CHECK (NoNewPrivs IN (0, 1)),
@@ -403,7 +401,6 @@ func (s *SQLState) ctrFromScannable(row scannable) (*Container, error) {
rootfsImageID string
rootfsImageName string
imageVolumes int
- readOnly int
shmDir string
shmSize int64
staticDir string
@@ -459,7 +456,6 @@ func (s *SQLState) ctrFromScannable(row scannable) (*Container, error) {
&rootfsImageID,
&rootfsImageName,
&imageVolumes,
- &readOnly,
&shmDir,
&shmSize,
&staticDir,
@@ -524,7 +520,6 @@ func (s *SQLState) ctrFromScannable(row scannable) (*Container, error) {
ctr.config.RootfsImageID = rootfsImageID
ctr.config.RootfsImageName = rootfsImageName
ctr.config.ImageVolumes = boolFromSQL(imageVolumes)
- ctr.config.ReadOnly = boolFromSQL(readOnly)
ctr.config.ShmDir = shmDir
ctr.config.ShmSize = shmSize
ctr.config.StaticDir = staticDir
@@ -718,7 +713,7 @@ func (s *SQLState) addContainer(ctr *Container) (err error) {
?, ?, ?, ?, ?,
?, ?, ?, ?, ?,
?, ?, ?, ?, ?,
- ?, ?, ?, ?, ?
+ ?, ?, ?, ?
);`
addCtrState = `INSERT INTO containerState VALUES (
?, ?, ?, ?, ?,
@@ -800,7 +795,6 @@ func (s *SQLState) addContainer(ctr *Container) (err error) {
ctr.config.RootfsImageID,
ctr.config.RootfsImageName,
boolToSQL(ctr.config.ImageVolumes),
- boolToSQL(ctr.config.ReadOnly),
ctr.config.ShmDir,
ctr.config.ShmSize,
ctr.config.StaticDir,
diff --git a/libpod/test_common.go b/libpod/test_common.go
index 95a77d266..b6188ce80 100644
--- a/libpod/test_common.go
+++ b/libpod/test_common.go
@@ -21,7 +21,6 @@ func getTestContainer(id, name, locksDir string) (*Container, error) {
RootfsImageID: id,
RootfsImageName: "testimg",
ImageVolumes: true,
- ReadOnly: true,
StaticDir: "/does/not/exist/",
LogPath: "/does/not/exist/",
Stdin: true,