Skip to content

Commit

Permalink
set WORKER_COUNT=1 when starting quay with Sqlite
Browse files Browse the repository at this point in the history
without this, multiple workers tend to write simultaneously
causing concurrent write issues
  • Loading branch information
harishsurf committed Jun 10, 2024
1 parent 7bf9502 commit 112fbc1
Show file tree
Hide file tree
Showing 7 changed files with 5 additions and 131 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@

- name: Loading Quay if quay.tar exists
shell:
cmd: podman image import --change 'ENV container=oci' --change 'ENV PATH=/app/bin/:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin' --change 'ENV PYTHONUNBUFFERED=1' --change 'ENV PYTHONIOENCODING=UTF-8' --change 'ENV LC_ALL=C.UTF-8' --change 'ENV LANG=C.UTF-8' --change 'ENV QUAYDIR=/quay-registry' --change 'ENV QUAYCONF=/quay-registry/conf' --change 'ENV QUAYRUN=/quay-registry/conf' --change 'ENV QUAYPATH=/quay-registry' --change 'ENV PYTHONUSERBASE=/app' --change 'ENV PYTHONPATH=/quay-registry' --change 'ENV TZ=UTC' --change 'ENV RED_HAT_QUAY=true' --change 'ENTRYPOINT=["dumb-init","--","/quay-registry/quay-entrypoint.sh"]' --change 'WORKDIR=/quay-registry' --change 'EXPOSE=7443' --change 'EXPOSE=8080' --change 'EXPOSE=8443' --change 'VOLUME=/conf/stack' --change 'VOLUME=/datastorage' --change 'VOLUME=/sqlite/data' --change 'VOLUME=/tmp' --change 'VOLUME=/var/log' --change 'USER=1001' --change 'CMD ["registry"]' - {{ quay_image }} < {{ quay_root }}/quay.tar
cmd: podman image import --change 'ENV container=oci' --change 'ENV PATH=/app/bin/:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin' --change 'ENV PYTHONUNBUFFERED=1' --change 'ENV PYTHONIOENCODING=UTF-8' --change 'ENV LC_ALL=C.UTF-8' --change 'ENV LANG=C.UTF-8' --change 'ENV QUAYDIR=/quay-registry' --change 'ENV QUAYCONF=/quay-registry/conf' --change 'ENV QUAYRUN=/quay-registry/conf' --change 'ENV QUAYPATH=/quay-registry' --change 'ENV PYTHONUSERBASE=/app' --change 'ENV PYTHONPATH=/quay-registry' --change 'ENV TZ=UTC' --change 'ENV RED_HAT_QUAY=true' --change 'ENTRYPOINT=["dumb-init","--","/quay-registry/quay-entrypoint.sh"]' --change 'WORKDIR=/quay-registry' --change 'EXPOSE=7443' --change 'EXPOSE=8080' --change 'EXPOSE=8443' --change 'VOLUME=/conf/stack' --change 'VOLUME=/datastorage' --change 'VOLUME=/sqlite' --change 'VOLUME=/tmp' --change 'VOLUME=/var/log' --change 'USER=1001' --change 'CMD ["registry"]' - {{ quay_image }} < {{ quay_root }}/quay.tar
when: p.stat.exists and local_install == "false"

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@
- name: Set SELinux Rules
include_tasks: set-selinux-rules.yaml

- name: Autodetect root or rootless from previous install
include_tasks: migrate-pre-1_3_0.yaml

- name: Autodetect Image Archive
include_tasks: autodetect-image-archive.yaml

Expand All @@ -19,9 +16,6 @@
- name: Upgrade Quay Pod Service
include_tasks: upgrade-pod-service.yaml

- name: Upgrade Postgres Service
include_tasks: upgrade-postgres-service.yaml

- name: Upgrade Redis Service
include_tasks: upgrade-redis-service.yaml

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,4 @@
- name: Fail the playbook due to Quay not becoming alive
fail:
msg: "Quay did not become alive. Check debug logs above for details."

Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ ExecStart=/usr/bin/podman run \
--cidfile %t/%n-cid \
--cgroups=no-conmon \
--replace \
-e WORKER_COUNT_UNSUPPORTED_MINIMUM=1 \
-e WORKER_COUNT=1 \
{{ quay_image }}

ExecStop=-/usr/bin/podman stop --ignore --cidfile %t/%n-cid -t 10
Expand Down
2 changes: 1 addition & 1 deletion cmd/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ func getImageMetadata(app, imageName, archivePath string) string {
--change 'EXPOSE=8443' \
--change 'VOLUME=/conf/stack' \
--change 'VOLUME=/datastorage' \
--change 'VOLUME=/sqlite/data' \
--change 'VOLUME=/sqlite' \
--change 'VOLUME=/tmp' \
--change 'VOLUME=/var/log' \
--change 'USER=1001' \
Expand Down

0 comments on commit 112fbc1

Please sign in to comment.