Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

minikube hostpath mount permissions #3599

Closed
slashdottir opened this issue Jan 29, 2019 · 4 comments
Closed

minikube hostpath mount permissions #3599

slashdottir opened this issue Jan 29, 2019 · 4 comments
Labels
area/mount help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. priority/backlog Higher priority than priority/awaiting-more-evidence.

Comments

@slashdottir
Copy link

Is this a BUG REPORT or FEATURE REQUEST? (choose one): BUG

Please provide the following details:

Environment:

minikube version: v0.33.1
OS macOS 10.13.6
VM driver: virtualbox
ISO Version: Boot2DockerURL: file://Users/foo/.minikube/cache/iso/minikube-v0.33.1.iso
Kubernetes: v1.10.11

What happened:
I'm trying to mount a local directory to be used by a container in kubernetes, but getting this error:

$ kubectl logs mysql-pd

chown: changing ownership of '/var/lib/mysql/': Input/output error

What you expected to happen:

I should be able to maintain a persistent volume for the mysql database that survives the container shutting down

How to reproduce it (as minimally and precisely as possible):

I'm starting up minikube with mounted directory:

minikube start --mount-string /Users/foo/mysql_data:/mysql_data --mount

deployment.yml

apiVersion: v1
kind: Pod
metadata:
  name: mysql-pd
spec:
  containers:
  - image: mysql:5.7
    name: mysql-container
    env:
    - name: MYSQL_ROOT_PASSWORD
      value: ""
    - name: MYSQL_ALLOW_EMPTY_PASSWORD
      value: "yes"
    ports:
      - containerPort: 3306
    volumeMounts:
    - mountPath: "/var/lib/mysql"
      name: host-mount
  volumes:
  - name: host-mount
    hostPath:
      path: "/mysql_data"
@tstromberg tstromberg added help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. area/mount priority/backlog Higher priority than priority/awaiting-more-evidence. labels Jan 29, 2019
@tstromberg
Copy link
Contributor

I suspect this may be a duplicate of #2290, but won't close this until I have more evidence that this is the case.

@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Apr 30, 2019
@tstromberg
Copy link
Contributor

I believe this issue was resolved in the v1.1.0 release. Please try upgrading to the latest release of minikube, and if the same issue occurs, please re-open this bug. Thank you opening this bug report, and for your patience!

@damorosodaragona
Copy link

Same problem. When i try to mount a local directory to be used by a container in kubernetes, i get this error: Can't change data directory owner. But not after 90d of inactivity, but when i try to start it for the first time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/mount help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. priority/backlog Higher priority than priority/awaiting-more-evidence.
Projects
None yet
Development

No branches or pull requests

5 participants