Browse Source

Merge "Stop sending notifications to nonstandard pub id"

changes/79/751579/1
Zuul 1 week ago
committed by Gerrit Code Review
parent
commit
357a106035
3 changed files with 14 additions and 19 deletions
  1. +0
    -13
      cinder/api/contrib/admin_actions.py
  2. +0
    -6
      cinder/backup/manager.py
  3. +14
    -0
      releasenotes/notes/reset-status-notification-update-b655615871db4659.yaml

+ 0
- 13
cinder/api/contrib/admin_actions.py 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


+ 0
- 6
cinder/backup/manager.py 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')



+ 14
- 0
releasenotes/notes/reset-status-notification-update-b655615871db4659.yaml 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

Loading…
Cancel
Save