``ProcessManager.disable`` failing if the process doesn't exist

Bug #2088154 reported by Rodolfo Alonso
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Medium
Rodolfo Alonso

Bug Description

The method ``ProcessManager.disable`` sends a signal (HUP or KILL) to finish an existing process. In [1], before sending the signal, it is checked that the process exists. There is a very narrow possibility that between this check and the sending of the signal, the process has been terminated. It is needed to catch this exception and dismiss it.

Logs: https://storage.gra.cloud.ovh.net/v1/AUTH_dcaab5e32b234d56b626f72581e3644c/zuul_opendev_logs_a5a/periodic/opendev.org/openstack/neutron/master/neutron-functional-with-oslo-master/a5abf3a/testr_results.html

Snippet: https://paste.opendev.org/show/b8M8TLhEXkhKxrr2pC7p/

[1]https://github.com/openstack/neutron/blob/081b2e6fc7f64ecebee7165755ecca0204c56aaf/neutron/agent/linux/external_process.py#L123

Changed in neutron:
assignee: nobody → Rodolfo Alonso (rodolfo-alonso-hernandez)
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (master)

Fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/neutron/+/935046

Changed in neutron:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.opendev.org/c/openstack/neutron/+/935046
Committed: https://opendev.org/openstack/neutron/commit/0c29e730db2629c084de0c114a0d1e8e6939ac25
Submitter: "Zuul (22348)"
Branch: master

commit 0c29e730db2629c084de0c114a0d1e8e6939ac25
Author: Rodolfo Alonso Hernandez <email address hidden>
Date: Wed Nov 13 22:12:17 2024 +0000

    Catch when the process does not exist when killing it

    In ``ProcessManager.disable``, it could happen that the process to
    be stopped is no longer present in the system. In that case, catch
    this exception and dismiss it. If the goal of the ``disable`` method
    is to stop the process, it should not fail in the case of not
    being present anymore.

    Closes-Bug: #2088154
    Change-Id: I5c6f7648d69e3a939445273f8d94241818538fc9

Changed in neutron:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (stable/2024.2)

Fix proposed to branch: stable/2024.2
Review: https://review.opendev.org/c/openstack/neutron/+/941105

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (stable/2024.1)

Fix proposed to branch: stable/2024.1
Review: https://review.opendev.org/c/openstack/neutron/+/941106

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (stable/2023.2)

Fix proposed to branch: stable/2023.2
Review: https://review.opendev.org/c/openstack/neutron/+/941107

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (stable/2024.2)

Reviewed: https://review.opendev.org/c/openstack/neutron/+/941105
Committed: https://opendev.org/openstack/neutron/commit/a68d47c20f96f4db17d8122987384506b3b03ea2
Submitter: "Zuul (22348)"
Branch: stable/2024.2

commit a68d47c20f96f4db17d8122987384506b3b03ea2
Author: Rodolfo Alonso Hernandez <email address hidden>
Date: Wed Nov 13 22:12:17 2024 +0000

    Catch when the process does not exist when killing it

    In ``ProcessManager.disable``, it could happen that the process to
    be stopped is no longer present in the system. In that case, catch
    this exception and dismiss it. If the goal of the ``disable`` method
    is to stop the process, it should not fail in the case of not
    being present anymore.

    Closes-Bug: #2088154
    Change-Id: I5c6f7648d69e3a939445273f8d94241818538fc9
    (cherry picked from commit 0c29e730db2629c084de0c114a0d1e8e6939ac25)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.