Skip to content

Website merge#76

Open
bafna wants to merge 83 commits intojiocloudDSS:hammerfrom
bafna:website-merge
Open

Website merge#76
bafna wants to merge 83 commits intojiocloudDSS:hammerfrom
bafna:website-merge

Conversation

@bafna
Copy link
Copy Markdown

@bafna bafna commented Dec 29, 2016

Please review the changes for Static Website hosting.

Robin H. Johnson and others added 30 commits June 17, 2016 18:12
No functionality changes in this commit, just shuffle lines to new files
and adding #include headers to ensure it still compiles.

Signed-off-by: Robin H. Johnson <robin.johnson@dreamhost.com>

Conflicts:
	src/mds/MDSDaemon.cc
	src/mds/MDSRank.cc

Fixing compilation error
StaticSites/S3Website has error output in HTML, for which we need a new
formatter. It's implemented by extending the existing XMLFormatter.

This will print the actual entries, but not any document structure
around them. Unless otherwise documented, this codes strives for the
Amazon format of:
<li>key: value</li>

Signed-off-by: Robin H. Johnson <robin.johnson@dreamhost.com>
Formatters now gain first-class headers and footers, along with
consistent handling of having header/footer only output ONCE.

Signed-off-by: Robin H. Johnson <robin.johnson@dreamhost.com>
move website rules to separate file, check rules,
and implement key modification functionality

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>

Conflicts:
	src/rgw/Makefile.am
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>

Conflicts:
	src/rgw/rgw_main.cc
	src/rgw/rgw_op.h
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
also enable GetBucketWebsite op.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
similar to the json decoder, for easier xml parsing.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
let the parser do the allocation if needed. Also, keep unallocated
objects in a list.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
only when key matches, not checking for return code yet.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
ListBucket/StatBucket are not a valid action for website mode, redirect
it to GetObj instead, where it will modified via get_effective_key to
point to the correct suffix document.

S3 explicitly does NOT support anything like mod_autoindex when used in
static website mode.

Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
With the XML dumping moved, this variable is not required.

Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
Rather than duplicate code to construct the redirect if redirect_all is
used, construct a catch-all RoutingRule with redirect_all as the target,
and return it as the matching rule.

Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
…ith many endpoint hostnames.

Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>

Conflicts:
	src/rgw/rgw_rest.cc
AmazonS3 detects S3website mode via DNS:
${bucket}.s3-website-${region}.amazonaws.com.
VS:
${bucket}.s3-${region}.amazonaws.com.

This allows us to store what hostnames to use for the website endpoint.

Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>

Conflicts:
	src/rgw/rgw_rest.cc
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
…cketmode&&auth to decide.

WIP-FIXME rgw-website: refactor to have RGW*S3Website classes for website-specific stuff

Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>

Conflicts:
	src/common/config_opts.h
	src/rgw/rgw_rest.cc
	src/rgw/rgw_rest_s3.cc
	src/rgw/rgw_rest_s3.h
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>

Conflicts:
	src/rgw/rgw_rest.cc
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
yehudasa and others added 30 commits June 17, 2016 22:24
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
Signed-off-by: Robin H. Johnson <robin.johnson@dreamhost.com>
Signed-off-by: Robin H. Johnson <robin.johnson@dreamhost.com>
Signed-off-by: Robin H. Johnson <robin.johnson@dreamhost.com>

Conflicts:
	src/global/Makefile.am
We need to override all conditional request parameters in errordoc
fallback request, and serve a complete page always, never anything
conditional.

Signed-off-by: Robin H. Johnson <robin.johnson@dreamhost.com>
This reverts commit 2b21e3c.

Conflicts:
	src/common/Formatter.cc
	src/common/JSONFormatter.h
	src/common/Makefile.am
	src/common/TableFormatter.h
	src/common/XMLFormatter.cc
	src/common/XMLFormatter.h
	src/rgw/rgw_rest.cc
	src/test/formatter.cc

Conflicts:
	ceph-object-corpus
	src/mds/MDSDaemon.cc
	src/mds/MDSRank.cc
	src/rocksdb
For clarity, RGW_REST_* should be renamed to RGW_PROTO_* in future.

For now, undo it to ease the merging speed for static-sites.

Signed-off-by: Robin H. Johnson <robin.johnson@dreamhost.com>

Conflicts:
	src/rgw/rgw_common.h
Signed-off-by: Robin H. Johnson <robin.johnson@dreamhost.com>
Signed-off-by: Robin H. Johnson <robin.johnson@dreamhost.com>
…xisting ones for website changes.

Signed-off-by: Robin H. Johnson <robin.johnson@dreamhost.com>
Signed-off-by: Robin H. Johnson <robin.johnson@dreamhost.com>

Conflicts:
	src/CMakeLists.txt
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
If op is bucket creation it should ignore ENOENT. Otherwise we should
make sure we return the appropriate error.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
Signed-off-by: Robin H. Johnson <robin.johnson@dreamhost.com>
Fixes: ceph#12352

Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com>

Conflicts:
	src/rgw/rgw_rest_swift.cc
	src/rgw/rgw_rest_swift.h
delete getop, remove #warnings, add comments

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>

Conflicts:
	src/rgw/rgw_op.cc
rgw_enable_static_website

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
Support for the x-amz-website-redirect-location header was broken in the
feature merging of Jewel, as it previously depended on the error handler to
redirect, which was overkill. Simplify it to work.

Backport: jewel
Fixes: http://tracker.ceph.com/issues/15531
Signed-off-by: Robin H. Johnson <robin.johnson@dreamhost.com>

Conflicts:
	src/rgw/rgw_rest_s3.cc
Fix more last minute breakage from merges, now has has a working ErrorDoc as
well as working double-fault. Also moves some s3website-specific code out of
the main S3 codepath.

Fixes: ceph#15532
Fixes: ceph#15555
Signed-off-by: Robin H. Johnson <robin.johnson@dreamhost.com>

Conflicts:
	src/rgw/rgw_rest.cc
	src/rgw/rgw_rest_s3.cc
	src/rgw/rgw_rest_s3.h
	src/rgw/rgw_rest_s3website.h
Signed-off-by: Robin H. Johnson <robin.johnson@dreamhost.com>

Conflicts:
	src/rgw/rgw_rest_s3.cc
When modifying rgw_enable_apis per RGW instance, such as for staticsites, you
can end up with RESTManager instance being null in some cases, which returns a
HTTP 405 MethodNotAllowed to all requests.

Example configuration to trigger the bug:
rgw_enable_apis = s3website

Backport: jewel
X-Note: Patch from Yehuda in private IRC discussion, 2016/05/20.
Fixes: http://tracker.ceph.com/issues/15973
Fixes: http://tracker.ceph.com/issues/15974
Signed-off-by: Robin H. Johnson <robin.johnson@dreamhost.com>
(cherry picked from commit 7c7a465)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants