"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "masakari/engine/manager.py" between
masakari-8.0.0.tar.gz and masakari-9.0.0.tar.gz

About: OpenStack Masakari provides "Instances High Availability Service" for OpenStack clouds by automatically recovering failed Instances (currently for KVM-based Virtual Machine(VM)s).
The "Ussuri" series (latest release).

manager.py  (masakari-8.0.0):manager.py  (masakari-9.0.0)
skipping to change at line 173 skipping to change at line 173
tb=tb) tb=tb)
else: else:
engine_utils.notify_about_notification_update(context, engine_utils.notify_about_notification_update(context,
notification, notification,
action=fields.EventNotificationAction.NOTIFICATION_PROCESS, action=fields.EventNotificationAction.NOTIFICATION_PROCESS,
phase=fields.EventNotificationPhase.END) phase=fields.EventNotificationPhase.END)
return notification_status return notification_status
def _handle_notification_type_host(self, context, notification): def _handle_notification_type_host(self, context, notification):
host_status = notification.payload.get('host_status')
notification_status = fields.NotificationStatus.FINISHED notification_status = fields.NotificationStatus.FINISHED
notification_event = notification.payload.get('event') notification_event = notification.payload.get('event')
exception_info = None exception_info = None
if notification_event.upper() == 'STARTED': if host_status.upper() != fields.HostStatusType.NORMAL:
# NOTE(shilpasd): Avoid host recovery for host_status other than
# 'NORMAL' otherwise it could lead to unsafe evacuation of
# instances running on the failed source host.
LOG.warning("Notification '%(uuid)s' ignored as host_status"
"is '%(host_status)s'",
{'uuid': notification.notification_uuid,
'host_status': host_status.upper()})
notification_status = fields.NotificationStatus.IGNORED
elif notification_event.upper() == 'STARTED':
LOG.info("Notification type '%(type)s' received for host " LOG.info("Notification type '%(type)s' received for host "
"'%(host_uuid)s' has been %(event)s.", "'%(host_uuid)s' has been %(event)s.",
{'type': notification.type, {'type': notification.type,
'host_uuid': notification.source_host_uuid, 'host_uuid': notification.source_host_uuid,
'event': notification_event}) 'event': notification_event})
elif notification_event.upper() == 'STOPPED': elif notification_event.upper() == 'STOPPED':
host_obj = objects.Host.get_by_uuid( host_obj = objects.Host.get_by_uuid(
context, notification.source_host_uuid) context, notification.source_host_uuid)
host_name = host_obj.name host_name = host_obj.name
recovery_method = host_obj.failover_segment.recovery_method recovery_method = host_obj.failover_segment.recovery_method
 End of changes. 2 change blocks. 
1 lines changed or deleted 11 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)