illustration of 'notify_on_state_change' are different from implementation

Bug #1535254 reported by wuhao
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Balazs Gibizer
Ocata
Fix Committed
Medium
Balazs Gibizer
Pike
Fix Committed
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)
Changed in nova:
assignee: nobody → wuhao (wuhao)
Revision history for this message
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
Revision history for this message
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'.

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

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

Changed in nova:
status: Incomplete → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on nova (master)

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
Revision history for this message
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
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

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)
Changed in nova:
importance: Undecided → Medium
assignee: Matt Riedemann (mriedem) → Balazs Gibizer (balazs-gibizer)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

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
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (stable/pike)

Fix proposed to branch: stable/pike
Review: https://review.openstack.org/521870

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

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/nova 17.0.0.0b2

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

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

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)

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

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)

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

This issue was fixed in the openstack/nova 16.0.4 release.

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

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