← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 2017037] Re: Improve keepalived test pid termination

 

Reviewed:  https://review.opendev.org/c/openstack/neutron/+/880893
Committed: https://opendev.org/openstack/neutron/commit/43829301f3ea280913932af9c7eb7cbc42fde8c5
Submitter: "Zuul (22348)"
Branch:    master

commit 43829301f3ea280913932af9c7eb7cbc42fde8c5
Author: Miro Tomaska <mtomaska@xxxxxxxxxx>
Date:   Wed Apr 19 15:51:59 2023 -0500

    Handle "no such process" during keepalived process cleanup
    
    First, the _stop_keepalived_manager() was doing redundant work of
    the KeepalivedManager.disable() method. I.e. SIGTERM pid
    wait for 5s and then SIGKILL. Therefore I removed that code from the
    test file.
    Next, I wrapped the self.manager.disable() to handle for the non atomic
    operation of the disable() function where SIGTERM can sometimes stop
    the process right before the SIGKILL is called. We dont want this to
    fail the test as shown in the linked bug.
    
    Closes-Bug: #2017037
    Change-Id: Ide244c079094f60779ce446283e5d51ae15e9af3


** Changed in: neutron
       Status: In Progress => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/2017037

Title:
  Improve keepalived test pid termination

Status in neutron:
  Fix Released

Bug description:
  neutron.tests.functional.agent.linux.test_keepalived.KeepalivedManagerTestCase.test_keepalived_spawn 
  can fail sometimes at clean up with "No such process" error see [1]

  It can happen that KeepalivedManager.disable is not able to SIGTERM process in time and then we try to execute SIGKILL on that process but the process just finished causing SIGKILL to not find this process.
  We dont want this condition to fail the test so catch and handle this condition in _stop_keepalived_manager

  [1] https://32177b17610869e1b83a-af1192da167b817506a58f20e6af9357.ssl.cf2.rackcdn.com/periodic/opendev.org/openstack/neutron/master/neutron-functional-with-uwsgi-fips/dc3710e/testr_results.html
  [2] https://opendev.org/openstack/neutron/src/branch/master/neutron/agent/linux/keepalived.py#L473-L486

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/2017037/+subscriptions



References