Skip to content

Commit

Permalink
@Bstract sockets - do not chown
Browse files Browse the repository at this point in the history
  • Loading branch information
grooverdan committed Jun 26, 2024
1 parent c157618 commit 6cc619d
Show file tree
Hide file tree
Showing 14 changed files with 42 additions and 14 deletions.
4 changes: 3 additions & 1 deletion 10.11-ubi/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,9 @@ docker_create_db_directories() {
# this will cause less disk access than `chown -R`
find "$DATADIR" \! -user mysql \( -exec chown mysql: '{}' + -o -true \)
# See https://github.com/MariaDB/mariadb-docker/issues/363
find "${SOCKET%/*}" -maxdepth 0 \! -user mysql \( -exec chown mysql: '{}' \; -o -true \)
if [ "${SOCKET:0:1}" != '@' ]; then # not abstract sockets
find "${SOCKET%/*}" -maxdepth 0 \! -user mysql \( -exec chown mysql: '{}' \; -o -true \)
fi

# memory.pressure
local cgroup; cgroup=$(</proc/self/cgroup)
Expand Down
4 changes: 3 additions & 1 deletion 10.11/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,9 @@ docker_create_db_directories() {
# this will cause less disk access than `chown -R`
find "$DATADIR" \! -user mysql \( -exec chown mysql: '{}' + -o -true \)
# See https://github.com/MariaDB/mariadb-docker/issues/363
find "${SOCKET%/*}" -maxdepth 0 \! -user mysql \( -exec chown mysql: '{}' \; -o -true \)
if [ "${SOCKET:0:1}" != '@' ]; then # not abstract sockets
find "${SOCKET%/*}" -maxdepth 0 \! -user mysql \( -exec chown mysql: '{}' \; -o -true \)
fi

# memory.pressure
local cgroup; cgroup=$(</proc/self/cgroup)
Expand Down
4 changes: 3 additions & 1 deletion 10.5/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,9 @@ docker_create_db_directories() {
# this will cause less disk access than `chown -R`
find "$DATADIR" \! -user mysql \( -exec chown mysql: '{}' + -o -true \)
# See https://github.com/MariaDB/mariadb-docker/issues/363
find "${SOCKET%/*}" -maxdepth 0 \! -user mysql \( -exec chown mysql: '{}' \; -o -true \)
if [ "${SOCKET:0:1}" != '@' ]; then # not abstract sockets
find "${SOCKET%/*}" -maxdepth 0 \! -user mysql \( -exec chown mysql: '{}' \; -o -true \)
fi

fi
}
Expand Down
4 changes: 3 additions & 1 deletion 10.6-ubi/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,9 @@ docker_create_db_directories() {
# this will cause less disk access than `chown -R`
find "$DATADIR" \! -user mysql \( -exec chown mysql: '{}' + -o -true \)
# See https://github.com/MariaDB/mariadb-docker/issues/363
find "${SOCKET%/*}" -maxdepth 0 \! -user mysql \( -exec chown mysql: '{}' \; -o -true \)
if [ "${SOCKET:0:1}" != '@' ]; then # not abstract sockets
find "${SOCKET%/*}" -maxdepth 0 \! -user mysql \( -exec chown mysql: '{}' \; -o -true \)
fi

fi
}
Expand Down
4 changes: 3 additions & 1 deletion 10.6/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,9 @@ docker_create_db_directories() {
# this will cause less disk access than `chown -R`
find "$DATADIR" \! -user mysql \( -exec chown mysql: '{}' + -o -true \)
# See https://github.com/MariaDB/mariadb-docker/issues/363
find "${SOCKET%/*}" -maxdepth 0 \! -user mysql \( -exec chown mysql: '{}' \; -o -true \)
if [ "${SOCKET:0:1}" != '@' ]; then # not abstract sockets
find "${SOCKET%/*}" -maxdepth 0 \! -user mysql \( -exec chown mysql: '{}' \; -o -true \)
fi

fi
}
Expand Down
4 changes: 3 additions & 1 deletion 11.1/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,9 @@ docker_create_db_directories() {
# this will cause less disk access than `chown -R`
find "$DATADIR" \! -user mysql \( -exec chown mysql: '{}' + -o -true \)
# See https://github.com/MariaDB/mariadb-docker/issues/363
find "${SOCKET%/*}" -maxdepth 0 \! -user mysql \( -exec chown mysql: '{}' \; -o -true \)
if [ "${SOCKET:0:1}" != '@' ]; then # not abstract sockets
find "${SOCKET%/*}" -maxdepth 0 \! -user mysql \( -exec chown mysql: '{}' \; -o -true \)
fi

# memory.pressure
local cgroup; cgroup=$(</proc/self/cgroup)
Expand Down
4 changes: 3 additions & 1 deletion 11.2/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,9 @@ docker_create_db_directories() {
# this will cause less disk access than `chown -R`
find "$DATADIR" \! -user mysql \( -exec chown mysql: '{}' + -o -true \)
# See https://github.com/MariaDB/mariadb-docker/issues/363
find "${SOCKET%/*}" -maxdepth 0 \! -user mysql \( -exec chown mysql: '{}' \; -o -true \)
if [ "${SOCKET:0:1}" != '@' ]; then # not abstract sockets
find "${SOCKET%/*}" -maxdepth 0 \! -user mysql \( -exec chown mysql: '{}' \; -o -true \)
fi

# memory.pressure
local cgroup; cgroup=$(</proc/self/cgroup)
Expand Down
4 changes: 3 additions & 1 deletion 11.4-ubi/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,9 @@ docker_create_db_directories() {
# this will cause less disk access than `chown -R`
find "$DATADIR" \! -user mysql \( -exec chown mysql: '{}' + -o -true \)
# See https://github.com/MariaDB/mariadb-docker/issues/363
find "${SOCKET%/*}" -maxdepth 0 \! -user mysql \( -exec chown mysql: '{}' \; -o -true \)
if [ "${SOCKET:0:1}" != '@' ]; then # not abstract sockets
find "${SOCKET%/*}" -maxdepth 0 \! -user mysql \( -exec chown mysql: '{}' \; -o -true \)
fi

# memory.pressure
local cgroup; cgroup=$(</proc/self/cgroup)
Expand Down
4 changes: 3 additions & 1 deletion 11.4/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,9 @@ docker_create_db_directories() {
# this will cause less disk access than `chown -R`
find "$DATADIR" \! -user mysql \( -exec chown mysql: '{}' + -o -true \)
# See https://github.com/MariaDB/mariadb-docker/issues/363
find "${SOCKET%/*}" -maxdepth 0 \! -user mysql \( -exec chown mysql: '{}' \; -o -true \)
if [ "${SOCKET:0:1}" != '@' ]; then # not abstract sockets
find "${SOCKET%/*}" -maxdepth 0 \! -user mysql \( -exec chown mysql: '{}' \; -o -true \)
fi

# memory.pressure
local cgroup; cgroup=$(</proc/self/cgroup)
Expand Down
4 changes: 3 additions & 1 deletion 11.5-ubi/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,9 @@ docker_create_db_directories() {
# this will cause less disk access than `chown -R`
find "$DATADIR" \! -user mysql \( -exec chown mysql: '{}' + -o -true \)
# See https://github.com/MariaDB/mariadb-docker/issues/363
find "${SOCKET%/*}" -maxdepth 0 \! -user mysql \( -exec chown mysql: '{}' \; -o -true \)
if [ "${SOCKET:0:1}" != '@' ]; then # not abstract sockets
find "${SOCKET%/*}" -maxdepth 0 \! -user mysql \( -exec chown mysql: '{}' \; -o -true \)
fi

# memory.pressure
local cgroup; cgroup=$(</proc/self/cgroup)
Expand Down
4 changes: 3 additions & 1 deletion 11.5/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,9 @@ docker_create_db_directories() {
# this will cause less disk access than `chown -R`
find "$DATADIR" \! -user mysql \( -exec chown mysql: '{}' + -o -true \)
# See https://github.com/MariaDB/mariadb-docker/issues/363
find "${SOCKET%/*}" -maxdepth 0 \! -user mysql \( -exec chown mysql: '{}' \; -o -true \)
if [ "${SOCKET:0:1}" != '@' ]; then # not abstract sockets
find "${SOCKET%/*}" -maxdepth 0 \! -user mysql \( -exec chown mysql: '{}' \; -o -true \)
fi

# memory.pressure
local cgroup; cgroup=$(</proc/self/cgroup)
Expand Down
4 changes: 3 additions & 1 deletion 11.6-ubi/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,9 @@ docker_create_db_directories() {
# this will cause less disk access than `chown -R`
find "$DATADIR" \! -user mysql \( -exec chown mysql: '{}' + -o -true \)
# See https://github.com/MariaDB/mariadb-docker/issues/363
find "${SOCKET%/*}" -maxdepth 0 \! -user mysql \( -exec chown mysql: '{}' \; -o -true \)
if [ "${SOCKET:0:1}" != '@' ]; then # not abstract sockets
find "${SOCKET%/*}" -maxdepth 0 \! -user mysql \( -exec chown mysql: '{}' \; -o -true \)
fi

# memory.pressure
local cgroup; cgroup=$(</proc/self/cgroup)
Expand Down
4 changes: 3 additions & 1 deletion 11.6/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,9 @@ docker_create_db_directories() {
# this will cause less disk access than `chown -R`
find "$DATADIR" \! -user mysql \( -exec chown mysql: '{}' + -o -true \)
# See https://github.com/MariaDB/mariadb-docker/issues/363
find "${SOCKET%/*}" -maxdepth 0 \! -user mysql \( -exec chown mysql: '{}' \; -o -true \)
if [ "${SOCKET:0:1}" != '@' ]; then # not abstract sockets
find "${SOCKET%/*}" -maxdepth 0 \! -user mysql \( -exec chown mysql: '{}' \; -o -true \)
fi

# memory.pressure
local cgroup; cgroup=$(</proc/self/cgroup)
Expand Down
4 changes: 3 additions & 1 deletion docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,9 @@ docker_create_db_directories() {
# this will cause less disk access than `chown -R`
find "$DATADIR" \! -user mysql \( -exec chown mysql: '{}' + -o -true \)
# See https://github.com/MariaDB/mariadb-docker/issues/363
find "${SOCKET%/*}" -maxdepth 0 \! -user mysql \( -exec chown mysql: '{}' \; -o -true \)
if [ "${SOCKET:0:1}" != '@' ]; then # not abstract sockets
find "${SOCKET%/*}" -maxdepth 0 \! -user mysql \( -exec chown mysql: '{}' \; -o -true \)
fi

# memory.pressure
local cgroup; cgroup=$(</proc/self/cgroup)
Expand Down

0 comments on commit 6cc619d

Please sign in to comment.