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

Error to deploy mongo with azure file storage #58308

Closed
tenkjm opened this issue Jan 15, 2018 · 10 comments
Closed

Error to deploy mongo with azure file storage #58308

tenkjm opened this issue Jan 15, 2018 · 10 comments
Labels
kind/bug Categorizes issue or PR as related to a bug. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.

Comments

@tenkjm
Copy link

tenkjm commented Jan 15, 2018

Is this a BUG REPORT or FEATURE REQUEST?:

Uncomment only one, leave it on its own line:

/kind bug

/kind feature
@kubernetes/sig-Azure-azure

What happened: When i tired to deploy mongo with persistent storage mongo error was detected

What you expected to happen:

Error has happend when i try to deploy mongo with azure file storage.
Share mongo was created in azure.

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

kind: Secret
metadata:
  name: azure-secret
  namespace: feedsspace
type: Opaque
data:
  azurestorageaccountname: base64name==
  azurestorageaccountkey: base64key==

apiVersion: v1
kind: PersistentVolume
metadata:
  name: mong
  annotations: 
spec:
  capacity:
    storage: 5Gi
  accessModes:
  - ReadWriteOnce
  azureFile:
    secretName: azure-secret
    shareName: mongo
    readOnly: false
  claimRef:
    name: mong-pvc
    namespace: feedsspace

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: mong-pvc
  namespace: feedsspace
spec:
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: 5Gi

kind: Deployment
apiVersion: extensions/v1beta1
metadata:
  name: mongo
  labels:
    name: mongo
spec:
  strategy:
    type: Recreate
  template:
    metadata:
      labels:
        app: mongo
        tier: mongo
    spec:      
      containers:
      - name: mongo
        image: mongo:latest
        ports:
        - containerPort: 27017
          protocol: TCP
          name: mongo 
        volumeMounts:
        - mountPath: /data/db
          name: az-files-mongo-storage
      volumes:
      - name: az-files-mongo-storage
        persistentVolumeClaim:
          claimName: mong-pvc

after deploy error happend

2018-01-15T21:13:05.199+0000 I CONTROL  [initandlisten] MongoDB starting : pid=1 port=27017 dbpath=/data/db 64-bit host=mongo-cb8d695f4-ntwbp
2018-01-15T21:13:05.199+0000 I CONTROL  [initandlisten] db version v3.6.1
2018-01-15T21:13:05.199+0000 I CONTROL  [initandlisten] git version: 025d4f4fe61efd1fb6f0005be20cb45a004093d1
2018-01-15T21:13:05.199+0000 I CONTROL  [initandlisten] OpenSSL version: OpenSSL 1.0.1t  3 May 2016
2018-01-15T21:13:05.199+0000 I CONTROL  [initandlisten] allocator: tcmalloc
2018-01-15T21:13:05.199+0000 I CONTROL  [initandlisten] modules: none
2018-01-15T21:13:05.199+0000 I CONTROL  [initandlisten] build environment:
2018-01-15T21:13:05.199+0000 I CONTROL  [initandlisten]     distmod: debian81
2018-01-15T21:13:05.199+0000 I CONTROL  [initandlisten]     distarch: x86_64
2018-01-15T21:13:05.199+0000 I CONTROL  [initandlisten]     target_arch: x86_64
2018-01-15T21:13:05.199+0000 I CONTROL  [initandlisten] options: { net: { bindIpAll: true } }
2018-01-15T21:13:05.199+0000 I STORAGE  [initandlisten] exception in initAndListen: Location28596: Unable to determine status of lock file in the data directory /data/db: boost::filesystem::status: Permission denied: "/data/db/mongod.lock", terminating
2018-01-15T21:13:05.199+0000 I CONTROL  [initandlisten] now exiting
2018-01-15T21:13:05.200+0000 I CONTROL  [initandlisten] shutting down with code:100

Anything else we need to know?:

Environment:

  • Kubernetes version (use kubectl version):
    Client Version: version.Info{Major:"1", Minor:"9", GitVersion:"v1.9.0", GitCommit:"925c127ec6b946659ad0fd596fa959be43f0cc05", GitTreeState:"clean", BuildDate:"2017-12-15T21:07:38Z", GoVersion:"go1.9.2", Compiler:"gc", Platform:"linux/amd64"}
    Server Version: version.Info{Major:"1", Minor:"9", GitVersion:"v1.9.0", GitCommit:"925c127ec6b946659ad0fd596fa959be43f0cc05", GitTreeState:"clean", BuildDate:"2017-12-15T20:55:30Z", GoVersion:"go1.9.2", Compiler:"gc", Platform:"linux/amd64"}

  • Cloud provider or hardware configuration: 3 GB, 2 cores

  • OS (e.g. from /etc/os-release): 16.04 LTS (Xenial Xerus)

  • Kernel (e.g. uname -a):Linux master 4.4.0-104-generic Configurable restart behavior #127-Ubuntu SMP Mon Dec 11 12:16:42 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

  • Install tools:

  • Others:

@k8s-ci-robot k8s-ci-robot added needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. kind/bug Categorizes issue or PR as related to a bug. labels Jan 15, 2018
@fejta
Copy link
Contributor

fejta commented Jan 28, 2018

@kubernetes/sig-azure-misc

@k8s-ci-robot k8s-ci-robot added sig/azure and removed needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Jan 28, 2018
@andyzhangx
Copy link
Member

@andyzhangx
Copy link
Member

BTW, you could set mountOptions as 0777 to fix this issue.

@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 May 9, 2018
@andyzhangx
Copy link
Member

Happened to check this issue again, I have verified that azurefile plugin does not support mongodb now due to file permission could not be changed after azure file mount, instead, you could use azuredisk, it would work.

@fejta-bot
Copy link

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

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 rotten
/remove-lifecycle stale

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Jun 13, 2018
@fejta-bot
Copy link

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

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

@andres-carrilloAdapt2
Copy link

referencing this issue: Azure/AKS#716

I am attempting to use azure file share for mongo db but i am getting above error.
I previously tried with azure-disk but am getting the error in referenced issue. Please check and let me know if you find anything

@andyzhangx
Copy link
Member

@andres-carrilloAdapt2 I have verified that azurefile plugin(cifs protocol) does not support mongodb now due to file permission could not be changed after azure file mount, instead, you could use azuredisk, it would work. Let's address the azure disk issue in Azure/AKS#716

@andyzhangx
Copy link
Member

Correction: I found use docker.io/bitnami/mongodb:4.0.2-debian-9 image based on azure file works now, here is the example:
https://github.com/andyzhangx/demo/blob/master/linux/azurefile/azurefile-mongodb.yaml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.
Projects
None yet
Development

No branches or pull requests

6 participants