Merge "Stop sending notifications to nonstandard pub id"

This commit is contained in:
Zuul 2020-09-12 04:40:17 +00:00 committed by Gerrit Code Review
commit 357a106035
3 changed files with 14 additions and 19 deletions

View File

@ -29,7 +29,6 @@ from cinder import db
from cinder import exception
from cinder.i18n import _
from cinder import objects
from cinder import rpc
from cinder import volume
from cinder.volume import volume_utils
@ -101,12 +100,6 @@ class AdminController(wsgi.Controller):
LOG.debug(msg, {'resource': self.resource_name, 'id': id,
'update': update})
# calling notifier here for volumeStatusUpdate is deprecated.
# Will be replaced with _notify_reset_status()
notifier_info = dict(id=id, update=update)
notifier = rpc.get_notifier('volumeStatusUpdate')
notifier.info(context, self.collection + '.reset_status.start',
notifier_info)
self._notify_reset_status(context, id, 'reset_status.start')
# Not found exception will be handled at the wsgi level
@ -115,8 +108,6 @@ class AdminController(wsgi.Controller):
if update.get('attach_status') == 'detached':
_clean_volume_attachment(context, id)
notifier.info(context, self.collection + '.reset_status.end',
notifier_info)
self._notify_reset_status(context, id, 'reset_status.end')
@wsgi.response(http_client.ACCEPTED)
@ -310,10 +301,6 @@ class BackupAdminController(AdminController):
LOG.debug(msg, {'resource': self.resource_name, 'id': id,
'update': update})
notifier_info = {'id': id, 'update': update}
notifier = rpc.get_notifier('backupStatusUpdate')
notifier.info(context, self.collection + '.reset_status.start',
notifier_info)
self._notify_reset_status(context, id, 'reset_status.start')
# Not found exception will be handled at the wsgi level

View File

@ -55,7 +55,6 @@ from cinder import manager
from cinder import objects
from cinder.objects import fields
from cinder import quota
from cinder import rpc
from cinder import utils
from cinder.volume import rpcapi as volume_rpcapi
from cinder.volume import volume_utils
@ -987,11 +986,6 @@ class BackupManager(manager.SchedulerDependentManager):
"snapshots for backup %(bkup)s.",
{'bkup': backup.id})
# send notification to ceilometer
notifier_info = {'id': backup.id, 'update': {'status': status}}
notifier = rpc.get_notifier('backupStatusUpdate')
notifier.info(context, "backups.reset_status.end",
notifier_info)
volume_utils.notify_about_backup_usage(context, backup,
'reset_status.end')

View File

@ -0,0 +1,14 @@
---
upgrade:
- |
Prior to the Ussuri release, ``os-reset_status`` notifications for
volumes, snapshots, and backups were sent to *nonstandard* publisher_ids.
This behavior was deprecated in Ussuri, and notifications were sent to
both the standard and nonstandard publisher_ids. In this release,
``os-reset_status`` notifications, like all other notifications for
volume, snapshot and backup, are sent *only* to the following
*standard* publisher_ids:
* 'volume' for volume status resets
* 'snapshot' for snapshot status resets
* 'backup' for backup status resets