Re: missing amqp-exchange on bucket-notification with AMQP endpoint

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Apr 23, 2020 at 8:28 AM Andreas Unterkircher <unki@xxxxxxxxxxxxx>
wrote:

> Dear Yuval!
>
> > The message format you tried to use is the standard one (the one being
> > emitted from boto3, or any other AWS SDK [1]).
> > It passes the arguments using 'x-www-form-urlencoded'. For example:
>
> Thank you for your clarification! I've previously tried it as a
> x-www-form-urlencoded-body as well, but I have failed. That it was then
> working using the non-standard-parameters has lead me down the wrong
> road...
> But I have to admit that I'm still failing to create a topic the S3-way.
>
> I've tried it with curl, but as well with Postman.
> Even if I use your example-body, Ceph keeps telling me (at least)
> method-not-allowed.
>
> Is this maybe because I'm using an AWS Sig v4 to authenticate?
>
> yes, this is probably the issue. in the radosgw we use the same signature
mechanism for S3 and for the other services (like topic creation).
see this example:
https://github.com/ceph/ceph/blob/master/examples/boto3/topic_with_endpoint.py#L31
(I guess we should also add that to the docs)

This is the request I'm sending out:
>
> POST / HTTP/1.1
> Content-Type: application/x-www-form-urlencoded; charset=utf-8
> Accept-Encoding: identity
> Date: Tue, 23 Apr 2020 05:00:35 GMT
> X-Amz-Content-Sha256:
> e8d828552b412fde2cd686b0a984509bc485693a02e8c53ab84cf36d1dbb961a
> Host: s3.example.com
> X-Amz-Date: 2 as0200423T050035Z
> Authorization: AWS4-HMAC-SHA256
> Credential=DNQXT3I8Z5MWDJ1A8YMP/20200423/de/s3/aws4_request,
> SignedHeaders=accept-encoding;content-type;date;host;x-amz-content-sha256;x-amz-date,
>
> Signature=fa65844ba997fe11e65be87a18f160afe1ea459892316d6060bbc663daf6eace
> User-Agent: PostmanRuntime/7.24.1
> Accept: */*
> Connection: keep-alive
>
> Content-Length: 303
>
> Name=ajmmvc-1_topic_1&
> Attributes.entry.2.key=amqp-exchange&
> Attributes.entry.1.key=amqp-ack-level&
> Attributes.entry.2.value=amqp.direct&
> Version=2010-03-31&
> Attributes.entry.3.value=amqp%3A%2F%2F127.0.0.1%3A7001&
> Attributes.entry.1.value=none&
> Action=CreateTopic&
> Attributes.entry.3.key=push-endpoint
>
>
> This is the response that comes back:
>
> HTTP/1.1 405 Method Not Allowed
> Content-Length: 200
> x-amz-request-id: tx000000000000000000001-005ea12159-6e47a-s3-datacenter
> Accept-Ranges: bytes
> Content-Type: application/xml
> Date: Thu, 23 Apr 2020 05:02:17 GMT
> <?xml version="1.0"
>
> encoding="UTF-8"?><Error><Code>MethodNotAllowed</Code><RequestId>tx000000000000000000001-005ea12159-6e47a-s3-datacenter</RequestId><HostId>6e47a-s3-datacenter-de</HostId></Error>
>
>
> This is was radosgw is seeing at the same time
>
> 2020-04-23T07:02:17.745+0200 7f5aab2af700 20 final domain/bucket
> subdomain= domain=s3.example.com in_hosted_domain=1
> in_hosted_domain_s3website=0 s->info.domain=s3.example.com
> s->info.request_uri=/
> 2020-04-23T07:02:17.745+0200 7f5aab2af700 10 meta>>
> HTTP_X_AMZ_CONTENT_SHA256
> 2020-04-23T07:02:17.745+0200 7f5aab2af700 10 meta>> HTTP_X_AMZ_DATE
> 2020-04-23T07:02:17.745+0200 7f5aab2af700 10 x>>
>
> x-amz-content-sha256:e8d828552b412fde2cd686b0a984509bc485693a02e8c53ab84cf36d1dbb961a
> 2020-04-23T07:02:17.745+0200 7f5aab2af700 10 x>>
> x-amz-date:20200423T050035Z
> 2020-04-23T07:02:17.745+0200 7f5aab2af700 20 req 1 0s get_handler
> handler=26RGWHandler_REST_Service_S3
> 2020-04-23T07:02:17.745+0200 7f5aab2af700 10
> handler=26RGWHandler_REST_Service_S3
> 2020-04-23T07:02:17.745+0200 7f5aab2af700  2 req 1 0s getting op 4
> 2020-04-23T07:02:17.745+0200 7f5aab2af700 10 Content of POST:
> Name=ajmmvc-1_topic_1&
> Attributes.entry.2.key=amqp-exchange&
> Attributes.entry.1.key=amqp-ack-level&
> Attributes.entry.2.value=amqp.direct&
> Version=2010-03-31&
> Attributes.entry.3.value=amqp%3A%2F%2F127.0.0.1%3A7001&
> Attributes.entry.1.value=none&
> Action=CreateTopic&
> Attributes.entry.3.key=push-endpoint
>
> 2020-04-23T07:02:17.745+0200 7f5aab2af700 10 Content of POST:
> Name=ajmmvc-1_topic_1&
> Attributes.entry.2.key=amqp-exchange&
> Attributes.entry.1.key=amqp-ack-level&
> Attributes.entry.2.value=amqp.direct&
> Version=2010-03-31&
> Attributes.entry.3.value=amqp%3A%2F%2F127.0.0.1%3A7001&
> Attributes.entry.1.value=none&
> Action=CreateTopic&
> Attributes.entry.3.key=push-endpoint
>
> 2020-04-23T07:02:17.745+0200 7f5aab2af700 10 Content of POST:
> Name=ajmmvc-1_topic_1&
> Attributes.entry.2.key=amqp-exchange&
> Attributes.entry.1.key=amqp-ack-level&
> Attributes.entry.2.value=amqp.direct&
> Version=2010-03-31&
> Attributes.entry.3.value=amqp%3A%2F%2F127.0.0.1%3A7001&
> Attributes.entry.1.value=none&
> Action=CreateTopic&
> Attributes.entry.3.key=push-endpoint
>
> 2020-04-23T07:02:17.745+0200 7f5aab2af700  1 handler->ERRORHANDLER:
> err_no=-2003 new_err_no=-2003
> 2020-04-23T07:02:17.745+0200 7f5aab2af700  2 req 1 0s http status=405
> 2020-04-23T07:02:17.745+0200 7f5aab2af700  1 ====== req done
> req=0x7f5aab2a6d50 op status=0 http_status=405 latency=0s ======
>
>
>
>
>
>
> Best Regards,
> Andreas
> _______________________________________________
> ceph-users mailing list -- ceph-users@xxxxxxx
> To unsubscribe send an email to ceph-users-leave@xxxxxxx
>
>
_______________________________________________
ceph-users mailing list -- ceph-users@xxxxxxx
To unsubscribe send an email to ceph-users-leave@xxxxxxx



[Index of Archives]     [Information on CEPH]     [Linux Filesystem Development]     [Ceph Development]     [Ceph Large]     [Ceph Dev]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [xfs]


  Powered by Linux