self.assertRaises(exception.DriverNotInitialized,
self.volume.create_volume,
self.context, volume_id,
- {'volume_properties': self.volume_params})
- # NOTE(dulek): Volume should be rescheduled as we passed request_spec,
- # assert that it wasn't counted in allocated_capacity tracking.
+ {'volume_properties': self.volume_params},
+ {'retry': {'num_attempts': 1, 'host': []}})
+ # NOTE(dulek): Volume should be rescheduled as we passed request_spec
+ # and filter_properties, assert that it wasn't counted in
+ # allocated_capacity tracking.
self.assertEqual({}, self.volume.stats['pools'])
db.volume_destroy(context.get_admin_context(), volume_id)
self.assertRaises(processutils.ProcessExecutionError,
self.volume.create_volume,
self.context, volume_id,
- {'volume_properties': params})
- # NOTE(dulek): Volume should be rescheduled as we passed request_spec,
- # assert that it wasn't counted in allocated_capacity tracking.
+ {'volume_properties': params},
+ {'retry': {'num_attempts': 1, 'host': []}})
+ # NOTE(dulek): Volume should be rescheduled as we passed request_spec
+ # and filter_properties, assert that it wasn't counted in
+ # allocated_capacity tracking.
self.assertEqual({}, self.volume.stats['pools'])
db.volume_destroy(context.get_admin_context(), volume_id)
volume_flow.add(ExtractVolumeRefTask(db, host))
- if allow_reschedule and request_spec:
+ retry = filter_properties.get('retry', None)
+ if allow_reschedule and request_spec and retry:
volume_flow.add(OnFailureRescheduleTask(reschedule_context,
db, scheduler_rpcapi))
+ LOG.debug("Volume reschedule parameters: %(allow)s "
+ "retry: %(retry)s", {'allow': allow_reschedule, 'retry': retry})
+
volume_flow.add(ExtractVolumeSpecTask(db),
NotifyVolumeActionTask(db, "create.start"),
CreateVolumeFromSpecTask(db, driver),