NetcatTester.stop_processes should handle, if needed, the case when the process does not exist

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

Bug Description

In [1], the process to be stopped does not exist. This situation raises an exception not handled in upper methods and the test case logic fails.

In the related test case:

ConnectionTester.assert_connection --> _test_transport_connectivity --> stop_processes

The first method (assert_no_connection) catches ConnectionTesterException but not ProcessExecutionError.

[1] https://8244a21336f288b0d527-4f28a4e2359819cc7c03faeac91c9897.ssl.cf5.rackcdn.com/683273/11/check/neutron-functional/1368ac6/testr_results.html.gz

Changed in neutron:
importance: Undecided → Medium
tags: added: functional-tests
tags: added: gate-failure
Changed in neutron:
status: New → Confirmed
Changed in neutron:
assignee: nobody → Rodolfo Alonso (rodolfo-alonso-hernandez)
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/695047

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

Reviewed: https://review.opendev.org/695047
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=728d8ee4b1b9fd6a99ebbd66a0e30e81a078a5b5
Submitter: Zuul
Branch: master

commit 728d8ee4b1b9fd6a99ebbd66a0e30e81a078a5b5
Author: Rodolfo Alonso Hernandez <email address hidden>
Date: Tue Nov 19 17:27:38 2019 +0000

    NetcatTester.stop_processes skip "No such process" exception

    If any of the processes, client or server, spawned by NetcatTester is
    not present during the stop command (kill signal sent), by default the
    method will not raise an exception.

    Change-Id: If8cf47a01dc353734ad07ca6cd4db7bec6c90fb6
    Closes-Bug: #1852869

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

Fix proposed to branch: stable/train
Review: https://review.opendev.org/695656

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

Fix proposed to branch: stable/stein
Review: https://review.opendev.org/695657

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

Fix proposed to branch: stable/rocky
Review: https://review.opendev.org/695658

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

Reviewed: https://review.opendev.org/695656
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=7aa0660b866859e9925f5f3e740a61c48467c8ac
Submitter: Zuul
Branch: stable/train

commit 7aa0660b866859e9925f5f3e740a61c48467c8ac
Author: Rodolfo Alonso Hernandez <email address hidden>
Date: Tue Nov 19 17:27:38 2019 +0000

    NetcatTester.stop_processes skip "No such process" exception

    If any of the processes, client or server, spawned by NetcatTester is
    not present during the stop command (kill signal sent), by default the
    method will not raise an exception.

    Change-Id: If8cf47a01dc353734ad07ca6cd4db7bec6c90fb6
    Closes-Bug: #1852869
    (cherry picked from commit 728d8ee4b1b9fd6a99ebbd66a0e30e81a078a5b5)

tags: added: in-stable-train
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (stable/stein)

Reviewed: https://review.opendev.org/695657
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=d8e9ba70f8f52d3f3af29288d13fe6e45b4695a2
Submitter: Zuul
Branch: stable/stein

commit d8e9ba70f8f52d3f3af29288d13fe6e45b4695a2
Author: Rodolfo Alonso Hernandez <email address hidden>
Date: Tue Nov 19 17:27:38 2019 +0000

    NetcatTester.stop_processes skip "No such process" exception

    If any of the processes, client or server, spawned by NetcatTester is
    not present during the stop command (kill signal sent), by default the
    method will not raise an exception.

    Change-Id: If8cf47a01dc353734ad07ca6cd4db7bec6c90fb6
    Closes-Bug: #1852869
    (cherry picked from commit 728d8ee4b1b9fd6a99ebbd66a0e30e81a078a5b5)

tags: added: in-stable-stein
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on neutron (stable/rocky)

Change abandoned by Rodolfo Alonso Hernandez (<email address hidden>) on branch: stable/rocky
Review: https://review.opendev.org/695658
Reason: Rootwrap does not return the exception message and therefore I can't implement the same solution in this version. Log example: https://9a1cee672e2d0d40b7a4-f65209ceca8d59b8b2f1e727ebf5e4dd.ssl.cf1.rackcdn.com/695658/3/check/neutron-functional/d40b7f8/logs/dsvm-functional-logs/neutron.tests.functional.tests.common.test_net_helpers.NetcatTesterTestCase.test_stop_process_no_process_skip_no_process_exception.txt.gz

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron 14.0.4

This issue was fixed in the openstack/neutron 14.0.4 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron 15.0.1

This issue was fixed in the openstack/neutron 15.0.1 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron 16.0.0.0b1

This issue was fixed in the openstack/neutron 16.0.0.0b1 development milestone.

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.