keepalived sanity check tries to disable process monitoring, but doesn't

Bug #1665061 reported by Terry Wilson
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Low
Terry Wilson

Bug Description

KeepalivedIPv6Test.start_keepalived_process overrides AGENT.check_child_processes_interval to 0 in an attempt to disable process monitoring. The default value is 60 and the decision on whether to spawn the process monitoring thread is made in ProcessMonitor.__init__(), which is called by KeepalivedIPv6Test.__init__() before start_keepalived_process is called, so the process monitor is already started. Example logs:

2017-02-15 11:20:28.913 16433 DEBUG oslo_concurrency.lockutils [-] Lock "_check_child_processes" acquired by "neutron.agent.linux.external_process._check_child_processes" :: waited 0.000s inner /home/terry/src/neutron/.tox/dsvm-functional/lib/python2.7/site-packages/oslo_concurrency/lockutils.py:270
2017-02-15 11:20:28.914 16433 DEBUG neutron.agent.linux.utils [-] Unable to access /tmp/tmppDICas/tmpJpJ77T/router1.pid get_value_from_file neutron/agent/linux/utils.py:274
2017-02-15 11:20:28.914 16433 ERROR neutron.agent.linux.external_process [-] keepalived for router with uuid router1 not found. The process should not have died
2017-02-15 11:20:28.914 16433 WARNING neutron.agent.linux.external_process [-] Respawning keepalived for uuid router1
2017-02-15 11:20:28.914 16433 DEBUG neutron.agent.linux.utils [-] Unable to access /tmp/tmppDICas/tmpJpJ77T/router1.pid get_value_from_file neutron/agent/linux/utils.py:274
2017-02-15 11:20:28.914 16433 DEBUG neutron.agent.linux.utils [-] Unable to access /tmp/tmppDICas/tmpJpJ77T/router1.pid-vrrp get_value_from_file neutron/agent/linux/utils.py:274
2017-02-15 11:20:28.915 16433 DEBUG neutron.agent.linux.utils [-] Running command (rootwrap daemon): ['ip', 'netns', 'exec', 'keepalivedtest-31b1e0ad-37df-46c9-9aee-ed2cbfc117bf', 'keepalived', '-P', '-f', '/tmp/tmppDICas/tmpJpJ77T/router1/keepalived.conf', '-p', '/tmp/tmppDICas/tmpJpJ77T/router1.pid', '-r', '/tmp/tmppDICas/tmpJpJ77T/router1.pid-vrrp'] execute_rootwrap_daemon neutron/agent/linux/utils.py:113
2017-02-15 11:20:28.998 16433 DEBUG neutron.agent.linux.utils [-] Exit code: 0 execute neutron/agent/linux/utils.py:154
2017-02-15 11:20:28.998 16433 DEBUG oslo_concurrency.lockutils [-] Lock "_check_child_processes" released by "neutron.agent.linux.external_process._check_child_processes" :: held 0.085s inner /home/terry/src/neutron/.tox/dsvm-functional/lib/python2.7/site-packages/oslo_concurrency/lockutils.py:282
2017-02-15 11:20:28.999 16433 DEBUG oslo_concurrency.lockutils [-] Lock "_check_child_processes" acquired by "neutron.agent.linux.external_process._check_child_processes" :: waited 0.000s inner /home/terry/src/neutron/.tox/dsvm-functional/lib/python2.7/site-packages/oslo_concurrency/lockutils.py:270
2017-02-15 11:20:28.999 16433 DEBUG oslo_concurrency.lockutils [-] Lock "_check_child_processes" released by "neutron.agent.linux.external_process._check_child_processes" :: held 0.000s inner /home/terry/src/neutron/.tox/dsvm-functional/lib/python2.7/site-packages/oslo_concurrency/lockutils.py:282
2017-02-15 11:20:28.999 16433 DEBUG oslo_concurrency.lockutils [-] Lock "_check_child_processes" acquired by "neutron.agent.linux.external_process._check_child_processes" :: waited 0.000s inner /home/terry/src/neutron/.tox/dsvm-functional/lib/python2.7/site-packages/oslo_concurrency/lockutils.py:270

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

