Skip to content

touch: cannot touch '/opt/couchdb/etc/local.d/docker.ini': Read-only file system #192

Closed
@adamko147

Description

@adamko147

When all ini files are mounted from ConfigMap into /opt/couchdb/etc/local.d couchdb won't start with error "touch: cannot touch '/opt/couchdb/etc/local.d/docker.ini': Read-only file system"

Expected Behavior

Since all configuration is provided in ini files (no environment variables needed) couchdb should start without problems

Current Behavior

currently docker-entrypoint.sh fails with "touch: cannot touch '/opt/couchdb/etc/local.d/docker.ini': Read-only file system"

Possible Solution

Possible solution would to touch the config file only when needed, e.g if admins not found in mounted config

Steps to Reproduce (for bugs)

Try to apply following manifest

apiVersion: v1
kind: ConfigMap
metadata:
  name: couchdb
data:
  couch.ini: |
    [admins]
    admin = -pbkdf2-c1f5f3ba577b63a07ccdb90929a1710d,d18f8ab420a27636470ae5205e082b27,10

    [couchdb]
    uuid = 792c574198077a896c234d9d99713b40
    single_node=true

    [couch_httpd_auth]
    secret = d5addf639614a8364d5e7d4def000b48

---

apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: couchdb
spec:
  selector:
    matchLabels:
      app: couchdb
  serviceName: couchdb
  replicas: 1
  template:
    metadata:
      labels:
        app: couchdb
    spec:
      terminationGracePeriodSeconds: 5
      containers:
      - name: couchdb
        image: couchdb:3.1.1
        ports:
        - name: couchdb
          containerPort: 5984
        volumeMounts:
        - name: couchdb-config
          mountPath: /opt/couchdb/etc/local.d
      volumes:
      - name: couchdb-config
        configMap:
          name: couchdb

Context

Trying to deploy couchdb with pre-defined ini values mounted from kubernetes config maps

Your Environment

  • Version used:
  • kubernetes 1.18
  • couchdb 3.1.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions