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

Redis Replication service pointing to read-only replica #629

Open
diptripa opened this issue Sep 15, 2023 · 8 comments
Open

Redis Replication service pointing to read-only replica #629

diptripa opened this issue Sep 15, 2023 · 8 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@diptripa
Copy link

What version of redis operator are you using?

redis-operator version: 0.15

Does this issue reproduce with the latest release?
Yes

What operating system and processor architecture are you using (kubectl version)?

kubectl version Output
1.25.11

What did you do?

  1. Created redis-replication using this manifest:
---
apiVersion: redis.redis.opstreelabs.in/v1beta1
kind: RedisReplication
metadata:
  name: redis-replication
#  annotations:
#    redis.opstreelabs.in/skip-reconcile: "true"
spec:
  clusterSize: 5
  kubernetesConfig:
    image: quay.io/opstree/redis:v7.0.5
    imagePullPolicy: IfNotPresent
    resources:
      requests:
        cpu: 200m
        memory: 256Mi
      limits:
        cpu: 200m
        memory: 256Mi
  storage:
    volumeClaimTemplate:
      spec:
        storageClassName: basic-nfs-rwx-retain
        accessModes: ["ReadWriteOnce"]
        resources:
          requests:
            storage: 50Gi
  redisExporter:
    enabled: true
    image: quay.io/opstree/redis-exporter:v1.44.0
    imagePullPolicy: Always
    # env:
    # - name: REDIS_EXPORTER_INCL_SYSTEM_METRICS
    #   value: "true"
  securityContext:
    runAsUser: 1000 
  1. Changed some parameters like storage requests and cpu, memory requests.
  2. Connected to service redis-replication:6379 from app.

What did you expect to see?
That it is serving the cache without any issues.

What did you see instead?

15
You can't write against a read only replica.
14
200
13
You can't write against a read only replica.
12
200
11
You can't write against a read only replica.
10
200
9
You can't write against a read only replica.
@diptripa diptripa added the bug Something isn't working label Sep 15, 2023
@jwitko
Copy link

jwitko commented Oct 10, 2023

Same issue here. It would appear the there is no separate service created that targets the master specifically. It also appears this may be the intentional design and we have to use the sentinel setup to act as a proxy layer for this?

@SecretMineDE
Copy link

We have the same issue. A possible solution would be to use some kind of sidecar next to the redis replication containers to change the labels or have the operator do this.

@elrondwong
Copy link

Same issue here

@aysegulozkaya
Copy link

Same issue. Is there any solution?

@shubham-cmyk shubham-cmyk added this to the v0.16.0 milestone Dec 11, 2023
@shubham-cmyk
Copy link
Member

Didn't get time for this.
I would fix this asap.
Putting this in the next milestone

@elrondwong
Copy link

During concile patch role label of pods

Copy link

This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. We are sorry that we haven't been able to prioritize it yet. If you have any new additional information, please include it with your comment!

@github-actions github-actions bot added the stale Mark as stale label Dec 12, 2024
@Leo791
Copy link

Leo791 commented Dec 30, 2024

We are having this issue.

@github-actions github-actions bot removed the stale Mark as stale label Dec 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

7 participants