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

Fix install: use dynamic docker root dir instead of hardcoded one #3064

Merged
merged 1 commit into from
May 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions install/update-docker-volume-permissions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ echo "${_group}Ensuring Kafka and Zookeeper volumes have correct permissions ...
# Only supporting platforms on linux x86 platforms and not apple silicon. I'm assuming that folks using apple silicon are doing it for dev purposes and it's difficult
# to change permissions of docker volumes since it is run in a VM.
if [[ "$DOCKER_PLATFORM" = "linux/amd64" && -n "$(docker volume ls -q -f name=sentry-zookeeper)" && -n "$(docker volume ls -q -f name=sentry-kafka)" ]]; then
zookeeper_data_dir="/var/lib/docker/volumes/sentry-zookeeper/_data"
kafka_data_dir="/var/lib/docker/volumes/sentry-kafka/_data"
zookeeper_log_data_dir="/var/lib/docker/volumes/${COMPOSE_PROJECT_NAME}_sentry-zookeeper-log/_data"
docker_root_dir=$(docker info --format '{{.DockerRootDir}}')
zookeeper_data_dir="${docker_root_dir}/volumes/sentry-zookeeper/_data"
kafka_data_dir="${docker_root_dir}/volumes/sentry-kafka/_data"
zookeeper_log_data_dir="${docker_root_dir}/volumes/${COMPOSE_PROJECT_NAME}_sentry-zookeeper-log/_data"
chmod -R a+w $zookeeper_data_dir $kafka_data_dir $zookeeper_log_data_dir && returncode=$? || returncode=$?
if [[ $returncode == "1" ]]; then
echo "WARNING: Error when setting appropriate permissions for zookeeper, kafka, and zookeeper log docker volumes. This may corrupt your self-hosted install. See https://github.com/confluentinc/kafka-images/issues/127 for context on why this was added."
Expand Down
Loading