mirror of
https://github.com/containers/podman.git
synced 2025-07-15 03:02:52 +08:00
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
This commit is contained in:
@ -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
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
Reference in New Issue
Block a user