illustration of 'notify_on_state_change' are different from implementation

Bug #1535254 reported by wuhao on 2016-01-18
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Medium
Balazs Gibizer
Ocata
Medium
Balazs Gibizer
Pike
Medium
Balazs Gibizer

Bug Description

I'm using liberty to get notifications from nova. And I found a problem with 'notify_on_state_change'.

In the configuration doc, 'notify_on_state_change' means that "If set, send compute.instance.update notifications on instance state changes." Valid values are None, 'vm_state' and 'vm_and_task_state'. However, in current implementation, if it's set to 'vm_state', compute.instance.update notifications will be sent for all the state changes and it will be a special state change notification when the vm state changes. So as to 'vm_and_task_state'.

wuhao (wuhao) on 2016-01-18
Changed in nova:
assignee: nobody → wuhao (wuhao)
Augustina Ragwitz (auggy) wrote :

Please provide a link the configuration documentation you used so we can verify and possibly reassign the bug to the openstack-manuals team.

Changed in nova:
status: New → Incomplete
wuhao (wuhao) wrote :

The doc is http://docs.openstack.org/liberty/config-reference/content/list-of-compute-config-options.html
and also you can get the illustraion in https://github.com/openstack/nova/blob/master/nova/notifications.py#L44 which is different from actual implementation.

Currently, if 'notify_on_state_change' is set to 'vm_state' or 'vm_and_task_state', all the changes will cause a compute.instance.update notification. I think we'd better introduce another valid value 'all_state' to get all the compute.instance.update notifications. And if 'vm_and_task_state' is set, we only send update notifications when vm state or task state have been changed. The same with 'vm_state'.

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

Changed in nova:
status: Incomplete → In Progress

Change abandoned by Michael Still (<email address hidden>) on branch: master
Review: https://review.openstack.org/269720
Reason: This code hasn't been updated in a long time, and is in merge conflict. I am going to abandon this review, but feel free to restore it if you're still working on this.

Changed in nova:
status: In Progress → Confirmed
assignee: wuhao (wuhao) → nobody
Sean Dague (sdague) wrote :

Automatically discovered version liberty in description. If this is incorrect, please update the description to include 'nova version: ...'

tags: added: openstack-version.liberty

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

Changed in nova:
assignee: nobody → Balazs Gibizer (balazs-gibizer)
status: Confirmed → In Progress
Changed in nova:
assignee: Balazs Gibizer (balazs-gibizer) → Matt Riedemann (mriedem)
Matt Riedemann (mriedem) on 2017-11-15
Changed in nova:
importance: Undecided → Medium
assignee: Matt Riedemann (mriedem) → Balazs Gibizer (balazs-gibizer)

Reviewed: https://review.openstack.org/516264
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=e86604fb6579e2333ab9ab5a6926ef84d201152a
Submitter: Zuul
Branch: master

commit e86604fb6579e2333ab9ab5a6926ef84d201152a
Author: Balazs Gibizer <email address hidden>
Date: Mon Oct 30 12:59:12 2017 +0100

    Document the real behavior of notify_on_state_change

    The documentation of the notify_on_state_change config param was
    incomplete and misleading. The code is untouched since
    2012 so the document is updated to reflect the current behavior.

    Change-Id: I51d0deffc4f42ff2722a8d21aa6b8c8008c62723
    Closes-Bug: #1535254

Changed in nova:
status: In Progress → Fix Released

This issue was fixed in the openstack/nova 17.0.0.0b2 development milestone.

Reviewed: https://review.openstack.org/521870
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=2c70ee8c72bb7ab1f475f015547ce2167956f64b
Submitter: Zuul
Branch: stable/pike

commit 2c70ee8c72bb7ab1f475f015547ce2167956f64b
Author: Balazs Gibizer <email address hidden>
Date: Mon Oct 30 12:59:12 2017 +0100

    Document the real behavior of notify_on_state_change

    The documentation of the notify_on_state_change config param was
    incomplete and misleading. The code is untouched since
    2012 so the document is updated to reflect the current behavior.

    Change-Id: I51d0deffc4f42ff2722a8d21aa6b8c8008c62723
    Closes-Bug: #1535254
    (cherry picked from commit e86604fb6579e2333ab9ab5a6926ef84d201152a)

Reviewed: https://review.openstack.org/521871
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=1905407448dceed09939a11fa31e2b02fd835dc9
Submitter: Zuul
Branch: stable/ocata

commit 1905407448dceed09939a11fa31e2b02fd835dc9
Author: Balazs Gibizer <email address hidden>
Date: Mon Oct 30 12:59:12 2017 +0100

    Document the real behavior of notify_on_state_change

    The documentation of the notify_on_state_change config param was
    incomplete and misleading. The code is untouched since
    2012 so the document is updated to reflect the current behavior.

    Change-Id: I51d0deffc4f42ff2722a8d21aa6b8c8008c62723
    Closes-Bug: #1535254
    (cherry picked from commit e86604fb6579e2333ab9ab5a6926ef84d201152a)
    (cherry picked from commit 2c70ee8c72bb7ab1f475f015547ce2167956f64b)

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

Other bug subscribers