From fb58083a230e7b0e931537ef702cd8245474870c Mon Sep 17 00:00:00 2001 From: Bob131 Date: Wed, 6 Dec 2023 05:28:42 +1100 Subject: [PATCH] backend, dist-git: rename dispatcher scripts A hurdle when trying to stand-up a simple single-machine Copr deployment is that both the copr-backend and copr-dist-git packages install a script to /usr/bin/copr-run-dispatcher, preventing the user from asking that both be installed on the same system with dnf. This commit renames the script from backend and dist-git to copr-run-dispatcher-backend and copr-run-dispatcher-dist-git respectively. Fixes #3007. --- .../run/{copr-run-dispatcher => copr-run-dispatcher-backend} | 0 backend/units/copr-backend-action.service | 2 +- backend/units/copr-backend-build.service | 2 +- dist-git/copr-dist-git.service | 2 +- .../run/{copr-run-dispatcher => copr-run-dispatcher-dist-git} | 0 docker-compose.dev.yaml | 4 ++-- docker-compose.yaml | 4 ++-- docker/distgit/Dockerfile | 2 +- kubernetes/kustomize/backend.yaml | 4 ++-- openshift/services/backend.yml.j2 | 4 ++-- 10 files changed, 12 insertions(+), 12 deletions(-) rename backend/run/{copr-run-dispatcher => copr-run-dispatcher-backend} (100%) rename dist-git/run/{copr-run-dispatcher => copr-run-dispatcher-dist-git} (100%) diff --git a/backend/run/copr-run-dispatcher b/backend/run/copr-run-dispatcher-backend similarity index 100% rename from backend/run/copr-run-dispatcher rename to backend/run/copr-run-dispatcher-backend diff --git a/backend/units/copr-backend-action.service b/backend/units/copr-backend-action.service index f0a60ce65..a4dba119e 100644 --- a/backend/units/copr-backend-action.service +++ b/backend/units/copr-backend-action.service @@ -8,7 +8,7 @@ Wants=logrotate.timer Type=simple User=copr Group=copr -ExecStart=/usr/bin/copr-run-dispatcher actions +ExecStart=/usr/bin/copr-run-dispatcher-backend actions # we don't want to kill background action processors (daemoncontext) KillMode=process Restart=on-failure diff --git a/backend/units/copr-backend-build.service b/backend/units/copr-backend-build.service index fbbf30c11..3641ee9c5 100644 --- a/backend/units/copr-backend-build.service +++ b/backend/units/copr-backend-build.service @@ -8,7 +8,7 @@ Wants=logrotate.timer Type=simple User=copr Group=copr -ExecStart=/usr/bin/copr-run-dispatcher builds +ExecStart=/usr/bin/copr-run-dispatcher-backend builds # we don't want to kill background action processors (daemoncontext) KillMode=process Restart=on-failure diff --git a/dist-git/copr-dist-git.service b/dist-git/copr-dist-git.service index 8ecca1613..bce653c45 100644 --- a/dist-git/copr-dist-git.service +++ b/dist-git/copr-dist-git.service @@ -8,7 +8,7 @@ Wants=logrotate.timer User=copr-dist-git Group=packager AmbientCapabilities=CAP_SETGID -ExecStart=/usr/bin/copr-run-dispatcher imports +ExecStart=/usr/bin/copr-run-dispatcher-dist-git imports KillMode=process Restart=on-failure diff --git a/dist-git/run/copr-run-dispatcher b/dist-git/run/copr-run-dispatcher-dist-git similarity index 100% rename from dist-git/run/copr-run-dispatcher rename to dist-git/run/copr-run-dispatcher-dist-git diff --git a/docker-compose.dev.yaml b/docker-compose.dev.yaml index d8eec3de0..c12680d9f 100644 --- a/docker-compose.dev.yaml +++ b/docker-compose.dev.yaml @@ -16,12 +16,12 @@ services: backend-build: environment: - PYTHONPATH=/opt/copr/backend - command: /usr/sbin/runuser -u copr -g copr -- /usr/bin/copr-run-dispatcher builds + command: /usr/sbin/runuser -u copr -g copr -- /usr/bin/copr-run-dispatcher-backend builds backend-action: environment: - PYTHONPATH=/opt/copr/backend - command: /usr/sbin/runuser -u copr -g copr -- /usr/bin/copr-run-dispatcher actions + command: /usr/sbin/runuser -u copr -g copr -- /usr/bin/copr-run-dispatcher-backend actions frontend: environment: diff --git a/docker-compose.yaml b/docker-compose.yaml index 28f236e5e..42cd69bd8 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -34,7 +34,7 @@ services: build: context: docker/backend hostname: backend-build - command: ["/run-backend", "--sign-host", "keygen-signd", "/usr/bin/copr-run-dispatcher", "builds"] + command: ["/run-backend", "--sign-host", "keygen-signd", "/usr/bin/copr-run-dispatcher-backend", "builds"] depends_on: - backend-log - resalloc @@ -48,7 +48,7 @@ services: build: context: docker/backend hostname: backend-action - command: ["/run-backend", "--sign-host", "keygen-signd", "/usr/bin/copr-run-dispatcher", "actions"] + command: ["/run-backend", "--sign-host", "keygen-signd", "/usr/bin/copr-run-dispatcher-backend", "actions"] depends_on: - backend-log - resalloc diff --git a/docker/distgit/Dockerfile b/docker/distgit/Dockerfile index f206cafe6..4460496ab 100644 --- a/docker/distgit/Dockerfile +++ b/docker/distgit/Dockerfile @@ -54,4 +54,4 @@ RUN directories="/etc/httpd /var/run/httpd /var/log/httpd /var/lib/dist-git /run USER copr-dist-git ENTRYPOINT ["/usr/bin/tini", "--"] -CMD ["bash", "-c", "mkdir -p /var/lib/dist-git/cache /var/lib/dist-git/git && exec /usr/bin/copr-run-dispatcher imports"] +CMD ["bash", "-c", "mkdir -p /var/lib/dist-git/cache /var/lib/dist-git/git && exec /usr/bin/copr-run-dispatcher-dist-git imports"] diff --git a/kubernetes/kustomize/backend.yaml b/kubernetes/kustomize/backend.yaml index 6aee7abd4..8033c16ff 100644 --- a/kubernetes/kustomize/backend.yaml +++ b/kubernetes/kustomize/backend.yaml @@ -69,7 +69,7 @@ spec: - image: copr_backend-action:latest imagePullPolicy: Always name: action - command: ["/tini", "--", "/usr/sbin/runuser", "-u", "copr", "-g", "copr", "--", "/usr/bin/copr-run-dispatcher", "actions"] + command: ["/tini", "--", "/usr/sbin/runuser", "-u", "copr", "-g", "copr", "--", "/usr/bin/copr-run-dispatcher-dist-git", "actions"] resources: requests: cpu: 200m @@ -86,7 +86,7 @@ spec: - image: copr_backend-build:latest imagePullPolicy: Always name: build - command: ["/tini", "--", "/usr/sbin/runuser", "-u", "copr", "-g", "copr","-G", "obsrun", "--", "/usr/bin/copr-run-dispatcher", "builds"] + command: ["/tini", "--", "/usr/sbin/runuser", "-u", "copr", "-g", "copr","-G", "obsrun", "--", "/usr/bin/copr-run-dispatcher-backend", "builds"] resources: requests: cpu: 200m diff --git a/openshift/services/backend.yml.j2 b/openshift/services/backend.yml.j2 index 083014cbf..78f7726bf 100644 --- a/openshift/services/backend.yml.j2 +++ b/openshift/services/backend.yml.j2 @@ -138,7 +138,7 @@ spec: - name: locks mountPath: /var/lock/copr-backend command: ["/usr/bin/tini", "--"] - args: ["/run-backend", "--sign-host", "copr-keygen", "/usr/bin/copr-run-dispatcher", "actions"] + args: ["/run-backend", "--sign-host", "copr-keygen", "/usr/bin/copr-run-dispatcher-backend", "actions"] - name: builds image: "{{ copr_backend_image }}" @@ -156,7 +156,7 @@ spec: - name: HOME value: /backend-home command: ["/usr/bin/tini", "--"] - args: ["/run-backend", "--sign-host", "copr-keygen", "/usr/bin/copr-run-dispatcher", "builds"] + args: ["/run-backend", "--sign-host", "copr-keygen", "/usr/bin/copr-run-dispatcher-backend", "builds"] # start these containers on the same node with copr-backend-httpd! affinity: