Skip to content

Podman with image volume fails to create directory after restart #844

@mheon

Description

@mheon

Is this a BUG REPORT or FEATURE REQUEST?:

/kind bug

Description
Restarting a container using an image volumes makes podman unable to create directories inside the volume mount.

Steps to reproduce the issue:

  1. podman run -ti --name zmdb -e MYSQL_USER=zmuser -e MYSQL_PASSWORD=zmpass -e MYSQL_DATABASE=zm -e MYSQL_ROOT_PASSWORD=mysqlpassword centos/mariadb-101-centos7

  2. podman stop --latest

  3. podman start --latest

Describe the results you received:

Fatal error Can't create database directory '/var/lib/mysql/data/mysql'

Describe the results you expected:

Mariadb starts successfully in the container

Additional information you deem important (e.g. issue happens only occasionally):

The image mariadb-101-centos7 defines the following volume:
VOLUME ["/var/lib/mysql/data"]

Output of podman version:

Observed on upstream master and Fedora released 0.5.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    locked - please file new issue/PRAssist humans wanting to comment on an old issue or PR with locked comments.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions