yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #72563
[Bug 1764390] Re: Replace passing system_metadata to notification functions with instance.system_metadata usage
Reviewed: https://review.openstack.org/561724
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=1c36654ad8eadfa4e0fca785b1a8a717de118b50
Submitter: Zuul
Branch: master
commit 1c36654ad8eadfa4e0fca785b1a8a717de118b50
Author: Matt Riedemann <mriedem.os@xxxxxxxxx>
Date: Mon Apr 16 16:58:07 2018 -0400
Remove vestigial system_metadata param from info_from_instance()
The system_metadata argument to info_from_instance() was not used
so it's removed in this change, along with all callers of that
method, which goes quite a ways.
Also, the docstring for the system_metadata argument to
notify_usage_exists() is updated since it is passed in one
specific place: rebuild with a new image. In that case, nova-api
saves off the original instance system_metadata before resetting
the system_metadata based on the new image to rebuild, which is
then passed down through nova-conductor and nova-compute where
it eventually gets used to override "image_meta" in the payload
created in info_from_instance(). It's weird, yes, and essentially
means that for legacy versioned notifications, the instance payload
will always contain the image_meta for the instance before it's
rebuilt with the new image, which is something we don't do for
versioned notifications.
Test test_local_delete_without_info_cache is removed since it's
(1) weird in that it is doing mox-like stuff in a mock-based
test and (2) the code it was meant to test from change
Ie0bba032615d3da06cdd95b221beb37a9b8a377d no longer exists.
Change-Id: Ia1820334dcaceca9d7fa874dd7c553fa1c5befec
Closes-Bug: #1764390
** Changed in: nova
Status: In Progress => Fix Released
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1764390
Title:
Replace passing system_metadata to notification functions with
instance.system_metadata usage
Status in OpenStack Compute (nova):
Fix Released
Bug description:
Both notify_usage_exists() [1] and info_from_instance() [2] functions used in the notification code path get the system_metadata passed in. Instead we should use the instance.system_metadata directly whenever it is possible.
[1] https://github.com/openstack/nova/blob/57d3b7093259b625672a98b0ff41643175f6cb82/nova/compute/utils.py#L278
[2]https://github.com/openstack/nova/blob/57d3b7093259b625672a98b0ff41643175f6cb82/nova/notifications/base.py#L382
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1764390/+subscriptions
References