Nova notifier called even if set to False

Bug #1843269 reported by Brian Haley
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
networking-ovn
New
Undecided
Unassigned
neutron
Fix Released
Low
Brian Haley

Bug Description

If the config option notify_nova_on_port_status_changes is set to False, the Nova notifier can still be called in update_device_up(). This could throw an exception because plugin.nova_notifier is not initialized otherwise. Since it defaults to True we've never seen this failure.

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/681016

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/681016
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=ab4320edb4661f74465ec49166f8d35b8216035f
Submitter: Zuul
Branch: master

commit ab4320edb4661f74465ec49166f8d35b8216035f
Author: Brian Haley <email address hidden>
Date: Mon Sep 9 09:51:30 2019 -0400

    Only notify nova of port status changes if configured

    Although notify_nova_on_port_status_changes defaults to true, it
    could be to false, making the nova_notifier attribute unsafe to
    use without checking.

    This patch checks both the config option and that the attribute
    exists, since the config could be changed after the plugin is
    already initialized without the nova_notifier attribute being set.

    Change-Id: Ide0f93275e60dffda10b7da59f6d81c5582c3849
    Closes-bug: #1843269

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

Related fix proposed to branch: master
Review: https://review.opendev.org/682483

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to networking-ovn (master)

Reviewed: https://review.opendev.org/680792
Committed: https://git.openstack.org/cgit/openstack/networking-ovn/commit/?id=e039fb1bcdf58d7fb26640089f8260abce7e3a71
Submitter: Zuul
Branch: master

commit e039fb1bcdf58d7fb26640089f8260abce7e3a71
Author: Terry Wilson <email address hidden>
Date: Fri Sep 6 20:39:38 2019 -0500

    Only notify nova of port status changes if configured

    Although notify_nova_on_port_status_changes defaults to true, it
    could be set to false, making the nova_notifier attribute unsafe to
    use without checking. In fact, networking-ovn functional tests
    inherit from the neutron base *unit* test which disables this
    option.

    This patch checks both the config option and that the attribute
    exists, since the config could be changed after the plugin is
    already initialized without the nova_notifier attribute being set.

    Partial-Bug: 1843269
    Change-Id: Ia89283c1f6569340a891b40c92405941cbda5800

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to networking-ovn (stable/stein)

Reviewed: https://review.opendev.org/682359
Committed: https://git.openstack.org/cgit/openstack/networking-ovn/commit/?id=a0d1babfd285c78e8c3e69d5e7e6e6c9d3cfb470
Submitter: Zuul
Branch: stable/stein

commit a0d1babfd285c78e8c3e69d5e7e6e6c9d3cfb470
Author: Terry Wilson <email address hidden>
Date: Fri Sep 6 20:39:38 2019 -0500

    Only notify nova of port status changes if configured

    Although notify_nova_on_port_status_changes defaults to true, it
    could be set to false, making the nova_notifier attribute unsafe to
    use without checking. In fact, networking-ovn functional tests
    inherit from the neutron base *unit* test which disables this
    option.

    This patch checks both the config option and that the attribute
    exists, since the config could be changed after the plugin is
    already initialized without the nova_notifier attribute being set.

    Partial-Bug: 1843269
    Change-Id: Ia89283c1f6569340a891b40c92405941cbda5800
    (cherry picked from commit e039fb1bcdf58d7fb26640089f8260abce7e3a71)

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

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

tags: added: networking-ovn-proactive-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to neutron (master)

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

commit ab75405708ffdbe2d7630166c13744d4848909c0
Author: Brian Haley <email address hidden>
Date: Mon Sep 16 16:53:34 2019 -0400

    Initialize nova_notifier for only port data changes

    If notify_nova_on_port_status_changes is False, but
    notify_nova_on_port_data_changes is True, the nova_notifier
    object in the plugin will not be initialized correctly.
    This was never noticed because these two options are
    typically configured identically.

    Change-Id: I3b0ca77b677fe335161b9a649b4ac397e64eacaa
    Related-bug: #1843269

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/728554

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/728555

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

Fix proposed to branch: stable/queens
Review: https://review.opendev.org/728556

tags: removed: networking-ovn-proactive-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (stable/stein)

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

commit acb5fba408f7a8e4a429a91a46ed5c764ade57a4
Author: Brian Haley <email address hidden>
Date: Mon Sep 9 09:51:30 2019 -0400

    Only notify nova of port status changes if configured

    Although notify_nova_on_port_status_changes defaults to true, it
    could be to false, making the nova_notifier attribute unsafe to
    use without checking.

    This patch checks both the config option and that the attribute
    exists, since the config could be changed after the plugin is
    already initialized without the nova_notifier attribute being set.

    Change-Id: Ide0f93275e60dffda10b7da59f6d81c5582c3849
    Closes-bug: #1843269
    (cherry picked from commit ab4320edb4661f74465ec49166f8d35b8216035f)

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

Reviewed: https://review.opendev.org/728555
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=057525808905861ce3cdb92dac77a4dbb04a87c7
Submitter: Zuul
Branch: stable/rocky

commit 057525808905861ce3cdb92dac77a4dbb04a87c7
Author: Brian Haley <email address hidden>
Date: Mon Sep 9 09:51:30 2019 -0400

    Only notify nova of port status changes if configured

    Although notify_nova_on_port_status_changes defaults to true, it
    could be to false, making the nova_notifier attribute unsafe to
    use without checking.

    This patch checks both the config option and that the attribute
    exists, since the config could be changed after the plugin is
    already initialized without the nova_notifier attribute being set.

    Change-Id: Ide0f93275e60dffda10b7da59f6d81c5582c3849
    Closes-bug: #1843269
    (cherry picked from commit ab4320edb4661f74465ec49166f8d35b8216035f)

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

Reviewed: https://review.opendev.org/728556
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=5832292d9d02fb49ef80c032b230c43526dd9dfc
Submitter: Zuul
Branch: stable/queens

commit 5832292d9d02fb49ef80c032b230c43526dd9dfc
Author: Brian Haley <email address hidden>
Date: Mon Sep 9 09:51:30 2019 -0400

    Only notify nova of port status changes if configured

    Although notify_nova_on_port_status_changes defaults to true, it
    could be to false, making the nova_notifier attribute unsafe to
    use without checking.

    This patch checks both the config option and that the attribute
    exists, since the config could be changed after the plugin is
    already initialized without the nova_notifier attribute being set.

    Change-Id: Ide0f93275e60dffda10b7da59f6d81c5582c3849
    Closes-bug: #1843269
    (cherry picked from commit ab4320edb4661f74465ec49166f8d35b8216035f)

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

This issue was fixed in the openstack/neutron queens-eol release.

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

This issue was fixed in the openstack/neutron rocky-eol release.

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.