-
Notifications
You must be signed in to change notification settings - Fork 54
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
Access denied on /opt/infinispan/server/data/___global.lck. #392
Comments
I think is related to this: |
Hi @rigazilla Im having the issue with brand new created infinispan crd, there is no "old" lock files in dir. I have mounted the volume to a "dummy" pod and changed the fs permissions, to I can't find an option to configure the security-context, custom pv or init container that i could use to fix the permissions. Any other suggestions in how could i fix this without having to manually entering the volume and changing the permissions for each new replica? Thanks |
@mxandeco how would you configure the security-context in a deployment/pod? It would be great to have a feature for that allows to do that also in the infinispan CR. In the meanwhile as a hack workaround you can try adding this entry in the
this should start a busybox init container that just set writable access to the |
@rigazilla The Regarding the:
Thanks for the support. |
I would prefer to have a clean solution for this, i.e. setting context correctly or understand which are the conditions that lead to a readonly pv. |
@mxandeco How did you add |
@K890 I used the config bellow: apiVersion: apps/v1
kind: Deployment
metadata:
name: infinispan-operator
namespace: core
spec:
replicas: 1
selector:
matchLabels:
name: infinispan-operator
template:
metadata:
labels:
name: infinispan-operator
spec:
serviceAccountName: infinispan-operator
containers:
- name: infinispan-operator
image: jboss/infinispan-operator:1.1.1
ports:
- containerPort: 60000
name: metrics
command:
- infinispan-operator
imagePullPolicy: Always
env:
- name: WATCH_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: OPERATOR_NAME
value: "infinispan-operator"
- name: MAKE_DATADIR_WRITABLE
value: "true" |
@mxandeco If I try to change the infinispan-operator spec directly by editing it, it is overridden in some time by the OLM/CSV. However, I was able to change this spec permanently by editing the P.S. If somebody gets an creationTimestamp= null error while updating the |
Unfortunately that does not work for me. |
@dicolasi what is your target operator deployment platform and the operator version? |
|
infinispan-operator.v2.1.3 |
@dicolasi where you've configured MAKE_DATADIR_WRITABLE env variable to configure this option? |
@dmvolod in the csvs. |
Can you validate, that's applied to the operator deployment and Pod |
Interesting:
here the content of that bit:
|
That's the reason why OLM couldn't apply configuration to the Deployment. |
what should I look for? The env variable is not there. |
|
@dmvolod just to clarify: is this a bug with the operator? |
Not sure, this is specific k8s platform limitation and should work |
@dmvolod I am re-deploying the operator. Need 3 minutes. |
|
I have modified the csv and now deploy has the environment variable set. No success however. |
ok sorted! The trick was to remove the old stateful set. |
Thanks for the support @dmvolod |
You are welcome |
@dmvolod still see the same error with a new installation:
|
Just hit the issue with the Operator in AKS. IT does look like adding the fsGroup to the STS makes a difference e.g.
Current STS template does not have that configuration. I can raise PR to add it if this is Ok as there does not seem to be any apparent way of getting around that problem when deploying via OLM? STS reference - infinispan-operator/pkg/reconcile/pipeline/infinispan/handler/provision/statefulsets.go Line 89 in 9fe9afc
|
It's not possible for us to hard code the You can workaround this problem in OLM by adding the following to your subscription: spec:
...
config:
env:
- name: MAKE_DATADIR_WRITABLE
value: "true" See here for more details on OLM env variables. |
Thanks a lot @ryanemerson! The best engineering solution involves writing no code :) PS - I would not opted for the hard code but rather than the config enhancement of the operator fortunately the provided solution works perfectly. |
I have this error when i what use volumen to http://opt/infinispan/server/data/ ( �[33m2024-05-16 10:56:49,052 WARN (main) [org.infinispan.CONTAINER] ISPN000574: Global state cannot persisted because it is incomplete (usually caused by errors at startup).�[m | infineror -- | -- May 16, 2024 at 12:56 (UTC+2:00) | �[1;31m2024-05-16 10:56:49,049 ERROR (main) [org.infinispan.CONFIG] ISPN000660: DefaultCacheManager start failed, stopping any running components org.infinispan.commons.CacheConfigurationException: ISPN000512: Cannot acquire lock '/opt/infinispan/server/data/___global.lck' for persistent global state ) Someone can healp me please |
@ramonmoraga That issue is not directly related to this one, let's continue the discussion on #2082 |
Following the manual install tutorial from https://github.com/infinispan/infinispan-simple-tutorials/tree/master/operator.
Tried versions
1.1.0
and1.1.1
, deploying on EKS i can confirm both pv and pvc were created properly, the pods won't start, and I can see the logs:The text was updated successfully, but these errors were encountered: