If you want to return back the old behavior add 'ssl_options=' (empty) to
``rgw frontends`` configuration.
+* RGW: The behavior for Multipart Upload was modified so that only
+ CompleteMultipartUpload notification is sent at the end of the multipart upload.
+ The POST notification at the beginning of the upload, and PUT notifications that
+ were sent on each part are not sent anymore.
+
>=16.0.0
--------
* mgr/nfs: ``nfs`` module is moved out of volumes plugin. Prior using the
The ``s3:ObjectRemoved:DeleteMarkerCreated`` event presents information on the latest version of the object
+.. note::
+
+ In case of multipart upload, an ``ObjectCreated:CompleteMultipartUpload`` notification will be sent at the end of the process.
+
Topic Configuration
-------------------
In the case of bucket notifications, the topics management API will be derived from `AWS Simple Notification Service API`_.
// make reservation for notification if needed
std::unique_ptr<rgw::sal::Notification> res = store->get_notification(s->object.get(),
s, rgw::notify::ObjectCreatedPut);
- op_ret = res->publish_reserve(this, obj_tags.get());
- if (op_ret < 0) {
- return;
+ if(!multipart) {
+ op_ret = res->publish_reserve(this, obj_tags.get());
+ if (op_ret < 0) {
+ return;
+ }
}
// create the object processor
return;
}
- // make reservation for notification if needed
- std::unique_ptr<rgw::sal::Notification> res = store->get_notification(s->object.get(),
- s, rgw::notify::ObjectCreatedPost);
- op_ret = res->publish_reserve(this);
- if (op_ret < 0) {
- return;
- }
-
do {
char buf[33];
std::unique_ptr<rgw::sal::Object> obj;
op_ret = obj_op->write_meta(this, bl.length(), 0, s->yield);
} while (op_ret == -EEXIST);
- // send request to notification manager
- int ret = res->publish_commit(this, s->obj_size, ceph::real_clock::now(), attrs[RGW_ATTR_ETAG].to_str(), "");
- if (ret < 0) {
- ldpp_dout(this, 1) << "ERROR: publishing notification failed, with error: " << ret << dendl;
- // too late to rollback operation, hence op_ret is not set here
- }
}
int RGWCompleteMultipart::verify_permission(optional_yield y)
# create s3 notification
notification_name = bucket_name + NOTIFICATION_SUFFIX
topic_conf_list = [{'Id': notification_name,'TopicArn': topic_arn,
- 'Events': ['s3:ObjectCreated:Put', 's3:ObjectCreated:Copy']
+ 'Events': ['s3:ObjectCreated:Put', 's3:ObjectCreated:Copy', 's3:ObjectCreated:CompleteMultipartUpload']
}]
s3_notification_conf = PSNotificationS3(conn, bucket_name, topic_conf_list)
# check amqp receiver
events = receiver1.get_and_reset_events()
- assert_equal(len(events), 3)
+ assert_equal(len(events), 1)
events = receiver2.get_and_reset_events()
- assert_equal(len(events), 1)
- assert_equal(events[0]['Records'][0]['eventName'], 'ObjectCreated:Post')
- assert_equal(events[0]['Records'][0]['s3']['configurationId'], notification_name+'_2')
+ assert_equal(len(events), 0)
events = receiver3.get_and_reset_events()
assert_equal(len(events), 1)
time.sleep(5)
# check amqp receiver
events = receiver.get_and_reset_events()
- assert_equal(len(events), 4) # PUT, COPY, Multipart start, Multipart End
+ assert_equal(len(events), 3) # PUT, COPY, Multipart start, Multipart End
for event in events:
assert(event['Records'][0]['s3']['object']['key'] in expected_keys)