From f10ecdac2bce199889821a23fb22d092c416785b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Kone=C4=8Dn=C3=BD?= Date: Thu, 9 Sep 2021 14:45:27 +0200 Subject: [PATCH] Review pagure SOP MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michal Konečný --- modules/sysadmin_guide/nav.adoc | 2 +- modules/sysadmin_guide/pages/pagure.adoc | 53 +++++++++++------------- 2 files changed, 25 insertions(+), 30 deletions(-) diff --git a/modules/sysadmin_guide/nav.adoc b/modules/sysadmin_guide/nav.adoc index 45d8bb0..30f3b31 100644 --- a/modules/sysadmin_guide/nav.adoc +++ b/modules/sysadmin_guide/nav.adoc @@ -85,7 +85,7 @@ ** xref:openvpn.adoc[OpenVPN - SOP] ** xref:outage.adoc[Outage Infrastructure - SOP] ** xref:packagereview.adoc[Package Review - SOP] -** xref:pagure.adoc[pagure - SOP in review ] +** xref:pagure.adoc[Pagure Infrastructure - SOP] ** xref:pdc.adoc[pdc - SOP in review ] ** xref:pesign-upgrade.adoc[pesign-upgrade - SOP in review ] ** xref:planetsubgroup.adoc[planetsubgroup - SOP in review ] diff --git a/modules/sysadmin_guide/pages/pagure.adoc b/modules/sysadmin_guide/pages/pagure.adoc index 54ae2cf..c9585f8 100644 --- a/modules/sysadmin_guide/pages/pagure.adoc +++ b/modules/sysadmin_guide/pages/pagure.adoc @@ -4,12 +4,11 @@ Pagure is a code hosting and management site. == Contents -[arabic] -. Contact Information -. Description -. When unresponsive -. Git repo locations -. Services and what they do +* <<_contact_information>> +* <<_description>> +* <<_when_unresponsive>> +* <<_git_repo_locations>> +* <<_services_and_what_they_do>> == Contact Information @@ -38,24 +37,24 @@ running again. == Git repo locations -* Main repos are in /srv/git/repositories/ +* Main repos are in `/srv/git/repositories/` * issue/ticket repos are under -/srv/git/repositories/tickets/ -* Docs are under /srv/git/repositories/docs/ -* Releases (not a git repo) are under /var/www/releases/ +`/srv/git/repositories/tickets/` +* Docs are under `/srv/git/repositories/docs/` +* Releases (not a git repo) are under `/var/www/releases/` == Services and what they do -* pagure service is the main flask application, it runs from httpd wsgi. -* pagure_ci service talks to jenkins or other CI for testing PR's -* pagure_ev service talks to websockets and updates issues and comments +* `pagure` service is the main flask application, it runs from httpd wsgi. +* `pagure_ci` service talks to jenkins or other CI for testing PR's +* `pagure_ev` service talks to websockets and updates issues and comments live for users. -* pagure_loadjson service takes issues loads from pagure-importer and +* `pagure_loadjson` service takes issues loads from pagure-importer and processes them. -* pagure_logcom service handles logging. -* pagure_milter processes email actions. -* pagure_webhook service processes webhooks to notify about changes. -* pagure worker service updates git repos with changes. +* `pagure_logcom` service handles logging. +* `pagure_milter` processes email actions. +* `pagure_webhook` service processes webhooks to notify about changes. +* `pagure worker` service updates git repos with changes. == Useful commands @@ -77,9 +76,7 @@ where it expects these to be unique. The following two SQL commands allows finding out which projects are in this situation: -____ -: - +.... select user_id, name, namespace, is_fork from projects where is_fork = FALSE group by namespace, name, is_fork, user_id having count(user_id) > 1; @@ -87,23 +84,21 @@ FALSE group by namespace, name, is_fork, user_id having count(user_id) > select user_id, name, namespace, is_fork from projects where is_fork = TRUE group by namespace, name, is_fork, user_id having count(user_id) > 1; -____ +.... -This will return you the namespace/name as well as the user_id of the +This will return you the _namespace_/_name_ as well as the _user_id_ of the user who duplicated the projects in the database. You can then do: -____ -: - +.... select id, user_id, name, namespace, is_fork from projects where name = '' order by user_id; -____ +.... -In that query you will see the project id, user_id, name and namespace +In that query you will see the project _id_, _user_id_, _name_ and _namespace_ of the project. You will see in this one of the projects is listed twice -with the same user_id (the one returned in the previous query). +with the same _user_id_ (the one returned in the previous query). From there, you will have to delete the duplicates (potentially the one with the highest project id).