Fix proposed to branch: master
Review: https://review.openstack.org/434469

Changed in neutron:
assignee: nobody → Terry Wilson (otherwiseguy)
status: New → In Progress
Changed in neutron:
importance: Undecided → Low
tags: added: l3-ha
tags: added: functional-tests gate-failure
tags: removed: gate-failure
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.openstack.org/434469
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=0faf1aa49f18e8dcbee6ea8be78f6e918090e0a1
Submitter: Jenkins
Branch: master

commit 0faf1aa49f18e8dcbee6ea8be78f6e918090e0a1
Author: Terry Wilson <email address hidden>
Date: Wed Feb 15 12:53:44 2017 -0600

    Disable process monitor for keepalived test

    There was an existing attempt to disable process monitoring, but
    since the AGENT.check_child_processes_interval defaults to 60 and
    is checked in ProcessMonitor.__init__, overriding the config value
    after instantiating the ProcessMonitor only has the affect of
    making the check happen continually as quickly as possible instead
    of not at all. Instead, we instantiate the process monitor after
    changing the config value.

    Change-Id: Ic4907b6a227c6fa8288c9d3e2106da0b53323509
    Closes-Bug: #1665061

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

Fix proposed to branch: stable/ocata
Review: https://review.openstack.org/443723

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

Fix proposed to branch: stable/newton
Review: https://review.openstack.org/443724

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

Fix proposed to branch: stable/mitaka
Review: https://review.openstack.org/443725

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on neutron (stable/mitaka)

Change abandoned by Ihar Hrachyshka (<email address hidden>) on branch: stable/mitaka
Review: https://review.openstack.org/443725
Reason: Mitaka is CVE only.

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

Reviewed: https://review.openstack.org/443724
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=01cb8b1c440d0bb8577eb1c03fd10513bd0ccfe4
Submitter: Jenkins
Branch: stable/newton

commit 01cb8b1c440d0bb8577eb1c03fd10513bd0ccfe4
Author: Terry Wilson <email address hidden>
Date: Wed Feb 15 12:53:44 2017 -0600

    Disable process monitor for keepalived test

    There was an existing attempt to disable process monitoring, but
    since the AGENT.check_child_processes_interval defaults to 60 and
    is checked in ProcessMonitor.__init__, overriding the config value
    after instantiating the ProcessMonitor only has the affect of
    making the check happen continually as quickly as possible instead
    of not at all. Instead, we instantiate the process monitor after
    changing the config value.

    Change-Id: Ic4907b6a227c6fa8288c9d3e2106da0b53323509
    Closes-Bug: #1665061
    (cherry picked from commit 0faf1aa49f18e8dcbee6ea8be78f6e918090e0a1)

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

Reviewed: https://review.openstack.org/443723
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=15caa24b02915957cc672e61ed2c170d0148e855
Submitter: Jenkins
Branch: stable/ocata

commit 15caa24b02915957cc672e61ed2c170d0148e855
Author: Terry Wilson <email address hidden>
Date: Wed Feb 15 12:53:44 2017 -0600

    Disable process monitor for keepalived test

    There was an existing attempt to disable process monitoring, but
    since the AGENT.check_child_processes_interval defaults to 60 and
    is checked in ProcessMonitor.__init__, overriding the config value
    after instantiating the ProcessMonitor only has the affect of
    making the check happen continually as quickly as possible instead
    of not at all. Instead, we instantiate the process monitor after
    changing the config value.

    Change-Id: Ic4907b6a227c6fa8288c9d3e2106da0b53323509
    Closes-Bug: #1665061
    (cherry picked from commit 0faf1aa49f18e8dcbee6ea8be78f6e918090e0a1)

tags: added: in-stable-ocata
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron 9.3.0

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

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

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

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

This issue was fixed in the openstack/neutron 11.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.