get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/1529399/
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 1529399,
    "url": "http://patchwork.ozlabs.org/api/patches/1529399/",
    "web_url": "http://patchwork.ozlabs.org/project/ovn/patch/20210917132750.4114-1-odivlad@gmail.com/",
    "project": {
        "id": 68,
        "url": "http://patchwork.ozlabs.org/api/projects/68/",
        "name": "Open Virtual Network development",
        "link_name": "ovn",
        "list_id": "ovs-dev.openvswitch.org",
        "list_email": "ovs-dev@openvswitch.org",
        "web_url": "http://openvswitch.org/",
        "scm_url": "",
        "webscm_url": "",
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20210917132750.4114-1-odivlad@gmail.com>",
    "list_archive_url": null,
    "date": "2021-09-17T13:27:50",
    "name": "[ovs-dev] rhel, utils: don't affect traffic on controller upgrade",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "40cf1bf1317d37da026964ba3ce0d6f0e10bd567",
    "submitter": {
        "id": 80943,
        "url": "http://patchwork.ozlabs.org/api/people/80943/",
        "name": "Vladislav Odintsov",
        "email": "odivlad@gmail.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/ovn/patch/20210917132750.4114-1-odivlad@gmail.com/mbox/",
    "series": [
        {
            "id": 262823,
            "url": "http://patchwork.ozlabs.org/api/series/262823/",
            "web_url": "http://patchwork.ozlabs.org/project/ovn/list/?series=262823",
            "date": "2021-09-17T13:27:50",
            "name": "[ovs-dev] rhel, utils: don't affect traffic on controller upgrade",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/262823/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/1529399/comments/",
    "check": "fail",
    "checks": "http://patchwork.ozlabs.org/api/patches/1529399/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<ovs-dev-bounces@openvswitch.org>",
        "X-Original-To": [
            "incoming@patchwork.ozlabs.org",
            "dev@openvswitch.org"
        ],
        "Delivered-To": [
            "patchwork-incoming@ozlabs.org",
            "ovs-dev@lists.linuxfoundation.org"
        ],
        "Authentication-Results": [
            "ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20210112 header.b=K8SWYDbQ;\n\tdkim-atps=neutral",
            "ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org\n (client-ip=140.211.166.133; helo=smtp2.osuosl.org;\n envelope-from=ovs-dev-bounces@openvswitch.org; receiver=<UNKNOWN>)",
            "smtp1.osuosl.org (amavisd-new);\n dkim=pass (2048-bit key) header.d=gmail.com"
        ],
        "Received": [
            "from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest\n SHA256)\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 4H9vsN24b8z9sR4\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 17 Sep 2021 23:28:07 +1000 (AEST)",
            "from localhost (localhost [127.0.0.1])\n\tby smtp2.osuosl.org (Postfix) with ESMTP id 1AF0F4074B;\n\tFri, 17 Sep 2021 13:28:05 +0000 (UTC)",
            "from smtp2.osuosl.org ([127.0.0.1])\n\tby localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id 7AtThAyWtyVz; Fri, 17 Sep 2021 13:28:04 +0000 (UTC)",
            "from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56])\n\tby smtp2.osuosl.org (Postfix) with ESMTPS id E28984073F;\n\tFri, 17 Sep 2021 13:28:02 +0000 (UTC)",
            "from lf-lists.osuosl.org (localhost [127.0.0.1])\n\tby lists.linuxfoundation.org (Postfix) with ESMTP id C24C4C000F;\n\tFri, 17 Sep 2021 13:28:02 +0000 (UTC)",
            "from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138])\n by lists.linuxfoundation.org (Postfix) with ESMTP id 39126C000D\n for <dev@openvswitch.org>; Fri, 17 Sep 2021 13:28:01 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n by smtp1.osuosl.org (Postfix) with ESMTP id 1EADF84070\n for <dev@openvswitch.org>; Fri, 17 Sep 2021 13:28:01 +0000 (UTC)",
            "from smtp1.osuosl.org ([127.0.0.1])\n by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n with ESMTP id xxISlCx8La6F for <dev@openvswitch.org>;\n Fri, 17 Sep 2021 13:27:59 +0000 (UTC)",
            "from mail-lf1-x12c.google.com (mail-lf1-x12c.google.com\n [IPv6:2a00:1450:4864:20::12c])\n by smtp1.osuosl.org (Postfix) with ESMTPS id 96AA281D19\n for <dev@openvswitch.org>; Fri, 17 Sep 2021 13:27:59 +0000 (UTC)",
            "by mail-lf1-x12c.google.com with SMTP id m3so31092782lfu.2\n for <dev@openvswitch.org>; Fri, 17 Sep 2021 06:27:59 -0700 (PDT)",
            "from localhost.localdomain (109-252-131-59.dynamic.spd-mgts.ru.\n [109.252.131.59])\n by smtp.gmail.com with ESMTPSA id 203sm732025ljf.63.2021.09.17.06.27.51\n (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);\n Fri, 17 Sep 2021 06:27:52 -0700 (PDT)"
        ],
        "X-Virus-Scanned": [
            "amavisd-new at osuosl.org",
            "amavisd-new at osuosl.org"
        ],
        "X-Greylist": "whitelisted by SQLgrey-1.8.0",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;\n h=from:to:cc:subject:date:message-id:mime-version\n :content-transfer-encoding;\n bh=ZRQiEMY9p0TGHDtWAfuUlC2WmTlH5gXOI68Kc8JucnI=;\n b=K8SWYDbQfDWBBWcBBlykXWCKJP6vwRjKxwFDeUsFjSijPX8QI7TrFYWCi7EM2NP5SN\n pld8wfNJbGLZkNyHlfSMeRFGkw+IKpoap8HxOZ2cS4Hy+1T3RK5npw8nzDOs9+eyJnkh\n aAA+LVWJCn5cmLEw+uNF63APDAdC4Ojt51CDsIs7lF0cOjLVjDce77GjpNsQQNZaT4rr\n FDm7T29Q7pY/Frlu4p9k3KuSFLsG3XUPdGmw9YMH3v9IIdkltrc2U4SBguTr2KnIMmcb\n wEldDkLSch9Smgf19ofldZUbhxAi8Vxke7JSIvhD/SyRqPoDN+suWb5feQ+DBTYGZr2P\n 6fXQ==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20210112;\n h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version\n :content-transfer-encoding;\n bh=ZRQiEMY9p0TGHDtWAfuUlC2WmTlH5gXOI68Kc8JucnI=;\n b=GSTpp4mTkeoZgx8NJh1Ijz9k+yz78iLSsUt1LTVrleU725Pug4PmO8/TfNaH3nCQFA\n Awf/v0xi1rO1Oxn+WB40OpV65pqG+rs5oGQWg9QHK6dSE0dRxOMt5t7rvBapFoyRM6zv\n u/JRyKZwNzebycIn/Q8MH3oWioNRpwQ/Jm6tS4GZCD3e6vtBprK6Tt7aPPc+fGLGpBay\n dDDB9v3yER+h66DXeK41gPIuqr3aKCeePO7GqDOvHBINCppgowX1LCQcVz8454QZcBfJ\n 1UEhJNZ4oTUsNGMSPQDf6q8KR3wRsZoE78d2fLllv9yMETWxumkQArVmOiCwZfzCHqej\n gOhQ==",
        "X-Gm-Message-State": "AOAM533gbbWrTPIZ2K4LuUE54Y6+8E1FUVCnLzZ3XKm5A684mMECCHys\n 7WCRKvvT8BWiFAqCfwhDDkBut+KHpQw=",
        "X-Google-Smtp-Source": "\n ABdhPJyJO94Iz6SOrspZ3QeOLQdGW1ho+LRRZ4LjWkMAm4Ise0hO8HzEiBTQI7NqrLQdn2FMRQyNOA==",
        "X-Received": "by 2002:a2e:3912:: with SMTP id g18mr9098889lja.146.1631885272278;\n Fri, 17 Sep 2021 06:27:52 -0700 (PDT)",
        "From": "Vladislav Odintsov <odivlad@gmail.com>",
        "To": "dev@openvswitch.org",
        "Date": "Fri, 17 Sep 2021 16:27:50 +0300",
        "Message-Id": "<20210917132750.4114-1-odivlad@gmail.com>",
        "X-Mailer": "git-send-email 2.30.0",
        "MIME-Version": "1.0",
        "Cc": "Vladislav Odintsov <odivlad@gmail.com>",
        "Subject": "[ovs-dev] [PATCH ovn] rhel,\n\tutils: don't affect traffic on controller upgrade",
        "X-BeenThere": "ovs-dev@openvswitch.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "<ovs-dev.openvswitch.org>",
        "List-Unsubscribe": "<https://mail.openvswitch.org/mailman/options/ovs-dev>,\n <mailto:ovs-dev-request@openvswitch.org?subject=unsubscribe>",
        "List-Archive": "<http://mail.openvswitch.org/pipermail/ovs-dev/>",
        "List-Post": "<mailto:ovs-dev@openvswitch.org>",
        "List-Help": "<mailto:ovs-dev-request@openvswitch.org?subject=help>",
        "List-Subscribe": "<https://mail.openvswitch.org/mailman/listinfo/ovs-dev>,\n <mailto:ovs-dev-request@openvswitch.org?subject=subscribe>",
        "Content-Type": "text/plain; charset=\"us-ascii\"",
        "Content-Transfer-Encoding": "7bit",
        "Errors-To": "ovs-dev-bounces@openvswitch.org",
        "Sender": "\"dev\" <ovs-dev-bounces@openvswitch.org>"
    },
    "content": "Currently upgrade of ovn-host rpm package affects active\ntraffic. This is because systemctl try-restart\novn-controller is invoked during rpm package upgrade.\nIt calls ovn-ctl stop_controller and then start_controller.\n\nAdding ovn-ctl stop_controller --restart to %postun\nupgrade case right before systemctl try-restart. Also,\nupgrade ovn-ctl script to support --restart argument in it.\n\nIdeally this should be done by systemd when restart is\ncalled, but it's impossible to pass restart command to\nsystemd.\n\nSigned-off-by: Vladislav Odintsov <odivlad@gmail.com>\n---\n rhel/ovn-fedora.spec.in |  8 ++++++++\n utilities/ovn-ctl       | 10 ++++++++--\n 2 files changed, 16 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/rhel/ovn-fedora.spec.in b/rhel/ovn-fedora.spec.in\nindex 6716dd0d2..5fe0f990f 100644\n--- a/rhel/ovn-fedora.spec.in\n+++ b/rhel/ovn-fedora.spec.in\n@@ -400,6 +400,14 @@ fi\n %endif\n \n %postun host\n+if [ \"$1\" -ge \"1\" ] ; then\n+    # Package upgrade, not uninstall\n+    # We perform lightweight stop here not to affect active traffic during\n+    # ovn-controller upgrade.\n+    # Ideally this would be held by systemd, but it's impossible\n+    # to pass custom restart command to systemd service.\n+    %{_datadir}/ovn/scripts/ovn-ctl stop_controller --restart\n+fi\n %if 0%{?systemd_postun_with_restart:1}\n     %systemd_postun_with_restart ovn-controller.service\n %else\ndiff --git a/utilities/ovn-ctl b/utilities/ovn-ctl\nindex ff61f21d0..b30eb209d 100755\n--- a/utilities/ovn-ctl\n+++ b/utilities/ovn-ctl\n@@ -584,7 +584,11 @@ stop_ic () {\n }\n \n stop_controller () {\n-    OVS_RUNDIR=${OVS_RUNDIR} stop_ovn_daemon ovn-controller \"\" \"\" \"$@\"\n+    set \"ovn-controller\" \"\" \"\"\n+    if test X\"$RESTART\" = Xyes; then\n+        set \"$@\" \"--restart\"\n+    fi\n+    OVS_RUNDIR=${OVS_RUNDIR} stop_ovn_daemon \"$@\"\n }\n \n stop_controller_vtep () {\n@@ -606,7 +610,8 @@ restart_ic () {\n }\n \n restart_controller () {\n-    stop_controller --restart\n+    RESTART=yes\n+    stop_controller\n     start_controller\n }\n \n@@ -651,6 +656,7 @@ restart_ic_sb_ovsdb () {\n \n set_defaults () {\n     OVN_MANAGE_OVSDB=yes\n+    RESTART=no\n \n     OVS_RUNDIR=${OVS_RUNDIR:-${rundir}}\n     OVN_RUNDIR=${OVN_RUNDIR:-${ovn_rundir}}\n",
    "prefixes": [
        "ovs-dev"
    ]
}