timescale / timescaledb-docker-ha

Create Docker images containing TimescaleDB, Patroni to be used by developers and Kubernetes.
Apache License 2.0
162 stars 44 forks source link

Missing text editor in image. Unable to use patronictl edit-config. #321

Closed wayofka closed 8 months ago

wayofka commented 2 years ago

Problem: Some of the cluster settings cannot be updated.

For example: max_connections max_locks_per_transaction max_worker_processes max_prepared_transactions

Cause: These settings from bootstrap/dcs section are stored in etcd during cluster init. The changes in the cluster yaml file is not applied (inc. cluster restart), it is necessary to use patronictl edit-config, which apply the configuration into etcd ( + cluster restart ). But this is not possible because no editor is available in docker image.

podman exec -it timescaledb /bin/bash -c 'patronictl -c /home/postgres/postgres.yml edit-config'
Error: EDITOR environment variable is not set. editor or vi are not available

Environment: Timescaledb + patroni + pgbouncer + etcd + haproxy Docker image: timescaledb-ha:pg14.4-ts2.7.2-latest

Solution: Add to the docker image text editor, ideally vi. RUN apt-get install -y vim

VMM-Mtech commented 1 year ago

At least there's sed. We managed to do something with it. See this for some examples.

graveland commented 8 months ago

vim-tiny is included for quite a while now