rgw: set bucket permissions, cors on swift creation

Fixes: #7271
Swift bucket creation was ignoring the x-container-read,
x-container-write and the various cors related headers. Now going
through the same logic that bucket modify goes.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
rgw: return error if accessing object in non-existent bucket

Fixes: #7064
Instead of trying to access the object, which is impossible as we don't
even have a proper bucket info. Up until now we ended up creating an
empty pool and eventually returning ENOENT, this fix catches the issue
earlier in the process.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
rgw: don't try to read bucket's policy if it doesn't exist

It's going to fail anyway, just build a default policy.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
radosgw-admin: don't generate access key if user exists

Fixes: #6936
We want the user creation operation to be idempotent, so if user already
exists don't generate a new access key.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
rgw: reset objv tracker on bucket recreation

Fixes: #6951
If we cannot create a new bucket (as it already existed), we need to
read the old bucket's info. However, this was failing as we were holding
the objv tracker that we created for the bucket creation. We need to
clear it, as subsequent read using it will fail.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
rgw: fix etag in multipart complete

Fixes: #6830
The etag member variable was not set correctly.

Reported-by: Benjamin Gilbert <bgilbert@backtick.net>
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
rgw: fix swift range response

Fixes: #7099
Backport: dumpling
The range response header was broken in swift.

Reported-by: Julien Calvet <julien.calvet@neurea.com>
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
Merge remote-tracking branch 'origin/wip-7271' into firefly

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Merge remote-tracking branch 'origin/wip-7064' into firefly

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Merge remote-tracking branch 'origin/wip-6951' into firefly

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Merge remote-tracking branch 'origin/wip-6830' into firefly

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Merge remote-tracking branch 'origin/wip-7099' into firefly

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Merge remote-tracking branch 'origin/wip-6936' into firefly

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>