-
Notifications
You must be signed in to change notification settings - Fork 473
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
Failed to start server: rename file encounter error: Resource busy #2137
Comments
Hi @kinoute Thanks for your feedback. The root cause is the single mount file And this start error was introduced in #1776 which would try to rewrite the configuration after loading the namespaces. Maybe we should turn this error into a warning when starting the server. You can workaround this issue by mounting the whole dir where kvrocks.conf exists to |
Thanks for the quick answer @git-hulk ! I was able to fix it with your workaround. I needed to create an initContainer for this as mounting a secret as volume is now read-only since Kubernetes 1.9. For those who are interested, here is a working manifest: ---
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: kvrocks
namespace: sahar-svc
spec:
selector:
matchLabels:
run: kvrocks
serviceName: "kvrocks"
replicas: 1
template:
metadata:
labels:
app: kvrocks
run: kvrocks
spec:
initContainers:
- name: copy-kvrocks-conf
image: busybox
command: ["sh", "-c", "cp /tmp/kvrocks.conf /var/lib/kvrocks/"]
volumeMounts:
- name: kvrocks-config
mountPath: /tmp/kvrocks.conf
subPath: kvrocks.conf
- name: kvrocks-folder
mountPath: /var/lib/kvrocks
containers:
- name: kvrocks
image: apache/kvrocks:2.7.0
volumeMounts:
- name: kvrocks-folder
mountPath: /var/lib/kvrocks
- name: kvrocks
mountPath: /data
ports:
- containerPort: 6379
resources:
requests:
cpu: 1
memory: 2Gi
limits:
memory: 2Gi
volumes:
- name: kvrocks-folder
emptyDir: {}
- name: kvrocks
persistentVolumeClaim:
claimName: kvrocks
- name: kvrocks-config
secret:
secretName: kvrocks-config |
@kinoute Thanks for your sharing. I would refer them here if other folks also suffer from this issue. |
Search before asking
Version
2.7.0
Minimal reproduce step
Kubernetes manifest:
What did you expect to see?
Something like this (here running 2.5.0):
What did you see instead?
Anything Else?
We are trying to update our KvRocks instances from 2.5.0 to 2.7.0. Unfortunately, we encounter the same error over and over again, even on fresh installs.
I found issues talking about this error where it seems to be about namespaces (we didn't change that in the conf) and/or wrong lock on the conf file and a restart could be fix the problem, it doesn't.
It runs perfectly on 2.5.0. I looked at the Dockerfile and I don't see any major changes that could lead to this error. I also tried to override the entrypoint/command of the container, put the conf file elsewhere and call it with "-c", no chances.
Are you willing to submit a PR?
The text was updated successfully, but these errors were encountered: