Infos:
- Used Zammad version: 4.0.0
- Used Zammad installation source: docker-compose (with persisant storage in a Gitlab-CI implementation)
- Operating system: Linux
- Browser + version: Firefox 86.0.1
Expected behavior:
No error, and to be able to change users permissions
Actual behavior:
When trying to change a specific user (LDAP) permissions I get this:
PG::DataCorrupted: ERROR: could not read block 46 in file "base/16385/17391": read only 0 of 8192 bytes : INSERT INTO "active_job_locks" ("lock_key", "active_job_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id"
Steps to reproduce the behavior:
- Open the specific user (bartas) and change permissions and click save.
Some background
We have setup Zammad in a Gitlab-CI enviroment with persistent storage to a NFS sevrer in the same subnet.
swarm-compose.yml
version: '3.7'
services:
zammad-backup:
command: ["zammad-backup"]
depends_on:
- zammad-railsserver
entrypoint: /usr/local/bin/backup.sh
environment:
- BACKUP_SLEEP=86400
- HOLD_DAYS=10
- POSTGRESQL_USER=${POSTGRES_USER}
- POSTGRESQL_PASSWORD=${POSTGRES_PASS}
image: ${IMAGE_REPO}:zammad-postgresql${VERSION}
links:
- zammad-postgresql
restart: ${RESTART}
volumes:
- zammad-backup:/var/tmp/zammad
- zammad-data:/opt/zammad
zammad-elasticsearch:
environment:
- discovery.type=single-node
image: ${IMAGE_REPO}:zammad-elasticsearch${VERSION}
restart: ${RESTART}
volumes:
- elasticsearch-data:/usr/share/elasticsearch/data
zammad-init:
command: ["zammad-init"]
depends_on:
- zammad-postgresql
environment:
- POSTGRESQL_USER=${POSTGRES_USER}
- POSTGRESQL_PASS=${POSTGRES_PASS}
image: ${IMAGE_REPO}:zammad${VERSION}
links:
- zammad-elasticsearch
- zammad-postgresql
restart: on-failure
volumes:
- zammad-data:/opt/zammad
zammad-memcached:
command: memcached -m 256M
image: memcached:1.6.9-alpine
restart: ${RESTART}
zammad-nginx:
command: ["zammad-nginx"]
depends_on:
- zammad-railsserver
image: ${IMAGE_REPO}:zammad${VERSION}
links:
- zammad-railsserver
- zammad-websocket
restart: ${RESTART}
volumes:
- zammad-data:/opt/zammad
environment:
- VIRTUAL_HOST=${SWARM_PROD_URL}
- NGINX_SERVER_SCHEME=https
networks:
- default
- ${PROXY_NETWORK}
deploy:
resources:
limits:
cpus: '4.0'
memory: 8GB
labels:
- traefik.backend.loadbalancer.stickiness=true
- traefik.frontend.rule=Host:${SWARM_PROD_URL}
- traefik.port=8080
restart_policy:
condition: any
update_config:
parallelism: 1
order: start-first
replicas: 1
zammad-postgresql:
environment:
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASS}
image: ${IMAGE_REPO}:zammad-postgresql${VERSION}
restart: ${RESTART}
volumes:
- postgresql-data:/var/lib/postgresql/data
zammad-railsserver:
command: ["zammad-railsserver"]
depends_on:
- zammad-memcached
- zammad-postgresql
image: ${IMAGE_REPO}:zammad${VERSION}
links:
- zammad-elasticsearch
- zammad-memcached
- zammad-postgresql
restart: ${RESTART}
volumes:
- zammad-data:/opt/zammad
zammad-scheduler:
command: ["zammad-scheduler"]
depends_on:
- zammad-memcached
- zammad-railsserver
image: ${IMAGE_REPO}:zammad${VERSION}
links:
- zammad-elasticsearch
- zammad-memcached
- zammad-postgresql
restart: ${RESTART}
volumes:
- zammad-data:/opt/zammad
zammad-websocket:
command: ["zammad-websocket"]
depends_on:
- zammad-memcached
- zammad-railsserver
image: ${IMAGE_REPO}:zammad${VERSION}
links:
- zammad-postgresql
- zammad-memcached
restart: ${RESTART}
volumes:
- zammad-data:/opt/zammad
volumes:
elasticsearch-data:
driver: local
driver_opts:
type: nfs
o: addr=192.168.7.157,rw,soft,nolock,vers=4.1
device: ":/storage/${SWARM_PROD_URL}/elasticsearch-data"
postgresql-data:
driver: local
driver_opts:
type: nfs
o: addr=192.168.7.157,rw,soft,nolock,vers=4.1
device: ":/storage/${SWARM_PROD_URL}/postgresql-data"
zammad-backup:
driver: local
driver_opts:
type: nfs
o: addr=192.168.7.157,rw,soft,nolock,vers=4.1
device: ":/storage/${SWARM_PROD_URL}/zammad-backup"
zammad-data:
driver: local
driver_opts:
type: nfs
o: addr=192.168.7.157,rw,soft,nolock,vers=4.1
device: ":/storage/${SWARM_PROD_URL}/zammad-data"
networks:
traefik-net:
external: true
.env
# don't forget to add the minus before the version
VERSION=-4.0.0-7
IMAGE_REPO=zammad/zammad-docker-compose
POSTGRES_PASS=zammad
POSTGRES_USER=zammad
RESTART=always
PROXY_NETWORK=traefik-net
NGINX_SERVER_SCHEME=https
SWARM_PROD_URL=zammad01.domain.com
.gitlab-ci.yml
image: docker:stable
variables:
DOCKER_DRIVER: overlay2
DOCKER_TLS_CERTDIR: "/certs"
services:
- name: docker:dind
stages:
- deploy
Deploy Zammad:
stage: deploy
script:
- echo "Deploy Zammad to production"
- set -a && . .env set +a
- docker stack deploy --compose-file swarm-compose.yml zammad01-domain-com
when: always
Is there a way around this, or do we need to redeploy the whole thing? Also, are there any recomendations regarding using persistent storage, especially for the DB?