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

localMetadata is getting locked when trying to have more than one replica of cloudserver #4675

Open
apoorva-dapake-bh opened this issue Jul 21, 2022 · 1 comment

Comments

@apoorva-dapake-bh
Copy link

apoorva-dapake-bh commented Jul 21, 2022

I need to have multiple instances of zenko cloudserver running.
To have this I tried changing yaml file to have replicas: 2 as mentioned below:

apiVersion: apps/v1
kind: Deployment
metadata:
  name: zenko
spec:
  **replicas: 2**

But getting error at start up of second pod

{"name":"S3","time":1658382950138,"**error":"IO error: lock /usr/src/app/lib/../localMetadata/rootDB/LOCK: Resource temporarily unavailable"**,"stack":"OpenError: IO error: lock /usr/src/app/lib/../localMetadata/rootDB/LOCK: Resource temporarily unavailable\n at /usr/src/app/node_modules/levelup/lib/levelup.js:119:23\n at /usr/src/app/node_modules/abstract-leveldown/abstract-leveldown.js:38:14\n at /usr/src/app/node_modules/levelup/node_modules/deferred-leveldown/deferred-leveldown.js:31:21\n at /usr/src/app/node_modules/encoding-down/node_modules/abstract-leveldown/abstract-leveldown.js:38:14\n at /usr/src/app/node_modules/abstract-leveldown/abstract-leveldown.js:38:14","level":"fatal","message":"caught error","hostname":"zenko-85b78565d-r24pk","pid":106}

yaml file section for volume mounts:

volumeMounts:
       - name: zenkodata
         mountPath: /usr/src/app/localMetadata
         subPath: localMetadata
       - mountPath: /usr/src/app/locationConfig.json
         subPath: locationConfig.json
         name: locationconfig
volumes:
       - name: zenkodata
         persistentVolumeClaim:
           claimName: zenko-claim
       - configMap:
           name: config-map-zenko
           items:
             - key: locationConfig.json
               path: locationConfig.json              
         name: locationconfig

Please help me to have multiple instances for cloudserver running.

@andhrs
Copy link

andhrs commented Jul 27, 2022

Im receiving the same error aswell, when trying to run multiple replicas.
Have you had any luck finding out the cause?
Thanks in advance.
EDIT: I suspect that it is likely because my storage provisioner for my cluster is just local-path, and that it cannot handle sharing between multiple pods/containers. I haven't had time to test out with using one that can support RWX, but will see if I can test it out later.
UPDATE: tested out with a storage class supporting RWX, but it yielded the same error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants